本文整理汇总了Java中net.minecraft.util.EnumTypeAdapterFactory类的典型用法代码示例。如果您正苦于以下问题:Java EnumTypeAdapterFactory类的具体用法?Java EnumTypeAdapterFactory怎么用?Java EnumTypeAdapterFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EnumTypeAdapterFactory类属于net.minecraft.util包,在下文中一共展示了EnumTypeAdapterFactory类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setupGsonSerialiser
import net.minecraft.util.EnumTypeAdapterFactory; //导入依赖的package包/类
@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());
}
开发者ID:killjoy1221,项目名称:MnM-Utils,代码行数:9,代码来源:SettingsFile.java
示例2: IMetadataSerializer
import net.minecraft.util.EnumTypeAdapterFactory; //导入依赖的package包/类
public IMetadataSerializer()
{
this.gsonBuilder.registerTypeHierarchyAdapter(IChatComponent.class, new IChatComponent.Serializer());
this.gsonBuilder.registerTypeHierarchyAdapter(ChatStyle.class, new ChatStyle.Serializer());
this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:7,代码来源:IMetadataSerializer.java
示例3: MetadataSerializer
import net.minecraft.util.EnumTypeAdapterFactory; //导入依赖的package包/类
public MetadataSerializer()
{
this.gsonBuilder.registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer());
this.gsonBuilder.registerTypeHierarchyAdapter(Style.class, new Style.Serializer());
this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:7,代码来源:MetadataSerializer.java
示例4: setupGsonSerialiser
import net.minecraft.util.EnumTypeAdapterFactory; //导入依赖的package包/类
@Override
public void setupGsonSerialiser(GsonBuilder gsonBuilder) {
super.setupGsonSerialiser(gsonBuilder);
gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
开发者ID:killjoy1221,项目名称:TabbyChat-2,代码行数:6,代码来源:TabbySettings.java
注:本文中的net.minecraft.util.EnumTypeAdapterFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论