本文整理匯總了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);
}