I'm sure there is probably a reason its ordered the way it is, and if you want a specific tutorial, then Google is your best friend. Otherwise, nobody here needs to bug the crap out of this poor guy.
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Exception occured in ModLoader
This error has been saved to /Users/raywendt/Library/Application Support/minecraft/crash-reports/crash-2012-08-21_09.06.10-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT ca9b2137 --------
Generated 8/21/12 9:06 AM
- Minecraft Version: 1.3.2
- Operating System: Mac OS X (i386) version 10.7.4
- Java Version: 1.6.0_33, Apple Inc.
- Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Apple Inc.
- Memory: 501774336 bytes (478 MB) / 535232512 bytes (510 MB) up to 1070399488 bytes (1020 MB)
- JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M
- ModLoader: Mods loaded: 1
ModLoader 1.3.2
java.lang.NoSuchFieldError: e
at BlockGranite.<init>(BlockGranite.java:7)
at mod_Geology.<clinit>(mod_Geology.java:4)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at ModLoader.addMod(ModLoader.java:343)
at ModLoader.readFromClassPath(ModLoader.java:1333)
at ModLoader.init(ModLoader.java:931)
at ModLoader.addAllRenderers(ModLoader.java:185)
at avy.<init>(RenderManager.java:87)
at avy.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.a(SourceFile:260)
at net.minecraft.client.Minecraft.run(SourceFile:516)
at java.lang.Thread.run(Thread.java:680)
--- END ERROR REPORT b97125d9 ----------
And the files:
mod_Geology
package net.minecraft.src;
public class mod_Geology extends BaseMod
{
public static final Block granite = new BlockGranite(160,0).setBlockName("granite").setHardness(3F).setResistance(4F);
public void load()
{
granite.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/geology/granite.png");
ModLoader.registerBlock(granite);
ModLoader.addName(granite, "Granite");
ModLoader.addRecipe(new ItemStack(granite, 1), new Object [] {"#",Character.valueOf('#'),Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
BlockGranite
package net.minecraft.src;
import java.util.Random;
public class BlockGranite extends Block
{
public BlockGranite(int i, int j)
{
super(i,j,Material.rock);
setCreativeTab(CreativeTabs.tabBlock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Geology.granite.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
thanks to anyone who helps!
Are you using 1.3.2 or 1.3.1? If you are indeed using 1.3.2 you should change the
public String getVersion()
{
return "1.3.1";
}
to
public String getVersion()
{
return "1.3.2";
}
and see if that works, you need to change all of those in all of your files.
Another thing you can try is to make sure your jars are up-to-date in MCP. You will need to get the latest version in order for it to properly compile for 1.3.2. Make sure you are using an up-to-date ModLoader as well.
Edit2: I want to make a crafting recipie with jungle planks, but what are those called?
They're not a different ID. They share the same ID but have damage values to distinguish them. In a crafting recipe, this would be
Character.valueOf('#'), new ItemStack(Block.woodPlank, 1, 3)
Or something like that. I may have the wrong name for the wood planks, but the damage value is 3 for jungle I believe. This will restrict the use of wood that recipe to that of jungle wood.
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Are you using 1.3.2 or 1.3.1? If you are indeed using 1.3.2 you should change the
public String getVersion()
{
return "1.3.1";
}
to
public String getVersion()
{
return "1.3.2";
}
and see if that works, you need to change all of those in all of your files.
Another thing you can try is to make sure your jars are up-to-date in MCP. You will need to get the latest version in order for it to properly compile for 1.3.2. Make sure you are using an up-to-date ModLoader as well.
getVersion has NOTHING to do with the version of Minecraft. It's simply displayed in the log when the mod is loading.
The Meaning of Life, the Universe, and Everything.
Join Date:
10/17/2011
Posts:
44
Member Details
So sorry, but I have to ask this. As I simply don't have the patience to run through 213 pages of a forum.
But first off, how do I export my mod? Do I take my Java files that I made, and put them in a zip?
And secondly, I noticed how TechGuy said to not use more than one mod_Class, which is throwing me off.
Because I want to create a new ore to the game. So, I already have my block made, and it runs fine.
But, should I not create a new Class for a custom ingot for that block? Or was that comment just for if you are making two new things in the same Class (Blocks, Items, Etc)?
Again, I apologize, but fairly new to this. Thanks so much for your time.
for exporting, you should run reobfuscate and copy the classes from reobf folder in a zip together with the textures you made. and for the other thing - you should only have one mod_* class.
Okay, gotcha on the first part.
Oooh, I think I get it. So, you shouldn't have two mod_Block classes. But you can have a mod_Block and a mod_Item class. Right? It took me a while, by my inner programmer finally kicked in.
Is the tool tutorial updated? I examined the code and it appeers so. But I would want to write all the code and find its not updated.
The name isn't black therefore it isn't updated.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
The Meaning of Life, the Universe, and Everything.
Join Date:
10/17/2011
Posts:
44
Member Details
Well, not quite right. You can Declare everything you want in the mod_ file, but you SHOULD have only one, because later on you will be confused: "Where did I put that block? In mod_a, mod_b, or mod_c?" If still confused, heres my example of mod_*:
Dang, that was going to be my second guess. Well thank you very much. This makes things much easier. I was just lost due to the fact when TechGuy showed an example of multiple things in one class, they were two Block definitions. Back to coding! Woo!
The Meaning of Life, the Universe, and Everything.
Join Date:
8/20/2012
Posts:
51
Member Details
Having some trouble with my mod.
Error:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\Users\Sivert\AppData\Roaming\.minecraft\crash-reports\crash-2012-08-23_18.23.14-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT d1ef4dc2 --------
Generated 23.08.12 18:23
java.lang.ClassCastException: afo cannot be cast to java.lang.Character
at td.a(SourceFile:588)
at ModLoader.addRecipe(ModLoader.java:468)
at mod_LotsofStuff.load(mod_LotsofStuff.java:25)
at ModLoader.init(ModLoader.java:938)
at ModLoader.addAllRenderers(ModLoader.java:185)
at avy.(RenderManager.java:87)
at avy.(RenderManager.java:14)
at net.minecraft.client.Minecraft.a(SourceFile:260)
at net.minecraft.client.Minecraft.run(SourceFile:516)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 4337496b ----------
Codes:
Mod_LotsofStuff:
package net.minecraft.src;
import java.util.Random;
public class mod_LotsofStuff extends BaseMod
{
public static final Item DiamondNugget = new Item(3000).setItemName("DiamondNugget");
public static final Item Chocolate = new ItemFood(3001, 4, 1F, false).setItemName("Chocolate");
public static final Block JungleBook = new BlockJungleBook(171, 0).setBlockName("JungleBook").setHardness(1.5F).setCreativeTab(CreativeTabs.tabBlock);
public static int JungleBookBottom = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBbottom.png");
public static int JungleBookTop = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBtop.png");
public static int JungleBookSides = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBsides.png");
public void load()
{
ModLoader.registerBlock(JungleBook);
ModLoader.addName(DiamondNugget, "Diamond Nugget");
ModLoader.addName(Chocolate, "Chocolate");
ModLoader.addName(JungleBook, "Jungle BookShelf");
DiamondNugget.iconIndex = ModLoader.addOverride("/gui/items.png", "LotsofStuff/DiamondNugget.png");
Chocolate.iconIndex = ModLoader.addOverride("/gui/items.png", "LotsofStuff/Chocolate.png");
ModLoader.addRecipe(new ItemStack(JungleBook, 1), new Object [] {"###", "¤¤¤", "###", Character.valueOf('¤'), Item.book, Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
BlockJungleBook:
package net.minecraft.src;
import java.util.Random;
public class BlockJungleBook extends Block
{
public BlockJungleBook(int par1, int par2)
{
super(par1, par2, Material.wood);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_LotsofStuff.JungleBookBottom;
}
if (i == 1)
{
return mod_LotsofStuff.JungleBookTop;
}
else
{
return mod_LotsofStuff.JungleBookSides;
}
}
public int quantityDropped(int par1)
{
return (3);
}
public int idDropped(int par1, Random par2Random, int par3)
{
return Item.book.shiftedIndex;
}
}
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\Users\Sivert\AppData\Roaming\.minecraft\crash-reports\crash-2012-08-23_18.23.14-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT d1ef4dc2 --------
Generated 23.08.12 18:23
java.lang.ClassCastException: afo cannot be cast to java.lang.Character
at td.a(SourceFile:588)
at ModLoader.addRecipe(ModLoader.java:468)
at mod_LotsofStuff.load(mod_LotsofStuff.java:25)
at ModLoader.init(ModLoader.java:938)
at ModLoader.addAllRenderers(ModLoader.java:185)
at avy.(RenderManager.java:87)
at avy.(RenderManager.java:14)
at net.minecraft.client.Minecraft.a(SourceFile:260)
at net.minecraft.client.Minecraft.run(SourceFile:516)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 4337496b ----------
Codes:
Mod_LotsofStuff:
package net.minecraft.src;
import java.util.Random;
public class mod_LotsofStuff extends BaseMod
{
public static final Item DiamondNugget = new Item(3000).setItemName("DiamondNugget");
public static final Item Chocolate = new ItemFood(3001, 4, 1F, false).setItemName("Chocolate");
public static final Block JungleBook = new BlockJungleBook(171, 0).setBlockName("JungleBook").setHardness(1.5F).setCreativeTab(CreativeTabs.tabBlock);
public static int JungleBookBottom = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBbottom.png");
public static int JungleBookTop = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBtop.png");
public static int JungleBookSides = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBsides.png");
public void load()
{
ModLoader.registerBlock(JungleBook);
ModLoader.addName(DiamondNugget, "Diamond Nugget");
ModLoader.addName(Chocolate, "Chocolate");
ModLoader.addName(JungleBook, "Jungle BookShelf");
DiamondNugget.iconIndex = ModLoader.addOverride("/gui/items.png", "LotsofStuff/DiamondNugget.png");
Chocolate.iconIndex = ModLoader.addOverride("/gui/items.png", "LotsofStuff/Chocolate.png");
ModLoader.addRecipe(new ItemStack(JungleBook, 1), new Object [] {"###", "¤¤¤", "###", Character.valueOf('¤'), Item.book, Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
BlockJungleBook:
package net.minecraft.src;
import java.util.Random;
public class BlockJungleBook extends Block
{
public BlockJungleBook(int par1, int par2)
{
super(par1, par2, Material.wood);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_LotsofStuff.JungleBookBottom;
}
if (i == 1)
{
return mod_LotsofStuff.JungleBookTop;
}
else
{
return mod_LotsofStuff.JungleBookSides;
}
}
public int quantityDropped(int par1)
{
return (3);
}
public int idDropped(int par1, Random par2Random, int par3)
{
return Item.book.shiftedIndex;
}
}
I don't think it likes your character, '¤' in your crafting definition. Change it to something universal. Such as, '$'.
I try my best!
Yes, yes indeed. That is the best way to learn a thing or two as well, trying it yourself.
I'm sure there is probably a reason its ordered the way it is, and if you want a specific tutorial, then Google is your best friend. Otherwise, nobody here needs to bug the crap out of this poor guy.
Are you using 1.3.2 or 1.3.1? If you are indeed using 1.3.2 you should change the
public String getVersion() { return "1.3.1"; }to
public String getVersion() { return "1.3.2"; }and see if that works, you need to change all of those in all of your files.
Another thing you can try is to make sure your jars are up-to-date in MCP. You will need to get the latest version in order for it to properly compile for 1.3.2. Make sure you are using an up-to-date ModLoader as well.
I truly am ---->
Edit2: I want to make a crafting recipie with jungle planks, but what are those called?
-
View User Profile
-
View Posts
-
Send Message
Retired StaffThey're not a different ID. They share the same ID but have damage values to distinguish them. In a crafting recipe, this would be
Character.valueOf('#'), new ItemStack(Block.woodPlank, 1, 3)Or something like that. I may have the wrong name for the wood planks, but the damage value is 3 for jungle I believe. This will restrict the use of wood that recipe to that of jungle wood.
What? A new block renderer? No, that's with Forge, this isn't a page for Forge tutorials yet.
Youtube: http://www.youtube.com/user/psp3000nerd
Second Youtube: http://www.youtube.com/user/pixel3000nerd
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumgetVersion has NOTHING to do with the version of Minecraft. It's simply displayed in the log when the mod is loading.
Noob mistake, lmao.
But first off, how do I export my mod? Do I take my Java files that I made, and put them in a zip?
And secondly, I noticed how TechGuy said to not use more than one mod_Class, which is throwing me off.
Because I want to create a new ore to the game. So, I already have my block made, and it runs fine.
But, should I not create a new Class for a custom ingot for that block? Or was that comment just for if you are making two new things in the same Class (Blocks, Items, Etc)?
Again, I apologize, but fairly new to this. Thanks so much for your time.
Okay, gotcha on the first part.
Oooh, I think I get it. So, you shouldn't have two mod_Block classes. But you can have a mod_Block and a mod_Item class. Right? It took me a while, by my inner programmer finally kicked in.
The name isn't black therefore it isn't updated.
together they are powerful beyond imagination."
Dang, that was going to be my second guess. Well thank you very much. This makes things much easier. I was just lost due to the fact when TechGuy showed an example of multiple things in one class, they were two Block definitions. Back to coding! Woo!
mod_*
package net.minecraft.src; public class mod_Lightdirt extends BaseMod { public static final Block Lightdirt = new BlockLightdirt (160, 0) .setBlockName("Lightdirt").setHardness(0.5F).setLightValue(1.0F) .setCreativeTab(CreativeTabs.tabBlock); //Light Ingot public static final Item LightIngot=new ItemLightIngot(5000).setItemName("Light Ingot"); public void load() { Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightdirt.png"); ModLoader.registerBlock(Lightdirt); ModLoader.addName(Lightdirt, "Lightdirt"); ModLoader.addRecipe(new ItemStack(Lightdirt, 2), new Object [] {"###", "#$#", "###", Character.valueOf('#'), Block.dirt, Character.valueOf('$'), Item.LightIngot}); //Light Ingot LightIngot.iconIndex=ModLoader.addOverride("/gui/items.png", "/light-ingot"); ModLoader.addName(LightIngot, "Light Ingot"); ModLoader.addSmelting(Block.dirt.blockID, new ItemStack(Item.LightIngot, 1), 1.0F); } public String getVersion() { return "1.3.2"; } }ItemLightIngot
package net.minecraft.src; public class ItemLightIngot extends Item { public ItemLightIngot (int i) { super(i); maxStackSize=64; } }And here is my error:
src\minecraft\\net\minecraft\src\mod_*.java:16: error: cannot find symbol Character.valueOf('#'), Block.dirt, Character.valueOf('$'), Item.LightIngot}); ^ symbol: variable LightIngot location: class Item src\minecraft\\net\minecraft\src\mod_*.java:20: error: cannot find symbol ModLoader.addSmelting(Block.dirt.blockID, new ItemStack(Item.LightIngot, 1), 1.0F); ^ symbol: variable LightIngot location: class ItemTry moving your LightIngot definitions above your crafting definition for your Light Dirt.
Error:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\Users\Sivert\AppData\Roaming\.minecraft\crash-reports\crash-2012-08-23_18.23.14-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT d1ef4dc2 --------
Generated 23.08.12 18:23
- Minecraft Version: 1.3.2
- Operating System: Windows 7 (x86) version 6.1
- Java Version: 1.7.0_04, Oracle Corporation
- Java VM Version: Java HotSpot™ Client VM (mixed mode), Oracle Corporation
- Memory: 450841360 bytes (429 MB) / 518979584 bytes (494 MB) up to 1037959168 bytes (989 MB)
- JVM Flags: 2 total; -Xms512m -Xmx1024m
- ModLoader: Mods loaded: 2
ModLoader 1.3.2
mod_LotsofStuff 1.3.1
java.lang.ClassCastException: afo cannot be cast to java.lang.Character
at td.a(SourceFile:588)
at ModLoader.addRecipe(ModLoader.java:468)
at mod_LotsofStuff.load(mod_LotsofStuff.java:25)
at ModLoader.init(ModLoader.java:938)
at ModLoader.addAllRenderers(ModLoader.java:185)
at avy.(RenderManager.java:87)
at avy.(RenderManager.java:14)
at net.minecraft.client.Minecraft.a(SourceFile:260)
at net.minecraft.client.Minecraft.run(SourceFile:516)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 4337496b ----------
Codes:
Mod_LotsofStuff:
package net.minecraft.src; import java.util.Random; public class mod_LotsofStuff extends BaseMod { public static final Item DiamondNugget = new Item(3000).setItemName("DiamondNugget"); public static final Item Chocolate = new ItemFood(3001, 4, 1F, false).setItemName("Chocolate"); public static final Block JungleBook = new BlockJungleBook(171, 0).setBlockName("JungleBook").setHardness(1.5F).setCreativeTab(CreativeTabs.tabBlock); public static int JungleBookBottom = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBbottom.png"); public static int JungleBookTop = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBtop.png"); public static int JungleBookSides = ModLoader.addOverride("/terrain.png", "LotsofStuff/JBsides.png"); public void load() { ModLoader.registerBlock(JungleBook); ModLoader.addName(DiamondNugget, "Diamond Nugget"); ModLoader.addName(Chocolate, "Chocolate"); ModLoader.addName(JungleBook, "Jungle BookShelf"); DiamondNugget.iconIndex = ModLoader.addOverride("/gui/items.png", "LotsofStuff/DiamondNugget.png"); Chocolate.iconIndex = ModLoader.addOverride("/gui/items.png", "LotsofStuff/Chocolate.png"); ModLoader.addRecipe(new ItemStack(JungleBook, 1), new Object [] {"###", "¤¤¤", "###", Character.valueOf('¤'), Item.book, Block.dirt}); } public String getVersion() { return "1.3.1"; } }BlockJungleBook:
package net.minecraft.src; import java.util.Random; public class BlockJungleBook extends Block { public BlockJungleBook(int par1, int par2) { super(par1, par2, Material.wood); this.setCreativeTab(CreativeTabs.tabBlock); } public int getBlockTextureFromSideAndMetadata(int i, int j) { return getBlockTextureFromSide(i); } public int getBlockTextureFromSide(int i) { if (i == 0) { return mod_LotsofStuff.JungleBookBottom; } if (i == 1) { return mod_LotsofStuff.JungleBookTop; } else { return mod_LotsofStuff.JungleBookSides; } } public int quantityDropped(int par1) { return (3); } public int idDropped(int par1, Random par2Random, int par3) { return Item.book.shiftedIndex; } }I don't think it likes your character, '¤' in your crafting definition. Change it to something universal. Such as, '$'.
Didn't work