本文整理汇总了Java中cpw.mods.fml.common.Mod类的典型用法代码示例。如果您正苦于以下问题:Java Mod类的具体用法?Java Mod怎么用?Java Mod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Mod类属于cpw.mods.fml.common包,在下文中一共展示了Mod类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
Configurator.configure(new File("config/" + MODID + ".cfg"));
GameRegistry.registerWorldGenerator(new Decorator(), 4096);
FMLCommonHandler.instance().bus().register(this);
MinecraftForge.EVENT_BUS.register(this);
}
示例2: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
proxy.init(event);
ItemLoader.LoadItems();
//BlockLoader.loadBlocks();
Recipes.registerRecpies();
//EntityLoader.LoadEntitys();
//OreDict.addores();
Achievements.loadAchievements();
Stats.RegisterStats();
PlayerChecker.checkPlayer(username);
LootRegistry.registerLoot();
}
示例3: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
proxy.init(event);
// register CommonProxy as our GuiHandler
NetworkRegistry.INSTANCE.registerGuiHandler(MODID, new CommonProxy());
ItemLoader.LoadItems();
BlockLoader.loadBlocks();
Recipes.registerRecpies();
EntityLoader.LoadEntitys();
OreDict.addores();
//Achievements.loadAchievements();
//Stats.RegisterStats();
GameRegistry.registerWorldGenerator(new ModWorldGen(), 0);
}
示例4: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
proxy.init(event);
ItemLoader.LoadItems();
BlockLoader.loadBlocks();
Recipes.registerRecpies();
EntityLoader.LoadEntitys();
OreDict.addores();
Achievements.loadAchievements();
Stats.RegisterStats();
EntityRegistry.registerModEntity(EntityGiantSnowBall.class, "GiantSnowBall", EntityRegistry.findGlobalUniqueEntityId(), MODID, 80, 3, true);
proxy.registerRenderThings();
GameRegistry.registerTileEntity(TileEntityBulb.class, "Bulb");
TileEntity.addMapping(TileEntityBulb.class, "Bulb_Mapping");
BulbModelID = 72;
}
示例5: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
proxy.registerNetworkStuff();
NetworkRegistry.INSTANCE.registerGuiHandler(this, new TechnicalGuiHandler());
TechnicalItem.removeVanillaRecipes();
Recipes.init();
FMLCommonHandler.instance().bus().register(new EventListener());
radioactivityPotion = (new PotionTechnical(radioactivityPotionId, true, 0)).setIconIndex(0, 0).setPotionName("potion.radioactivityPotion");
TechnicalAchievement.init();
AchievementPage.registerAchievementPage(technicalAchievementPage);
}
示例6: onInit
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void onInit(FMLInitializationEvent e){
/*
REGISTERS ALL COMMON THINGS SO FOR BOTH SERVER AND CLIENT...
*/
LOTRAddonsItems.registerRings();
LOTRAddonsBlocks.registerBlocks();
LOTRAddonsEntities.registerEntities();
NetworkRegistry.INSTANCE.registerGuiHandler(LOTRAddons.lotrAddons, new GuiHandler());
}
示例7: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
/**
* This is the second pass of logic in this mod.
*/
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
InitEvent e;
e = new InitEvent();
e.Go(event);
}
示例8: postInit
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
{
//Thread.currentThread().setName("EpicProportionsMod");
MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerChocolate));
MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerForJen));
MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerLove));
MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerPinkHeart));
MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerRainbow));
MinecraftForge.EVENT_BUS.register(new WorldGenModFlower(BlockLoader.blockFlowerRedHeart));
MinecraftForge.EVENT_BUS.register(new CustomPresentDrops());
MinecraftForge.EVENT_BUS.register(new VersionChecker());
MinecraftForge.EVENT_BUS.register(new CommandModInfo());
//MinecraftForge.EVENT_BUS.register(new PotionLoader(33, false, 8171462));
//MinecraftForge.EVENT_BUS.register(new PotionLoader(33, false, 8171462));
MinecraftForge.EVENT_BUS.register(new WorldGenPumpkin_Pat());
MinecraftForge.EVENT_BUS.register(new WorldGenPumpkin_Jen());
MinecraftForge.EVENT_BUS.register(new StructureVillagePieces());
//MinecraftForge.EVENT_BUS.register(new Yggdrasil());
MinecraftForge.EVENT_BUS.register(new LogHelper());
//MinecraftForge.EVENT_BUS.register(new CommandModInfo());
//MinecraftForge.EVENT_BUS.register(new BiomeGenPat(getBIOME_ID_PAT()));
//MinecraftForge.EVENT_BUS.register(new BiomeGenJen(getBIOME_ID_JEN()));
//MinecraftForge.EVENT_BUS.register(new WorldProviderEpicProportions());
//MinecraftForge.EVENT_BUS.register(new EpicProportionsBiomes(ENTITY_ID_0, null));
//MinecraftForge.EVENT_BUS.register(new RenderGuiHandler());
//MinecraftForge.ORE_GEN_BUS.register(new BiomeDecorator());
Recipes.registerRecpies();
MinecraftForge.EVENT_BUS.register(new CommandChangelog());
//MUhTTawz.maAzeRcL();
}
}
示例9: serverStart
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
@SideOnly(Side.SERVER)
public void serverStart(FMLServerStartingEvent event)
{
if (INSTANCE == null) INSTANCE = this;
if (SERVER == null) SERVER = event.getServer();
if (COMMAND == null) COMMAND = new WBCommand();
// Load (or create new) config files
Config.load(false);
// our one real command, though it does also have aliases "wb" and "worldborder"
event.registerServerCommand(COMMAND);
if ( Config.preventBlockPlace() )
enableBlockPlaceListener(true);
if ( Config.preventMobSpawn() )
enableMobSpawnListener(true);
if ( Config.getDenyEnderpearl() )
enableEnderPearlListener(true);
DynMapFeatures.registerListener();
}
示例10: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
//Load Mod Items
ModItems.init();
//Load Mod Blocks
ModBlocks.init();
//Load Mod Recipes
ModRecipes.init();
//Register Renders on client side
proxy.initRenders();
//Register GuiHandler
NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler());
//Register Mod Compat
CompatHandler.init(event);
//Register Leave drops
MinecraftForge.EVENT_BUS.register(EventDrops.instancemain);
//Register Mod World Gen
ModWorldGen.init();
}
示例11: init
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
registrant = new Registrant(32);
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
}
示例12: preInit
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
log = event.getModLog();
FMLCommonHandler.instance().bus().register(EventHandlers.I);
MinecraftForge.EVENT_BUS.register(EventHandlers.I);
cfg = new Configuration(event.getSuggestedConfigurationFile());
doConfig(cfg);
if (TFCTweaksLoadingPlugin.DISABLE_ASM)
{
log.warn("********************************************************************************************");
log.warn(" You have disabled ASM tweaks. All FluidHacks have been disabled.");
log.warn("Please don't include this in your pack config. This is to be considered a DEBUG option only!");
log.warn("********************************************************************************************");
}
else
{
FluidHacks.doTheMagic();
}
}
示例13: serverStarted
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
try
{
FileUtils.writeStringToFile(new File(DimensionManager.getCurrentSaveRootDirectory(), "seed.txt"), String.valueOf(DimensionManager.getWorld(0).getSeed()));
WorldExplorer.jsonFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "WorldExplorer.json");
}
catch (IOException e)
{
e.printStackTrace();
}
if (autoPregen_enabled && !WorldExplorer.jsonFile.exists())
{
ChunkCoordinates spawn = MinecraftServer.getServer().worldServers[0].getSpawnPoint();
WorldExplorer.start(MinecraftServer.getServer(), spawn.posX >> 4, spawn.posZ >> 4, autoPregen_size / 16);
}
}
示例14: postInit
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
void postInit(FMLPostInitializationEvent event) {
if (Loader.isModLoaded("EE3")) {
Stopwatch watch = Stopwatch.createStarted();
AELog.info("Post Initialization ( started )");
RegisterCrafting.initRecipes();
RegisterFurnace.initRecipes();
RegisterFacade.initRecipes();
RegisterGrinder.initRecipes();
RegisterInscriber.initRecipes();
RegisterWorld.initRecipes();
//RecipeRegistryProxy.dumpRecipeRegistryToLog();
AELog.info("Post Initialization ( ended after " + watch.elapsed(TimeUnit.MILLISECONDS) + "ms )");
}
}
示例15: preInit
import cpw.mods.fml.common.Mod; //导入依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
Tab.init();
Base.init();
Config.init(event.getSuggestedConfigurationFile());
FMLCommonHandler.instance().bus().register(new Config());
ItemStackHolderInjector.INSTANCE.inject();
if (Loader.isModLoaded("Botania"))
{
Botania.preInit();
}
if (Loader.isModLoaded("ThermalExpansion"))
{
TE_Intergration.preInit();
}
LogHelper.info("Pre Initialization Complete");
}