Viper283
-
Posts
118 -
Joined
-
Last visited
Posts posted by Viper283
-
-
-snip-
it may be a copy of forges version, but it works in the exact same way, and can be used in the same manner, i only copied the code so that i can edit the file how i want, without making any changes to forge and vanilla code
-
check my github for config files, look at GenConfig and FMAConfiguration
-
try using
LanguageRegistry.instance().addStringLocalization("tile.first", "first")
-
or you use
cfg.getBlock("your comment", defaultValue),getInt();
-
check how i do it on my github
-
I would like to add sticks to the list of items that leaves drop when broken, but i want to keep the mod a true forge mod (not editing base files, for those who don't know is this even possible?
Thanks for reading
-----------------------
viper283
-
can you show some of your code (around line 445, in mod_DatMod.java) as that line is mentioned in the error log
-
if your modding on mac, make a .sh file with the following contents
#!/bin/bash python runtime/recompile.py "$@" python runtime/getchangedsrc.py "$@" python runtime/reobfuscate.py "$@"
if your modding on windows make a .bat with the following contents
@echo off runtime\bin\python\python_mcp runtime\recompile.py %* runtime\bin\python\python_mcp runtime\getchangedsrc.py %* runtime\bin\python\python_mcp runtime\reobfuscate.py %* pause
this just makes it easier to distribute and you only have to run one file instead of 3
-
if i remember correctly you can use FMLCommonHandler.getMinecraftInstance() to get it working, i haven't coded for a couple of weeks and have not used the latest version of forge, if it does not work then disregard this post
-
Use the getTextureFromSideAndMetadata
thanks
-
i have had the same problem before, the only crash report is that java has ran out of heap space
it only crashes when trying to load a world, and it only crashes with this block
if i remove the getTextureFromSide(int side) method it works, should i used getBlockTextureFromSideAndMetadata(int side, int meta)
the code i have used is as follows
/******************************************************************************* * Copyright (c) 2012 Alchemist'. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html * * Contributors: * Viper283 * Jamesc554544 * Alchemist ******************************************************************************/ package fma; import net.minecraft.src.Block; import net.minecraft.src.Material; /** * @author viper283 * */ public class ModBlocks { public static Block chalk; public static Block meta; public static Block crate; public static void initBlock() { chalk = new BlockChalk(ModIds.chalk, 5).setBlockName("chalk"); meta = new FMAMetaBlock(ModIds.meta, Material.rock); crate = new BlockCrate(ModIds.crate, 3).setBlockName("crate"); } }
and for the block class
/******************************************************************************* * Copyright (c) 2012 Alchemist'. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html * * Contributors: * Viper283 * Jamesc554544 * Alchemist ******************************************************************************/ package fma; import net.minecraft.src.Block; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Material; /** * @author viper283 * */ public class BlockCrate extends Block { /** * @param par1 * @param par2 */ public BlockCrate(int par1, int par2) { super(par1, par2, Material.wood); this.setCreativeTab(CreativeTabs.tabDeco); // TODO Auto-generated constructor stub } @Override public String getTextureFile() { return Resources.blockTextures; } @Override public int getBlockTextureFromSide(int side) { if(side == 1 || side == 5) { return 4; } return 3; } }
-
if i load with 1gb it crashes explorer, if i load with 2gb it gives me the out of memory crash report
-
what i meant was that explorer crashes, dunno why, but i got past that now, i did have 1gb allocated but then i allocated 2gb and it gave me the out of memory crash, it only happens through eclipse
-
i am trying to test through eclipse not through the minecraft launcher but if you mean test my mod without forge through eclipse, i can't my mod heavily requires forge
-
I try to test my mod through eclipse but evertime i try to load a world i crash, there is nothing in the crash log because i have to terminate minecraft or my whole system crashes, if you need anything to help solve this issue i will be more than happy to give it to you
I am using java 7 update 7 (including jdk)
i have Eclpise 4.2 juno classic
I have the latest version of forge
i have made no base edits other than a way to render my new type of brew stand (i edited the renderblocks file) (no longer being modified)
I HAVE FOUND THE CRASH REPORT. it says it it out of memory but i have allocated 2gb to java
I am not the only one who gets this, my friend james(another coder in my mod) also has the same crash, he has tried the same things as me and he still crashes
-
try putting the recipe in the CustomFurnaceRecipes class like with a normal furnace
-
@instance("yourmod"), should fix it, i had the same problem but cpw fixed it on buildcraft
-
you can view my current dimension code on my github at http://github.com/viper283/FullmetalAlchemy
it's not done yet, need to find a way to get it to change from Teleporter to AmestrisTeleporter but i can't find any code on it atm
-
Found the 'var6' he was on about, it was EntityPlayer and MinecraftServer, you can't use the methods he's on about because they are not static, i would make them static but i do not want to edit base files. does anyone know a different way to make it use my teleporter class and not the default one
-
What do i put in my onEntityCollidedWithBlock because there is not a 'var6' anywhere in that method
-
In your @Mod file, in your load method, you can start with registering your dimension:
DimensionManager.registerProviderType(DimensionID 1 = overworld 0 = nether -1 = end or something, YourWorldProvider.class, shouldAlwaysbeLoaded true/false);
DimensionManager.registerDimension(DimensionID, DimensionID);
For your worldprovider class just copy worldproviderhell and change a few things, you also have to make a new chunkprovider, worldchunkmanager, your portal block, how it starts, your teleporter. i think that's it. Just see in the already existing files how minecraft did it, and in your portalblock class, in the onEntityCollidedWithBlock method use this:
var6.timeUntilPortal = 10;
var6.mcServer.getConfigurationManager().transferPlayerToDimension(var6, DimensionID, new YourTeleporter());
For teleporting to your dimension. I think that should work for you
i copied the BlockPortal class renamed it and changed the blocks to mine but i can't find the var6 your talking about.
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { if(par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null) { par5Entity.setInPortal(); } }
-
thanks i'll use that method insead of DimensionAPI as it doesn't work very well atm
-
Thanks to cpw and the @Instance commit he did on buildcraft i fixed it
i am working on 3 mods in my eclipse workspace and when ever i try to run minecraft i get the following error:
i am getting this error in 3 different versions of minecraft forge (i have tried the latest but i still get this error)
Forge-ModLoader-Client-0.log
2012-08-29 13:57:14 [iNFO] [ForgeModLoader] Forge Mod Loader version 3.0.160.340 for Minecraft client:1.3.2, server:1.3.2 loading
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] All core mods are successfully located
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Discovering coremods
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Found library file argo-2.25.jar present and correct in lib dir
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Found library file guava-12.0.1.jar present and correct in lib dir
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Found library file asm-all-4.0.jar present and correct in lib dir
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Running coremod plugins
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Running coremod plugin FMLCorePlugin
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Coremod plugin FMLCorePlugin run successfully
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Running coremod plugin FMLForgePlugin
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Coremod plugin FMLForgePlugin run successfully
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Validating minecraft
2012-08-29 13:57:14 [FINEST] [ForgeModLoader] Minecraft validated, launching...
2012-08-29 13:57:16 [iNFO] [sTDOUT] 27 achievements
2012-08-29 13:57:16 [iNFO] [sTDOUT] 195 recipes
2012-08-29 13:57:16 [iNFO] [sTDOUT] Setting user: Player273, -
2012-08-29 13:57:16 [iNFO] [sTDERR] Client asked for parameter: server
2012-08-29 13:57:16 [iNFO] [sTDOUT] LWJGL Version: 2.8.3
2012-08-29 13:57:17 [iNFO] [ForgeModLoader] Attempting early MinecraftForge initialization
2012-08-29 13:57:17 [iNFO] [ForgeModLoader] Completed early MinecraftForge initialization
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Building injected Mod Containers [cpw.mods.fml.common.FMLDummyContainer, net.minecraftforge.common.ForgeDummyContainer]
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Attempting to load mods contained in the minecraft jar file and associated classes
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Found a minecraft related directory at C:\Users\Zach\Desktop\mcp72\eclipse\Minecraft\bin, examining for mod candidates
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\jars\bin\jinput.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\jars\bin\lwjgl_util.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\jars\bin\lwjgl.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Found a minecraft related file at C:\Users\Zach\Desktop\mcp72\jars\bin\minecraft.jar, examining for mod candidates
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\lib\argo-2.25.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\lib\asm-all-4.0.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\lib\guava-12.0.1.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\jars\lib\argo-2.25.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\jars\lib\guava-12.0.1.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Skipping known library file C:\Users\Zach\Desktop\mcp72\jars\lib\asm-all-4.0.jar
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Minecraft jar mods loaded successfully
2012-08-29 13:57:17 [iNFO] [ForgeModLoader] Searching C:\Users\Zach\Desktop\mcp72\jars\mods for mods
2012-08-29 13:57:17 [FINE] [ForgeModLoader] Examining directory bin for potential mods
2012-08-29 13:57:17 [iNFO] [ForgeModLoader] No mcmod.info file found in directory bin
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package armor
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.client
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.client.modloader
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.client.registry
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.asm
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.asm.transformers
2012-08-29 13:57:17 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.discovery
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.discovery.asm
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.event
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.functions
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.modloader
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.network
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.registry
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.toposort
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.common.versioning
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.relauncher
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package cpw.mods.fml.server
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package ibxm
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package mine
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package mine.net
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package mine.net.client
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package mine.net.common
2012-08-29 13:57:18 [FINE] [ForgeModLoader] Identified a FMLMod type mod mine.net.common.ProjectMinePlus
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Parsed dependency info : [] [] []
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package mineplus
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package mineplus.gui
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package mineplus.unsorted textures
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package net
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package net.minecraft
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package net.minecraft.client
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package net.minecraft.server
2012-08-29 13:57:18 [FINEST] [ForgeModLoader] Recursing into package net.minecraft.src
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.classloading
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.client
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.client.event
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.client.event.sound
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.common
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.event
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.event.entity
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.event.entity.living
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.event.entity.minecart
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.event.entity.player
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.event.world
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.oredict
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package net.minecraftforge.transformers
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.asn1
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.asn1.bc
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.asn1.pkcs
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.crypto
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.crypto.engines
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.crypto.io
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.crypto.modes
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.crypto.params
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.jcajce
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.jcajce.provider
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.jcajce.provider.config
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.jcajce.provider.util
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.jce
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.jce.provider
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package org.bouncycastle.util
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package paulscode
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package paulscode.sound
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package paulscode.sound.codecs
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.core
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.core.client
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Identified a FMLMod type mod viper283.core.ViperCore
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Parsed dependency info : [] [] []
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.mods
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.mods.fma
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.mods.fma.client
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Identified a FMLMod type mod viper283.mods.fma.FullmetalAlchemy
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Parsed dependency info : [] [] []
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.mods.fma.handlers
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.mods.fma.interfaces
2012-08-29 13:57:19 [FINEST] [ForgeModLoader] Recursing into package viper283.mods.fma.tex
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Examining file minecraft.jar for potential mods
2012-08-29 13:57:19 [iNFO] [ForgeModLoader] The mod container minecraft.jar appears to be missing an mcmod.info file
2012-08-29 13:57:19 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Received a system property request ''
2012-08-29 13:57:19 [FINE] [ForgeModLoader] System property request managing the state of 0 mods
2012-08-29 13:57:19 [FINE] [ForgeModLoader] After merging, found state information for 0 mods
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Activating mod FML
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Activating mod Forge
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Enabling mod MinePlus
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Activating mod MinePlus
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Enabling mod CodeViperCore
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Activating mod CodeViperCore
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Enabling mod FullmetalAlchemy
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Activating mod FullmetalAlchemy
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Verifying mod requirements are satisfied
2012-08-29 13:57:19 [FINE] [ForgeModLoader] All mod requirements are satisfied
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Sorting mods into an ordered list
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Mod sorting completed successfully
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Mod sorting data:
2012-08-29 13:57:19 [FINE] [ForgeModLoader] MinePlus(Project Mine+:0.0.0.1): bin ()
2012-08-29 13:57:19 [FINE] [ForgeModLoader] CodeViperCore(CodeViperCore:0.0.0.1): bin ()
2012-08-29 13:57:19 [FINE] [ForgeModLoader] FullmetalAlchemy(Fullmetal Alchemy:0.0.0.2): bin ()
2012-08-29 13:57:19 [FINER] [ForgeModLoader] Posting state event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 to mod FML
2012-08-29 13:57:19 [FINER] [ForgeModLoader] State event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 delivered to mod FML
2012-08-29 13:57:19 [FINER] [ForgeModLoader] Posting state event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 to mod Forge
2012-08-29 13:57:19 [FINER] [ForgeModLoader] State event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 delivered to mod Forge
2012-08-29 13:57:19 [FINER] [ForgeModLoader] Posting state event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 to mod MinePlus
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Attempting to inject @SidedProxy classes into MinePlus
2012-08-29 13:57:19 [iNFO] [sTDOUT] cpw.mods.fml.common.Mod$Instance
2012-08-29 13:57:19 [iNFO] [sTDOUT] [cpw, mods, fml, common, Mod$Instance]
2012-08-29 13:57:19 [FINER] [ForgeModLoader] State event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 delivered to mod MinePlus
2012-08-29 13:57:19 [FINER] [ForgeModLoader] Posting state event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 to mod CodeViperCore
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Attempting to inject @SidedProxy classes into CodeViperCore
2012-08-29 13:57:19 [iNFO] [sTDOUT] cpw.mods.fml.common.Mod$Instance
2012-08-29 13:57:19 [iNFO] [sTDOUT] [cpw, mods, fml, common, Mod$Instance]
2012-08-29 13:57:19 [FINER] [ForgeModLoader] State event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 delivered to mod CodeViperCore
2012-08-29 13:57:19 [FINER] [ForgeModLoader] Posting state event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 to mod FullmetalAlchemy
2012-08-29 13:57:19 [FINE] [ForgeModLoader] Attempting to inject @SidedProxy classes into FullmetalAlchemy
2012-08-29 13:57:19 [iNFO] [sTDOUT] cpw.mods.fml.common.Mod$Instance
2012-08-29 13:57:19 [iNFO] [sTDOUT] [cpw, mods, fml, common, Mod$Instance]
2012-08-29 13:57:19 [FINER] [ForgeModLoader] State event cpw.mods.fml.common.event.FMLConstructionEvent@9647d6 delivered to mod FullmetalAlchemy
2012-08-29 13:57:19 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue
2012-08-29 13:57:19 [sEVERE] [ForgeModLoader]
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
MinePlus [Project Mine+] (bin) Unloaded->Errored
CodeViperCore [CodeViperCore] (bin) Unloaded->Errored
FullmetalAlchemy [Fullmetal Alchemy] (bin) Unloaded->Errored
2012-08-29 13:57:19 [sEVERE] [ForgeModLoader] The following problems were captured during this phase
2012-08-29 13:57:19 [sEVERE] [ForgeModLoader] Caught exception from FullmetalAlchemy
java.lang.IllegalArgumentException: Can not set static mine.net.common.ProjectMinePlus field mine.net.common.ProjectMinePlus.instance to viper283.mods.fma.FullmetalAlchemy
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:331)
at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:255)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:442)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:138)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:405)
at net.minecraft.client.Minecraft.run(Minecraft.java:737)
at java.lang.Thread.run(Unknown Source)
2012-08-29 13:57:19 [sEVERE] [ForgeModLoader] Caught exception from CodeViperCore
java.lang.IllegalArgumentException: Can not set static mine.net.common.ProjectMinePlus field mine.net.common.ProjectMinePlus.instance to viper283.core.ViperCore
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:331)
at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:255)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:442)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:138)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:405)
at net.minecraft.client.Minecraft.run(Minecraft.java:737)
at java.lang.Thread.run(Unknown Source)
2012-08-29 13:57:19 [sEVERE] [ForgeModLoader] Caught exception from MinePlus
java.lang.IllegalArgumentException: Can not set static viper283.mods.fma.FullmetalAlchemy field viper283.mods.fma.FullmetalAlchemy.instance to mine.net.common.ProjectMinePlus
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:331)
at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:255)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:442)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:138)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:405)
at net.minecraft.client.Minecraft.run(Minecraft.java:737)
at java.lang.Thread.run(Unknown Source)
2012-08-29 13:57:27 [iNFO] [sTDERR] Someone is closing me!
ViperCore
/*******************************************************************************
* Copyright © 2012 Viper283.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Viper283
******************************************************************************/
package viper283.core;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
/**
* @author Viper283
*
*/
@Mod( modid = "CodeViperCore", name = "CodeViperCore", version = Resource.version )
@NetworkMod( channels = { "CodeViperCore" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
public class ViperCore {
@SidedProxy(clientSide = "viper283.core.client.ClientProxy", serverSide = "viper283.core.CommonProxy")
public static CommonProxy proxy;
@Instance
public static ViperCore instance;
private static String logger = "[CvC]: ";
public static boolean debugText;
@PreInit
public void initConfig(FMLPreInitializationEvent evt) {
evt.getModMetadata().version = Resource.version;
Configuration cfg = new Configuration(new File(Loader.instance().getConfigDir() + "/Viper283/CvC/config.cfg"));
try {
cfg.load();
debugText = cfg.getOrCreateBooleanProperty("Debug Text", cfg.CATEGORY_GENERAL, true).getBoolean(true);
} catch(Exception e) {
System.out.println(logger + "Failed to load config for reason: ");
e.printStackTrace();
} finally {
cfg.save();
}
}
@Init
public void load(FMLInitializationEvent evt) {
}
}
ProjectMinePlus
package mine.net.common;
import java.util.Random;
import viper283.core.ViperCore;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.client.Minecraft;
import mine.net.*;
import mine.net.client.AddNames;
import mine.net.common.*;
import net.minecraft.src.*;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.EnumHelper;
/**
*
* @author Viper283
*
*/
@Mod(modid = "MinePlus", name = "Project Mine+", version = "0.0.0.1")
@NetworkMod( channels = {"MinePlus"} , clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
public class ProjectMinePlus extends ViperCore {
@SidedProxy(clientSide = "mine.net.client.ClientProxy", serverSide = "mine.net.common.CommonProxy")
public static CommonProxy proxy;
private static ItemsBlocks IB;
private MineTex MT;
@Instance
public static ProjectMinePlus instance;
EnumArmorMaterial armorRuby = EnumHelper.addArmorMaterial("RUBY", 20,
new int[] { 2, 7, 5, 3 }, 10);
EnumArmorMaterial armorTopaz = EnumHelper.addArmorMaterial("TOPAZ", 30,
new int[] { 2, 7, 5, 3 }, 10);
/*
* adds the tool material
*/
EnumToolMaterial toolRubyPick = EnumHelper.addToolMaterial("RUBYPICK",
2, 691, 6F, 2, 10);
EnumToolMaterial toolRubySword = EnumHelper.addToolMaterial(
"RUBYSWORD", 2, 676, 6F, 2, 10);
EnumToolMaterial toolRuby = EnumHelper.addToolMaterial("RUBY", 2, 681,
6F, 2, 10);
EnumToolMaterial toolTopaz = EnumHelper.addToolMaterial("TOPAZ", 2,
1000, 6F, 2, 10);
EnumToolMaterial toolTopazPick = EnumHelper.addToolMaterial(
"TOPAZPICK", 2, 1600, 6F, 2, 10);
@PreInit
public void initConfig(FMLPreInitializationEvent evt) {
NetworkRegistry.instance().registerGuiHandler(this, this.proxy);
Config.configProps();
}
@Init
public void load(FMLInitializationEvent evt) {
proxy.registerRenderInformation();
AddNames.names();
Blocks();
items();
registry();
}
@PostInit
public void modsLoaded(FMLPostInitializationEvent evt) {
}
public void Blocks() {
/*
* defines the blocks
*/
IB.saphire = new BlockMinePlus(IB.saphireId, 5)
.setBlockName("saphireOre").setResistance(200F)
.setHardness(10F);
IB.ruby = new BlockMinePlus(IB.rubyId, 4).setHardness(10F)
.setResistance(200F).setBlockName("rubyOre");
IB.topaz = new BlockMinePlus(IB.topazId, 0).setHardness(10F)
.setResistance(200F).setBlockName("Topaz Ore");
IB.copper = new BlockMinePlus(IB.copperId, 6).setHardness(10F)
.setResistance(200F).setBlockName("oreCopper");
IB.carvtableidle = new BlockCarvTable(IB.carvtableidleId, false)
.setHardness(3.5F).setStepSound(Block.soundStoneFootstep)
.setBlockName("carvTable").setCreativeTab(CreativeTabs.tabDeco);
}
public void items() {
IB.saphiregem = new ItemMineGems(IB.saphiregemId).setIconIndex(
MT.sapphiregem).setItemName("saphireGem");
IB.swordsaphire = new ItemSwordMine(IB.saphireswordId, toolRubySword)
.setIconIndex(MT.sapphiresword).setItemName("swordsaphire");
IB.saphirepick = new ItemPickaxeMine(IB.saphirepickId, toolRubyPick)
.setIconIndex(MT.sapphirepick).setItemName("picksaphire");
IB.saphireaxe = new ItemAxeMine(IB.saphireaxeId, toolRuby)
.setIconIndex(MT.sapphireaxe).setItemName("axesaphire");
IB.shovelsaphire = new ItemShovelMine(IB.shovelsaphireId, toolRuby)
.setIconIndex(MT.sapphirespade).setItemName("shovelsaphire");
IB.helmsaphire = new ItemArmorMine(IB.helmsaphireId, armorRuby, 0, 0)
.setIconIndex(MT.sapphirehelm).setItemName("helmsaphire");
IB.platesaphire = new ItemArmorMine(IB.platesaphireId, armorRuby, 0, 1)
.setIconIndex(MT.sapphirechest).setItemName("platesaphire");
IB.legssaphire = new ItemArmorMine(IB.legssaphireId, armorRuby, 0, 2)
.setIconIndex(MT.sapphirelegs).setItemName("legssaphire");
IB.bootssaphire = new ItemArmorMine(IB.bootssaphireId, armorRuby, 0, 3)
.setIconIndex(MT.sapphireboots).setItemName("bootssaphire");
IB.hoesaphire = new ItemHoeMine(IB.hoesaphireId, toolRuby)
.setIconIndex(MT.sapphirehoe).setItemName("sahpirehoe");
IB.saphireore = new ItemMineGems(IB.saphireoreId).setIconIndex(
MT.sapphireore).setItemName("saphire");
IB.hoeruby = new ItemHoeMine(IB.hoerubyId, toolRuby).setIconIndex(
MT.rubyhoe).setItemName("rubyhoe");
IB.helmruby = new ItemArmorMine(IB.helmrubyId, armorRuby, 0, 0)
.setIconIndex(MT.rubyhelm).setItemName("helmRuby");
IB.plateruby = new ItemArmorMine(IB.platerubyId, armorRuby, 0, 1)
.setIconIndex(MT.rubychest).setItemName("plateRuby");
IB.legsruby = new ItemArmorMine(IB.legsrubyId, armorRuby, 0, 2)
.setIconIndex(MT.rubylegs).setItemName("legsRuby");
IB.bootsruby = new ItemArmorMine(IB.bootsrubyId, armorRuby, 0, 3)
.setIconIndex(MT.rubyboots).setItemName("bootsRuby");
IB.hoetopaz = new ItemHoeMine(IB.hoetopazId, toolTopaz).setIconIndex(
MT.topazhoe).setItemName("topazhoe");
IB.rubypick = new ItemPickaxeMine(IB.rubypickId, toolRubyPick)
.setIconIndex(MT.rubypick).setItemName("rubypick");
IB.rubyaxe = new ItemAxeMine(IB.rubyaxeId, toolRuby).setIconIndex(
MT.rubyaxe).setItemName("rubyaxe");
IB.rubysword = new ItemSwordMine(IB.rubyswordId, toolRubySword)
.setIconIndex(MT.rubysword).setItemName("rubysword");
IB.rubyshovel = new ItemShovelMine(IB.rubyshovelId, toolRuby)
.setIconIndex(MT.rubyspade).setItemName("rubyshovel");
IB.rubyore = new ItemMineGems(IB.rubyoreId).setIconIndex(MT.rubyuncarv)
.setItemName("rubyore");
IB.rubygem = new ItemMineGems(IB.rubygemId).setIconIndex(MT.rubycarv)
.setItemName("rubygem");
IB.topazore = new ItemMineGems(IB.topazoreId).setIconIndex(MT.topazore)
.setItemName("oreTopaz");
IB.topazgem = new ItemMineGems(IB.topazgemId).setIconIndex(MT.topazgem)
.setItemName("topazGem");
IB.swordtopaz = new ItemSwordMine(IB.topazswordId, toolTopaz)
.setIconIndex(MT.topazsword).setItemName("swordTopaz");
IB.topazpick = new ItemPickaxeMine(IB.topazpickId, toolTopazPick)
.setIconIndex(MT.topazpick).setItemName("picktopaz");
IB.topazaxe = new ItemAxeMine(IB.topazaxeId, toolTopaz).setIconIndex(
MT.topazaxe).setItemName("axeTopaz");
IB.shoveltopaz = new ItemShovelMine(IB.shoveltopazId, toolTopaz)
.setIconIndex(MT.topazspade).setItemName("shovelTopaz");
IB.helmtopaz = new ItemArmorMine(IB.helmtopazId, armorTopaz, 0, 0)
.setIconIndex(MT.topazhelm).setItemName("helmTopaz");
IB.platetopaz = new ItemArmorMine(IB.platetopazId, armorTopaz, 0, 1)
.setIconIndex(MT.topazchest).setItemName("plateTopaz");
IB.legstopaz = new ItemArmorMine(IB.legstopazId, armorTopaz, 0, 2)
.setIconIndex(MT.topazlegs).setItemName("legsTopaz");
IB.bootstopaz = new ItemArmorMine(IB.bootstopazId, armorTopaz, 0, 3)
.setIconIndex(MT.topazboots).setItemName("bootsTopaz");
IB.carvknife = new ItemMineGems(IB.carvknifeId).setIconIndex(
MT.carvknife).setItemName("carvknife").setTabToDisplayOn(CreativeTabs.tabTools);
IB.copperingot = new ItemMineGems(IB.copperingotId).setIconIndex(
MT.copperingot).setItemName("copperIngot");
IB.copperore = new ItemMineGems(IB.copperoreid).setIconIndex(
MT.copperore).setItemName("copperOre");
//i accidently pressed the wrong key and i couldn't be bothered to sort it out again
}
public void registry() {
GameRegistry.registerBlock(IB.ruby);
GameRegistry.registerBlock(IB.topaz);
GameRegistry.registerBlock(IB.carvtableidle);
GameRegistry.registerBlock(IB.saphire);
GameRegistry.registerBlock(IB.copper);
GameRegistry.registerTileEntity(TileCarvTable.class, "TileCarvTable");
MinecraftForge.setBlockHarvestLevel(IB.topaz, "pickaxe", 2);
MinecraftForge.setBlockHarvestLevel(IB.ruby, "pickaxe", 2);
MinecraftForge.setBlockHarvestLevel(IB.saphire, "pickaxe", 2);
MinecraftForge.setBlockHarvestLevel(IB.copper, "pickaxe", 2);
MinecraftForge.setToolClass(IB.shoveltopaz, "shovel", 2);
MinecraftForge.setToolClass(IB.topazaxe, "axe", 2);
MinecraftForge.setToolClass(IB.topazpick, "pickaxe", 2);
MinecraftForge.setToolClass(IB.rubyshovel, "shovel", 2);
MinecraftForge.setToolClass(IB.rubyaxe, "axe", 2);
MinecraftForge.setToolClass(IB.rubypick, "pickaxe", 2);
MinecraftForge.setToolClass(IB.shovelsaphire, "shovel", 2);
MinecraftForge.setToolClass(IB.saphireaxe, "axe", 2);
MinecraftForge.setToolClass(IB.saphirepick, "pickaxe", 2);
}
}
FullmetalAlchemy
/*******************************************************************************
* Copyright © 2012 Viper283.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Viper283
******************************************************************************/
package viper283.mods.fma;
import java.io.File;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Material;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import viper283.core.ViperCore;
import viper283.mods.fma.handlers.AddonHandler;
import viper283.mods.fma.handlers.OreHandler;
import viper283.mods.fma.handlers.PacketHandler;
import viper283.mods.fma.handlers.PickupHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
/**
* @author Viper283
*
*/
@Mod( modid = "FullmetalAlchemy", name = "Fullmetal Alchemy", version = Resources.version)
@NetworkMod( channels = { "FMA" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
public class FullmetalAlchemy extends ViperCore {
@SidedProxy(clientSide = "viper283.mods.fma.client.ClientProxy", serverSide = "viper283.mods.fma.CommonProxy")
public static CommonProxy proxy;
@Instance
public static FullmetalAlchemy instance;
private static String logger = "[FMA]: ";
@PreInit
public void preInit(FMLPreInitializationEvent event) {
proxy.registerRenderInformation();
Configuration cfg = new Configuration(new File(Loader.instance().getConfigDir() + "/Viper283/FMA/config.cfg"));
event.getModMetadata().version = Resources.version;
try {
cfg.load();
FMAIds.stopWatch = cfg.getOrCreateIntProperty("StopWatch ID", cfg.CATEGORY_ITEM, 3333).getInt(3333);
FMAIds.blockID = cfg.getOrCreateBlockIdProperty("Metadata Blocks", 900).getInt(900);
} catch (Exception e) {
System.out.println(logger + "You screwed up the config for this reason: ");
e.printStackTrace();
} finally {
cfg.save();
}
}
@Init
public void load(FMLInitializationEvent evt) {
if(ViperCore.debugText == true){
System.out.println(logger + "Creating Items");
}
items();
if(ViperCore.debugText == true) {
System.out.println(logger + "Registering Names");
}
names();
if(ViperCore.debugText == true) {
System.out.println(logger + "Registering Blocks");
}
blocks();
registerBlocks();
if(ViperCore.debugText == true){
System.out.println(logger + "Registering handlers");
}
NetworkRegistry.instance().registerGuiHandler(this, this.proxy);
MinecraftForge.EVENT_BUS.register(new AddonHandler());
MinecraftForge.EVENT_BUS.register(new PickupHandler());
MinecraftForge.EVENT_BUS.register(new OreHandler());
}
public void items() {
FMAItems.stopWatch = new ItemStopWatch(FMAIds.stopWatch);
}
public void names() {
LanguageRegistry.addName(FMAItems.stopWatch, "Alchemist' Stop Watch");
LanguageRegistry.instance().addStringLocalization("coal.name", "Block Of Coal");
LanguageRegistry.instance().addStringLocalization("redstone.name", "Redstone Block");
}
public void blocks() {
FMABlocks.meta = new BlockFMA(FMAIds.blockID, Material.rock);
}
public void registerBlocks() {
GameRegistry.registerBlock(FMABlocks.meta, FMAItemBlock.class);
}
@PostInit
public void modsLoaded(FMLPostInitializationEvent evt) {
AddonHandler.init();
}
}
i know my coding style is horrible in ProjectMinePlus but that was the first mod i made and i really do not want to recode it
-
replace Block.stone.blockID for yourfile.yourstone.blockID
Version-independent mod?
in Modder Support
Posted
you have to use the reobfuscate_srg.bat/sh. ifthat it not there, just add "--srgnames" at the end of the reobfuscate.bat/sh