Ok so when I recompile and reobfuscate in MCP and i get No errors but when i use start client i get this error
Mods loaded: 3
ModLoader Beta 1.8.1
net.minecraft.src.mod_Bun 1.8.1
net.minecraft.src.mod_Doggietreat 1.8.1
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT f075e49a --------
Generated 10/5/11 2:36 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 3200 Graphics version 2.1.8781, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
at net.minecraft.src.mod_Hamburger.<init>(mod_Hamburger.java:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT d0103563 ----------
at net.minecraft.src.mod_Hamburger.<init>(mod_Hamburger.java:13)
I'm going to assume the error is in mod_Hamburger.java and is located somewhere around the line 13 (so either it is line 13 or above or below it). I'm also going to assume it's an error with a recipe from looking at the other lines with the error log. So go back into mod_Hamburger.java and double check everything around line 13 and see if you can resolve it yourself. If not post the source here so someone can assist you.
at net.minecraft.src.mod_Hamburger.<init>(mod_Hamburger.java:13)
I'm going to assume the error is in mod_Hamburger.java and is located somewhere around the line 13 (so either it is line 13 or above or below it). I'm also going to assume it's an error with a recipe from looking at the other lines with the error log. So go back into mod_Hamburger.java and double check everything around line 13 and see if you can resolve it yourself. If not post the source here so someone can assist you.
Post the source please? It's a NullPointerException, so you passed a null value somewhere where it wasn't expected. The stack trace tells us the problem is where you called ModLoader.AddRecipe at line 13, so check there for any mistakes. Otherwise, the source will show us the problem more easily.
Rollback Post to RevisionRollBack
Did I help? Press the + to up my reputation if I did!
1) You haven't declared Tomato, Bun, or Lettuce, and you haven't assigned their textures and names. Without doing so the game won't know what your referencing. It's similar to what you did to the hamburger except this:
public static final Item Hamburger = new ItemFood(167,15, false ).setItemName("Hamburger");
would be something more like this:
public static final Item Namehere = new Item(ID).setItemName("Namehere");
Namehere = the name of the item.
ID = The ID of the item.
If you made a ItemName.java file for each item it would be more like this:
public static final Item Namehere = new ItemName(ID).setItemName("Namehere")
Namehere = the name of the item.
ID = The ID of the item.
ItemName = the name the file has. So if your Item file is ItemBun, Itemname would be ItemBun.
The second issue is within the recipe, it should be like this:
You didn't have to change the declaration of Hamburger, change it back to:
public static final Item Hamburger = new ItemFood(167,15, false ).setItemName("Hamburger");
Well i just changed it back and im still getting the first error
Mods loaded: 3
ModLoader Beta 1.8.1
net.minecraft.src.mod_Bun 1.8.1
net.minecraft.src.mod_Doggietreat 1.8.1
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT f075e49a --------
Generated 10/5/11 4:28 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 3200 Graphics version 2.1.8781, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
at net.minecraft.src.mod_Hamburger.<init>(mod_Hamburger.java:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT feb14804 ----------
But OP, I did tell you what you needed to do in my previous post you just didn't do it. So please take time to read the changes Twilight made and try and learn from it, also don't forget to change the Item ID's to something unique, they can't all be 167.
I'm going to assume the error is in mod_Hamburger.java and is located somewhere around the line 13 (so either it is line 13 or above or below it). I'm also going to assume it's an error with a recipe from looking at the other lines with the error log. So go back into mod_Hamburger.java and double check everything around line 13 and see if you can resolve it yourself. If not post the source here so someone can assist you.
Post the source please? It's a NullPointerException, so you passed a null value somewhere where it wasn't expected. The stack trace tells us the problem is where you called ModLoader.AddRecipe at line 13, so check there for any mistakes. Otherwise, the source will show us the problem more easily.
Umm... You're referencing Item.Bun, Item.Tomato, etc. Do they actually exist??
Yup.
1) You haven't declared Tomato, Bun, or Lettuce, and you haven't assigned their textures and names. Without doing so the game won't know what your referencing. It's similar to what you did to the hamburger except this:
would be something more like this:
Namehere = the name of the item.
ID = The ID of the item.
If you made a ItemName.java file for each item it would be more like this:
Namehere = the name of the item.
ID = The ID of the item.
ItemName = the name the file has. So if your Item file is ItemBun, Itemname would be ItemBun.
The second issue is within the recipe, it should be like this:
The only time you need the Item. or Block. prefix is when it's an item/block in the original game. Anything you add does not need this prefix.
I hope that helps, if I confused you I really do apologize I'm trying my best.
Yes it does, it's how you refer to Cooked Beef.
I Changed this in my mod_Hamburger and it gives me this error
Post your current source code.
Well i just changed it back and im still getting the first error
Sorry for all of the trouble thus far.
Do me a favor at least. Read the code and try to learn something from it... :sleep.gif:
But OP, I did tell you what you needed to do in my previous post you just didn't do it. So please take time to read the changes Twilight made and try and learn from it, also don't forget to change the Item ID's to something unique, they can't all be 167.
Each item has it's own Item<name>.java file, yes but you keep all the info about the items in ONE mod_ file.