本文整理汇总了Java中net.minecraftforge.fml.common.Mod.EventHandler方法的典型用法代码示例。如果您正苦于以下问题:Java Mod.EventHandler方法的具体用法?Java Mod.EventHandler怎么用?Java Mod.EventHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fml.common.Mod
的用法示例。
在下文中一共展示了Mod.EventHandler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
CapabilityExtendedHealthSystem.register();
int i = 0;
NETWORKING = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
NETWORKING.registerMessage(MessageReceiveDamage.Handler.class, MessageReceiveDamage.class, ++i, Side.CLIENT);
NETWORKING.registerMessage(MessageApplyHealingItem.Handler.class, MessageApplyHealingItem.class, ++i , Side.SERVER);
NETWORKING.registerMessage(MessageReceiveConfiguration.Handler.class, MessageReceiveConfiguration.class, ++i, Side.CLIENT);
NETWORKING.registerMessage(MessageApplyAbsorption.Handler.class, MessageApplyAbsorption.class, ++i, Side.CLIENT);
NETWORKING.registerMessage(MessageAddHealth.Handler.class, MessageAddHealth.class, ++i, Side.CLIENT);
NETWORKING.registerMessage(MessagePlayHurtSound.Handler.class, MessagePlayHurtSound.class, ++i, Side.CLIENT);
NETWORKING.registerMessage(MessageClientUpdate.Handler.class, MessageClientUpdate.class, ++i, Side.SERVER);
NETWORKING.registerMessage(MessageResync.Handler.class, MessageResync.class, ++i, Side.CLIENT);
MessageReceiveConfiguration.validate();
if (Loader.isModLoaded("morpheus")) {
enableMorpheusCompat = true;
logger.info("Morpheus present - enabling compatibility module");
MorpheusHelper.register();
}
RegistryManager.registerDefaults();
checkEarlyExit();
}
示例2: preInit
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
/**
* Run before anything else. Read your config, create blocks, items, etc, and
* register them with the GameRegistry.
*/
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e) {
logger = e.getModLog();
creativeTab = new CompatCreativeTabs("lector") {
@Override
protected Item getItem() {
return ModItems.manual;
}
};
this.proxy.preInit(e);
}
示例3: preInit
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e) {
// register block
GameRegistry.register(blockXPBox = new BlockXPBox());
ItemBlock item = new ItemBlock(blockXPBox);
GameRegistry.register(item, blockXPBox.getRegistryName());
proxy.registerItemRenderer(item);
// init network
PacketHandler.init();
}
示例4: imcCallback
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void imcCallback(FMLInterModComms.IMCEvent event) {
for (FMLInterModComms.IMCMessage message : event.getMessages()) {
if (message.key.equalsIgnoreCase("getTheWheel")) {
Optional<Function<IInteractionWheel, Void>> value = message.getFunctionValue(IInteractionWheel.class, Void.class);
if (value.isPresent()) {
value.get().apply(interactionWheelImp);
} else {
logger.warn("Some mod didn't return a valid result with getTheWheel!");
}
}
}
}
示例5: init
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
instance = this;
proxy.init();
proxy.registerAnimations();
AnimationNetworkHandler.init();
if(FMLCommonHandler.instance().getEffectiveSide().isClient()) {
EventHandlerDebug eventHandlerDebug = new EventHandlerDebug();
MinecraftForge.EVENT_BUS.register(eventHandlerDebug);
FMLCommonHandler.instance().bus().register(eventHandlerDebug);
}
}
示例6: preInit
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e)
{
if (!CreeperHost.instance.active)
return;
MinecraftForge.EVENT_BUS.register(this);
logger = e.getModLog();
setupPlayerKicker();
}
示例7: init
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
logger.info("Start mod :)");
}
开发者ID:Kubithorg,项目名称:KubidibotsStreamDownloaderFromYoutubeAndDisplayerThanksToAForgeMod,代码行数:5,代码来源:Streamer.java
示例8: postInit
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent e) {
proxy.postInit(e);
}
示例9: init
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
proxy.init(event);
}
示例10: postInit
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
proxy.postInit(event);
}
示例11: init
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
proxy.init();
}
示例12: postInit
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
proxy.postInit(event);
}
示例13: serverLoad
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void serverLoad(FMLServerStartingEvent event) {
event.registerServerCommand(new CommandTestApi());
event.registerServerCommand(new CommandClearActions());
event.registerServerCommand(new CommandListActions());
}
示例14: init
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event){ }
示例15: init
import net.minecraftforge.fml.common.Mod; //导入方法依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
proxy.init(event);
}