Java 类net.minecraft.network.datasync.DataSerializers 实例源码

项目:Mods    文件:SpinToWin.java   
@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);
}
项目:TFC2    文件:DataSerializersTFC.java   
public static void register()
{
    DataSerializers.registerSerializer(GENDER);
    DataSerializers.registerSerializer(TIGERTYPE);
    DataSerializers.registerSerializer(BEARTYPE);
    DataSerializers.registerSerializer(ELEPHANTTYPE);
    DataSerializers.registerSerializer(BOARTYPE);
    DataSerializers.registerSerializer(BIGCATTYPE);
}
项目:TFC2    文件:DataSerializersTFC.java   
public static void register()
{
    DataSerializers.registerSerializer(GENDER);
    DataSerializers.registerSerializer(TIGERTYPE);
    DataSerializers.registerSerializer(BEARTYPE);
    DataSerializers.registerSerializer(ELEPHANTTYPE);
    DataSerializers.registerSerializer(BOARTYPE);
    DataSerializers.registerSerializer(BIGCATTYPE);
}
项目:Halloween    文件:ModDataSerializers.java   
public static void registerDataSerializers()
{
    DataSerializers.registerSerializer(HAUNTER_TRANSPARENCY);
    DataSerializers.registerSerializer(ZOMBIE_TYPE);
}
项目:Overlord    文件:Overlord.java   
@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();
}
项目:Aether-Legacy    文件:DataSerializerRegistry.java   
public static void initialize()
{
    DataSerializers.registerSerializer(BLOCK_STATE_SERIALIZER);
    DataSerializers.registerSerializer(UUID_SERIALIZER);
}
项目:InfinityLib    文件:EntityRegistryEntry.java   
public EntityRegistryEntry<E> registerDataSerializers(DataSerializer<?>... serializers) {
    for(DataSerializer<?> serializer : serializers) {
        DataSerializers.registerSerializer(serializer);
    }
    return this;
}