本文整理汇总了Java中ichun.common.core.network.ChannelHandler类的典型用法代码示例。如果您正苦于以下问题:Java ChannelHandler类的具体用法?Java ChannelHandler怎么用?Java ChannelHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChannelHandler类属于ichun.common.core.network包,在下文中一共展示了ChannelHandler类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initMod
import ichun.common.core.network.ChannelHandler; //导入依赖的package包/类
public void initMod()
{
EntityRegistry.registerModEntity(EntityBlock.class, "itfellfromthesky_block", 140, ItFellFromTheSky.instance, 160, 20, true);
EntityRegistry.registerModEntity(EntityMeteorite.class, "itfellfromthesky_meteorite", 141, ItFellFromTheSky.instance, 160, Integer.MAX_VALUE, true);
EntityRegistry.registerModEntity(EntityTransformer.class, "itfellfromthesky_transformer", 142, ItFellFromTheSky.instance, 160, 20, true);
EntityRegistry.registerModEntity(EntityPigzilla.class, "itfellfromthesky_pigzilla", 143, ItFellFromTheSky.instance, 160, 20, true);
// EntityRegistry.registerModEntity(EntityPigPart.class, "itfellfromthesky_pigpart", 144, ItFellFromTheSky.instance, 160, 20, true);
ItFellFromTheSky.creativeTabPorkchop = new CreativeTabItFellFromTheSky();
ItFellFromTheSky.blockCompactPorkchop = (new BlockCompactPorkchop()).setCreativeTab(ItFellFromTheSky.creativeTabPorkchop).setHardness(0.8F).setBlockName("compactPorkchop");
GameRegistry.registerBlock(ItFellFromTheSky.blockCompactPorkchop, ItemBlockCompactPorkchop.class, "compactPorkchop");
GameRegistry.addShapelessRecipe(new ItemStack(ItFellFromTheSky.blockCompactPorkchop, 1), Items.porkchop, Items.porkchop, Items.porkchop, Items.porkchop, Items.porkchop, Items.porkchop, Items.porkchop, Items.porkchop, Items.porkchop);
GameRegistry.addShapelessRecipe(new ItemStack(Items.porkchop, 9), ItFellFromTheSky.blockCompactPorkchop);
ItFellFromTheSky.channels = ChannelHandler.getChannelHandlers("ItFellFromTheSky", PacketMeteorSpawn.class, PacketKillMeteorite.class, PacketMeteoriteInfo.class, PacketRidePig.class);
}
示例2: initMod
import ichun.common.core.network.ChannelHandler; //导入依赖的package包/类
public void initMod()
{
Morph.parseBlacklist(Morph.config.getString("blacklistedMobs"));
Morph.parsePlayerList(Morph.config.getString("blackwhitelistedPlayers"));
Morph.channels = ChannelHandler.getChannelHandlers("Morph", PacketGuiInput.class, PacketMorphInfo.class, PacketSession.class, PacketMorphAcquisition.class, PacketCompleteDemorph.class, PacketMorphStates.class);
}
示例3: preLoad
import ichun.common.core.network.ChannelHandler; //导入依赖的package包/类
@EventHandler
public void preLoad(FMLPreInitializationEvent event)
{
config = ConfigHandler.createConfig(event.getSuggestedConfigurationFile(), "photoreal", "Photoreal", logger, instance);
if(FMLCommonHandler.instance().getEffectiveSide().isClient())
{
config.setCurrentCategory("clientOnly", "photoreal.config.cat.clientOnly.name", "photoreal.config.cat.clientOnly.comment");
config.createIntProperty("cameraFreq", "photoreal.config.prop.cameraFreq.name", "photoreal.config.prop.cameraFreq.comment", true, false, 20, 0, 20);
iChunUtil.proxy.registerMinecraftKeyBind(Minecraft.getMinecraft().gameSettings.keyBindAttack);
iChunUtil.proxy.registerMinecraftKeyBind(Minecraft.getMinecraft().gameSettings.keyBindUseItem);
}
config.setCurrentCategory("gameplay", "photoreal.config.cat.gameplay.name", "photoreal.config.cat.gameplay.comment");
config.createIntProperty("cameraRecharge", "photoreal.config.prop.cameraRecharge.name", "photoreal.config.prop.cameraRecharge.comment", true, false, 100, 0, Integer.MAX_VALUE);
config.createIntProperty("photorealDuration", "photoreal.config.prop.photorealDuration.name", "photoreal.config.prop.photorealDuration.comment", true, false, 400, 0, Integer.MAX_VALUE);
config.createIntProperty("cameraRarity", "photoreal.config.prop.cameraRarity.name", "photoreal.config.prop.cameraRarity.comment", false, false, 1, 0, 100);
MinecraftForge.EVENT_BUS.register(new photoreal.common.core.EventHandler());
proxy.initMod();
channels = ChannelHandler.getChannelHandlers("Photoreal", PacketTakeSnapshot.class);
ModVersionChecker.register_iChunMod(new ModVersionInfo("Photoreal", iChunUtil.versionOfMC, version, false));
FMLInterModComms.sendMessage("BackTools", "blacklist", new ItemStack(Photoreal.itemCamera, 1));
}