本文整理匯總了Java中cpw.mods.fml.common.event.FMLPostInitializationEvent類的典型用法代碼示例。如果您正苦於以下問題:Java FMLPostInitializationEvent類的具體用法?Java FMLPostInitializationEvent怎麽用?Java FMLPostInitializationEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FMLPostInitializationEvent類屬於cpw.mods.fml.common.event包,在下文中一共展示了FMLPostInitializationEvent類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
Items.blaze_rod.setFull3D();
Blocks.trapped_chest.setCreativeTab(CreativeTabs.tabRedstone);
if (enableUpdatedFoodValues) {
setFinalField(ItemFood.class, Items.carrot, 3, "healAmount", "field_77853_b");
setFinalField(ItemFood.class, Items.baked_potato, 5, "healAmount", "field_77853_b");
}
if (enableUpdatedHarvestLevels) {
Blocks.packed_ice.setHarvestLevel("pickaxe", 0);
Blocks.ladder.setHarvestLevel("axe", 0);
Blocks.melon_block.setHarvestLevel("axe", 0);
}
}
示例2: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@Override
public void postInit(FMLPostInitializationEvent event)
{
ClientProxyCore.registerInventoryTabs();
ClientProxyCore.registerEntityRenderers();
ClientProxyCore.registerItemRenderers();
MinecraftForge.EVENT_BUS.register(new TabRegistry());
//ClientProxyCore.playerList = GLAllocation.generateDisplayLists(1);
if (Loader.isModLoaded("craftguide"))
CraftGuideIntegration.register();
try {
Field ftc = Minecraft.getMinecraft().getClass().getDeclaredField(VersionUtil.getNameDynamic(VersionUtil.KEY_FIELD_MUSICTICKER));
ftc.setAccessible(true);
ftc.set(Minecraft.getMinecraft(), new MusicTickerGC(Minecraft.getMinecraft()));
} catch (Exception e) {e.printStackTrace();}
}
示例3: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
SpaceLog.severe("Post-Init");
createCreativeTabs();
try {
initMusic();
} catch(NoSuchMethodError e) {
// e.printStackTrace();
}
for (ICoreModule module : modulesList) {
module.loadRecipes();
}
proxy.postInit(event);
}
示例4: Go
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
public void Go(FMLPostInitializationEvent event)
{
LogHelper.info("BIGB post initialization started");
MinecraftCompat.Go();
Recipes.RegisterAll();
LogHelper.info("BIGB has detected " + Util.GetNumberOfBlocks() + " blocks");
LogHelper.info("BIGB has detected " + Util.GetNumberOfItems() + " items");
Recipes.ListAllRecipes();
LogHelper.info("BIGB has detected " + Util.GetNumberOfRecipes() + " recipes");
CompatModuleManager.PostInitAll();
Util.LogAllEntities();
Util.LogAllModsAcive();
ClientProxy a = new ClientProxy();
//a.CheckForUpdates();
Util.MassChangeStackSizesForAllNormalItemsAndBlocks(ModConfig.ChangeAllStackSizesToX());
LogHelper.info("BIGB post initialization done");
}
示例5: postinit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@EventHandler
public void postinit(FMLPostInitializationEvent event) {
blocks.postinit(event);
items.postinit(event);
achievements.postinit(event);
registerRecipieSorter();
MekanismPlugin.load();
RMLog.info("Registered " + Register.getRegisteredBlocks() + " block(s)");
RMLog.info("Registered " + Register.getRegisteredItems() + " item(s)");
RMLog.info("Registered " + Register.getRegisteredTileEntities() + " tile entity(s)");
RMLog.info("Registered " + Register.getRegisteredEntities() + " entity(s)");
RMLog.info("Registered " + Register.getRegisteredRecipies() + " recipie(s)");
RMLog.info("Registered " + Register.getRegisteredEvents() + " event(s)");
RMLog.info("Registered " + PacketDispatcher.getPacketId() + " packet(s)");
Thread check = new Thread(versionCheker, RorysGlobal.MODID + " Version Check");
check.start();
}
示例6: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的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();
}
}
示例7: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的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 )");
}
}
示例8: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
ModHelperManager.postInit();
BeeManager.lateBeeInit();
this.guiHandler = new GUIHandler();
NetworkRegistry.INSTANCE.registerGuiHandler(this, this.guiHandler);
proxy.registerRenderers();
this.modConfig.saveConfigs();
CraftingManager.setupCrafting();
CraftingManager.registerLiquidContainers();
VersionInfo.doVersionCheck();
LogHelper.info("Postinit completed");
}
示例9: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
public static void postInit(FMLPostInitializationEvent event) {
MinecraftForge.EVENT_BUS.register(new BaseEE3());
addOre("ingotCopper", 128);
addOre("ingotSilver", 1024);
addOre("ingotTin", 256);
addOre("ingotLead", 256);
addOre("dustSteel", 512);
addOre("ingotRefinedIron", 512);
addOre("dustCoal", 32);
addOre("dustDiamond", 8192);
addOre("dustSulfur", 32);
addOre("dustLead", 256);
addOre("ingotBronze", 256);
addOre("ingotElectrum", 2052);
addOre("dustLapis", 864);
addOre("dustSilver", 1024);
addOre("dustTin", 256);
}
示例10: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent evt) {
try {
proxy.postInit(evt);
nativeConverters.stream().forEachOrdered(forgeLoadable -> forgeLoadable.postInit(evt));
Game.recipes().init();
ProgressManager.ProgressBar progressBar = ProgressManager.push("Post-initializing NOVA wrappers", (novaModWrappers.isEmpty() ? 1 : novaModWrappers.size()) + novaWrappers.size());
FMLProgressBar fmlProgressBar = new FMLProgressBar(progressBar);
novaModWrappers.stream().forEachOrdered(wrapper -> {
fmlProgressBar.step(wrapper.getClass());
wrapper.postInit(evt);
});
novaWrappers.stream().forEachOrdered(wrapper -> {
fmlProgressBar.step(wrapper.getClass());
wrapper.postInit(evt);
});
fmlProgressBar.finish();
ProgressManager.pop(progressBar);
} catch (Exception e) {
Game.logger().error("Error during postInit", e);
e.printStackTrace();
throw new InitializationException(e);
}
}
示例11: postinit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@EventHandler
public void postinit(FMLPostInitializationEvent event){
File file = new File("Diagnostics");
if(!file.exists())
file.mkdir();
try{
File potions = new File(file.getAbsolutePath() + File.separator + "Potions.txt");
if(!potions.exists())
potions.createNewFile();
PrintStream potionOut = new PrintStream(potions);
for(int i = 0; i < Potion.potionTypes.length; i++)
if(Potion.potionTypes[i] == null)
potionOut.println(i + ": null");
else
potionOut.println(i + ": " + Potion.potionTypes[i].getClass() + ", " + Potion.potionTypes[i].getName());
}
catch(Throwable th){
System.err.println("Potions error: " + th);
}
}
示例12: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
if(FuelHandler.BCPresent() && BuildcraftFuelRegistry.fuel != null)
{
for(IFuel s : BuildcraftFuelRegistry.fuel.getFuels())
{
if(!(s.getFluid() == null || GasRegistry.containsGas(s.getFluid().getName())))
{
GasRegistry.register(new Gas(s.getFluid()));
}
}
BuildcraftFuelRegistry.fuel.addFuel(FluidRegistry.getFluid("ethene"), (int)(240 * general.TO_TE), 40 * FluidContainerRegistry.BUCKET_VOLUME);
}
for(ItemStack ore : OreDictionary.getOres("dustGold"))
{
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 10, MekanismUtils.size(ore, 4), GeneratorsItems.Hohlraum.getEmptyItem());
}
}
示例13: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@Override
public void postInit(FMLPostInitializationEvent event) {
byte[] defaultBIOSImage = null;
IResourceManager rm = Minecraft.getMinecraft().getResourceManager();
try {
IResource res = rm.getResource(new ResourceLocation("ocmos", "ocmosbios.cabe"));
InputStream stream = res.getInputStream();
byte[] buf = new byte[4096];
int len = stream.read(buf);
if(len <= 6)
MainClass.logger.error("ocmosbios.cabe is too small to possibly be valid");
else {
defaultBIOSImage = Arrays.copyOf(buf, len);
MainClass.logger.info("Found ocmosbios.cabe");
}
}
catch(IOException e) {
MainClass.logger.error("IOException while loading ocmosbios.cabe", e);
}
if(defaultBIOSImage != null) {
MainClass.setDefaultBIOSImage(defaultBIOSImage);
Items.registerEEPROM("EEPROM (OCMOS BIOS)", defaultBIOSImage, null, false);
// TODO: Get this to work some day, behind a config option
/*
ItemStack stack = new ItemStack(Items.get("eeprom").item());
NBTTagCompound compound = new NBTTagCompound();
compound.setByteArray("oc:eeprom", defaultBIOSImage);
compound.setString("oc:label", "EEPROM (OCMOS BIOS)");
stack.setTagCompound(compound);
GameRegistry.addShapelessRecipe(stack, Items.get("eeprom").item(), net.minecraft.init.Items.feather);
*/
}
}
示例14: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@Override
public void postInit(FMLPostInitializationEvent event) {
for (int meta = 0; meta < 6; meta++) {
OreDictionary.registerOre("oreInfused" + TOBlocks.primalNames[meta],
new ItemStack(TOBlocks.netherrackInfusedOre, 1, meta));
OreDictionary.registerOre("oreInfused" + TOBlocks.primalNames[meta],
new ItemStack(TOBlocks.bedrockInfusedOre, 1, meta));
OreDictionary.registerOre("oreInfused" + TOBlocks.primalNames[meta],
new ItemStack(TOBlocks.endstoneInfusedOre, 1, meta));
}
}
示例15: postInit
import cpw.mods.fml.common.event.FMLPostInitializationEvent; //導入依賴的package包/類
@Override
public void postInit(FMLPostInitializationEvent event) {
initRecipes();
for (int meta = 0; meta < 6; meta++) {
addClusterAspect(primals[meta], meta);
addInfusedOreAspect((BlockInfusedBlockOre) TOBlocks.netherrackInfusedOre, primals[meta], meta);
addInfusedOreAspect((BlockInfusedBlockOre) TOBlocks.bedrockInfusedOre, primals[meta], meta);
addInfusedOreAspect((BlockInfusedBlockOre) TOBlocks.endstoneInfusedOre, primals[meta], meta);
}
addInsusedOreWandEvent((BlockInfusedBlockOre) TOBlocks.netherrackInfusedOre);
addInsusedOreWandEvent((BlockInfusedBlockOre) TOBlocks.bedrockInfusedOre);
addInsusedOreWandEvent((BlockInfusedBlockOre) TOBlocks.endstoneInfusedOre);
registerResearches();
}