当前位置: 首页>>代码示例>>Java>>正文


Java DataSerializers类代码示例

本文整理汇总了Java中net.minecraft.network.datasync.DataSerializers的典型用法代码示例。如果您正苦于以下问题:Java DataSerializers类的具体用法?Java DataSerializers怎么用?Java DataSerializers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DataSerializers类属于net.minecraft.network.datasync包,在下文中一共展示了DataSerializers类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import net.minecraft.network.datasync.DataSerializers; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLPreInitializationEvent event) {
	conf = new Configuration(event.getSuggestedConfigurationFile());
	syncConfig();
	SPIN_TIME=new DataParameter<Boolean>(spinID, DataSerializers.BOOLEAN);
	ForgeRegistries.ENCHANTMENTS.register(ench=new EnchantmentSpin().setRegistryName("rafradek_spin", "spin"));
	MinecraftForge.EVENT_BUS.register(this);
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:9,代码来源:SpinToWin.java

示例2: register

import net.minecraft.network.datasync.DataSerializers; //导入依赖的package包/类
public static void register()
{
	DataSerializers.registerSerializer(GENDER);
	DataSerializers.registerSerializer(TIGERTYPE);
	DataSerializers.registerSerializer(BEARTYPE);
	DataSerializers.registerSerializer(ELEPHANTTYPE);
	DataSerializers.registerSerializer(BOARTYPE);
	DataSerializers.registerSerializer(BIGCATTYPE);
}
 
开发者ID:Deadrik,项目名称:TFC2,代码行数:10,代码来源:DataSerializersTFC.java

示例3: registerDataSerializers

import net.minecraft.network.datasync.DataSerializers; //导入依赖的package包/类
public static void registerDataSerializers()
{
	DataSerializers.registerSerializer(HAUNTER_TRANSPARENCY);
	DataSerializers.registerSerializer(ZOMBIE_TYPE);
}
 
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:6,代码来源:ModDataSerializers.java

示例4: preInit

import net.minecraft.network.datasync.DataSerializers; //导入依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
	LOGGER = event.getModLog();
	PacketDispatcher.registerPackets();
	NetworkRegistry.INSTANCE.registerGuiHandler(this, new OverlordGuiHandler());
	config = new Configuration(event.getSuggestedConfigurationFile());
	config.load();
	HELMETDAMAGE_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.HELMETDAMAGE_NAME, ConfigValues.HELMETDAMAGE_DEFAULT, proxy.translateToLocal(ConfigValues.HELMETDAMAGE_NAME + ".tooltip"));
	GHOSTLYSKINS_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.GHOSTLYSKINS_NAME, ConfigValues.GHOSTLYSKINS_DEFAULT, proxy.translateToLocal(ConfigValues.GHOSTLYSKINS_NAME + ".tooltip"));
	SKINSUITNAMETAGS_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.SKINSUITNAMETAGS_NAME, ConfigValues.SKINSUITNAMETAGS_DEFAULT, proxy.translateToLocal(ConfigValues.SKINSUITNAMETAGS_NAME + ".tooltip"));
	HUNTCREEPERS_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.HUNTCREEPERS_NAME, ConfigValues.HUNTCREEPERS_DEFAULT, proxy.translateToLocal(ConfigValues.HUNTCREEPERS_NAME + ".tooltip"));
	SUFFOCATIONWARNING_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.SUFFOCATIONWARNING_NAME, ConfigValues.SUFFOCATIONWARNING_DEFAULT, proxy.translateToLocal(ConfigValues.SUFFOCATIONWARNING_NAME + ".tooltip"));
	BONEREQ_WARRIOR_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.BONEREQ_WARRIOR_NAME, ConfigValues.BONEREQ_WARRIOR_DEFAULT, proxy.translateToLocal(ConfigValues.BONEREQ_WARRIOR_NAME + ".tooltip"));
	BONEREQ_BABY_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.BONEREQ_BABY_NAME, ConfigValues.BONEREQ_BABY_DEFAULT, proxy.translateToLocal(ConfigValues.BONEREQ_BABY_NAME + ".tooltip"));
	MAXARROWDISTANCE_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.MAXARROWDISTANCE_NAME, ConfigValues.MAXARROWDISTANCE_DEFAULT, proxy.translateToLocal(ConfigValues.MAXARROWDISTANCE_NAME + ".tooltip"));
	TEAMHACK_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.TEAMHACK_NAME, ConfigValues.TEAMHACK_DEFAULT, proxy.translateToLocal(ConfigValues.TEAMHACK_NAME + ".tooltip"));
	XPOVERRIDE_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.XPOVERRIDE_NAME, ConfigValues.XPOVERRIDE_DEFAULT, proxy.translateToLocal(ConfigValues.XPOVERRIDE_NAME + ".tooltip"));
	FF_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.FF_NAME, ConfigValues.FF_DEFAULT, proxy.translateToLocal(ConfigValues.FF_NAME + ".tooltip"));
	BONEREQ_WARRIOR_PROPERTY.setMinValue(2);
	BONEREQ_BABY_PROPERTY.setMinValue(1);
	BONEREQ_WARRIOR_PROPERTY.setMaxValue(128);
	BONEREQ_BABY_PROPERTY.setMaxValue(64);
	MAXARROWDISTANCE_PROPERTY.setMinValue(2);
	MAXARROWDISTANCE_PROPERTY.setMaxValue(256);
	if (event.getSide().isClient()) {
		BONEREQ_WARRIOR_PROPERTY.setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
		BONEREQ_BABY_PROPERTY.setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
		MAXARROWDISTANCE_PROPERTY.setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
	}
	syncConfig();

	GameRegistry.registerTileEntity(TileEntitySkeletonMaker.class, "skeleton_maker");
	GameRegistry.registerTileEntity(TileEntityBabySkeletonMaker.class, "baby_skeleton_maker");
	int eid = -1;
	EntityRegistry.registerModEntity(new ResourceLocation(MODID + ":skeleton_warrior"), EntitySkeletonWarrior.class, "skeleton_warrior", ++eid, instance, 128, 2, false);
	EntityRegistry.registerModEntity(new ResourceLocation(MODID + ":skeleton_baby"), EntityBabySkeleton.class, "skeleton_baby", ++eid, instance, 64, 2, false);
	EntityRegistry.registerModEntity(new ResourceLocation(MODID + ":milk_bottle"), EntityMilkBottle.class, "milk_bottle", ++eid, instance, 32, 10, true);
	EntityRegistry.registerModEntity(new ResourceLocation(MODID + ":custom_xp_orb"), EntityCustomXPOrb.class, "custom_xp_orb", ++eid, instance, 16, 2, true);
	EntityRegistry.registerModEntity(new ResourceLocation(MODID + ":skeleton_converted"), EntityConvertedSkeleton.class, "skeleton_converted", ++eid, instance, 116, 2, false);
	EntityRegistry.registerModEntity(new ResourceLocation(MODID + ":skeleton_curing"), EntityCuringSkeleton.class, "skeleton_curing", ++eid, instance, 48, 2, false);
	proxy.registerClient();
	DataSerializers.registerSerializer(CustomDataSerializers.UNIQUE_ID);
	new CriterionRegistry();
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Overlord,代码行数:45,代码来源:Overlord.java

示例5: initialize

import net.minecraft.network.datasync.DataSerializers; //导入依赖的package包/类
public static void initialize()
{
	DataSerializers.registerSerializer(BLOCK_STATE_SERIALIZER);
	DataSerializers.registerSerializer(UUID_SERIALIZER);
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:6,代码来源:DataSerializerRegistry.java

示例6: registerDataSerializers

import net.minecraft.network.datasync.DataSerializers; //导入依赖的package包/类
public EntityRegistryEntry<E> registerDataSerializers(DataSerializer<?>... serializers) {
    for(DataSerializer<?> serializer : serializers) {
        DataSerializers.registerSerializer(serializer);
    }
    return this;
}
 
开发者ID:InfinityRaider,项目名称:InfinityLib,代码行数:7,代码来源:EntityRegistryEntry.java


注:本文中的net.minecraft.network.datasync.DataSerializers类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。