Java 类net.minecraft.util.EnumTypeAdapterFactory 实例源码

项目:MnM-Utils    文件:SettingsFile.java   
@Override
public void setupGsonSerialiser(GsonBuilder gsonBuilder) {
    new PrivateFields<GsonBuilder, Excluder>(GsonBuilder.class, new Obf("excluder") {}) {}
            .set(gsonBuilder, Excluder.DEFAULT); // grr
    gsonBuilder
            .registerTypeAdapterFactory(new EnumTypeAdapterFactory())
            .registerTypeHierarchyAdapter(Value.class, new ValueSerializer());
}
项目:TabbyChat-2    文件:SettingsFile.java   
@Override
public void setupGsonSerialiser(GsonBuilder gsonBuilder) {
    new PrivateFields<GsonBuilder, Excluder>(GsonBuilder.class, new Obf("excluder") {}) {}
            .set(gsonBuilder, Excluder.DEFAULT); // grr
    gsonBuilder
            .registerTypeAdapterFactory(new EnumTypeAdapterFactory())
            .registerTypeHierarchyAdapter(Value.class, new ValueSerializer());
}
项目:DecompiledMinecraft    文件:IMetadataSerializer.java   
public IMetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(IChatComponent.class, new IChatComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(ChatStyle.class, new ChatStyle.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:BaseClient    文件:IMetadataSerializer.java   
public IMetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(IChatComponent.class, new IChatComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(ChatStyle.class, new ChatStyle.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:BaseClient    文件:IMetadataSerializer.java   
public IMetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(IChatComponent.class, new IChatComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(ChatStyle.class, new ChatStyle.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:Backmemed    文件:MetadataSerializer.java   
public MetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(Style.class, new Style.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:CustomWorldGen    文件:MetadataSerializer.java   
public MetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(Style.class, new Style.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:ExpandedRailsMod    文件:MetadataSerializer.java   
public MetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(Style.class, new Style.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:Cauldron    文件:IMetadataSerializer.java   
public IMetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(IChatComponent.class, new IChatComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(ChatStyle.class, new ChatStyle.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:Cauldron    文件:IMetadataSerializer.java   
public IMetadataSerializer()
{
    this.gsonBuilder.registerTypeHierarchyAdapter(IChatComponent.class, new IChatComponent.Serializer());
    this.gsonBuilder.registerTypeHierarchyAdapter(ChatStyle.class, new ChatStyle.Serializer());
    this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
项目:TabbyChat-2    文件:TabbySettings.java   
@Override
public void setupGsonSerialiser(GsonBuilder gsonBuilder) {
    super.setupGsonSerialiser(gsonBuilder);
    gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}