So, mnany of you may have heard me whining about me not being able to make a gun mod. Well, I got it working in MCP, but I reobfuscate it and it comes up with this little bucket of joy:
Mods loaded: 2
ModLoader Beta 1.8.1
mod_airship Airships V2.5 for 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 d4fe6f01 --------
Generated 10/27/11 3:34 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_23, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 4600 Series version 3.3.11079 Compatibility Profile Context, ATI Technologies Inc.
java.lang.NoSuchFieldError: paper
at mod_SimpleGuns.<init>(mod_SimpleGuns.java:24)
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 ModLoader.addMod(ModLoader.java:275)
at ModLoader.readFromModFolder(ModLoader.java:1179)
at ModLoader.init(ModLoader.java:824)
at ModLoader.AddAllRenderers(ModLoader.java:186)
at aam.<init>(aam.java:61)
at aam.<clinit>(aam.java:10)
at net.minecraft.client.Minecraft.a(SourceFile:259)
at net.minecraft.client.Minecraft.run(SourceFile:629)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT cde690ed ----------
It seems to be that it can't find the paper code under Item.class when my mod calls for it. The funny thing is, this is only in the actual game, whereas MCP's startclient.bat version is just fine. My code is as follows:
package net.minecraft.src;
public class mod_SimpleGuns extends BaseMod{
public static Item flintlockpistol = (new ItemFlintlockPistol(5000)).setItemName("flintlockPistol");
public static Item musketball = (new Item(5001)).setItemName("musketBall");
public static Item spring = (new Item(5002).setItemName("spring"));
public static Item gunbarrel = new Item(5003).setItemName("gunBarrel");
public static Item musket = new ItemMusket(5004).setItemName("musket");
public mod_SimpleGuns(){
ModLoader.AddName(flintlockpistol, "Flintlock Pistol");
ModLoader.AddName(musketball, "Musket Ball");
ModLoader.AddName(spring, "Spring");
ModLoader.AddName(gunbarrel, "Iron Barrel");
ModLoader.AddName(musket, "Flintlock Musket");
flintlockpistol.iconIndex = (ModLoader.addOverride("/gui/items.png","/gui/flintlock.png"));
musketball.iconIndex = (ModLoader.addOverride("/gui/items.png","/gui/musketball.png"));
spring.iconIndex = (ModLoader.addOverride("/gui/items.png","/gui/gunspring.png"));
gunbarrel.iconIndex = (ModLoader.addOverride("/gui/items.png", "/gui/firearmBarrel.png"));
musket.iconIndex = (ModLoader.addOverride("/gui/items.png","/gui/musket.png"));
//craft musket ball
ModLoader.AddRecipe(new ItemStack(musketball, 4), new Object[]{
" I ", " G#",
Character.valueOf('I'), Item.ingotIron,
Character.valueOf('#'), Item.paper,
Character.valueOf('G'), Item.gunpowder});
//craft spring
ModLoader.AddRecipe(new ItemStack(spring, 1), new Object[]{
" I "," I ",
Character.valueOf('I'),Item.ingotIron
});
//craft barrel
ModLoader.AddRecipe(new ItemStack(gunbarrel, 1), new Object[]{
" I"," I ","I ",
Character.valueOf('I'), Item.ingotIron
});
//craft flintlock pistol
ModLoader.AddRecipe(new ItemStack(flintlockpistol, 1), new Object[]{
"SFB","#I#","# ",
Character.valueOf('I'),Item.ingotIron,
Character.valueOf('#'),Block.planks,
Character.valueOf('S'),mod_SimpleGuns.spring,
Character.valueOf('B'),mod_SimpleGuns.gunbarrel,
Character.valueOf('F'),Item.flintAndSteel
});
//craft musket
ModLoader.AddRecipe(new ItemStack(musket, 1), new Object[]{
"S B","FB#","## ",
Character.valueOf('#'),Block.planks,
Character.valueOf('S'),mod_SimpleGuns.spring,
Character.valueOf('B'),mod_SimpleGuns.gunbarrel,
Character.valueOf('F'),Item.flintAndSteel
});
}
public static DamageSource func_35530_a(EntitySGBullet entitysgbullet, Entity entity)
{
return new EntityDamageSourceIndirect("firearm", entitysgbullet, entity);
}
public String Version() {
return "3.1415926535";
}
}
I have a few other mods, including TMI, Single Player Commands, zeppelin, airship, another mod I made for practice that adds the "Ghast Blaster" (a wand that launches Ghast fireballs), Modloader, the HD patcher, and possible others. These mods worked perfectly together before the addition of my gun mod.
perhaps it wasnt reobfd correctly?
open up the reobfed class file and see if that field was obfuscated properly (as it shouldnt be called "paper" if it was)
Rollback Post to RevisionRollBack
Remeber: that little green plus sign is a great way to say thank you!
It seems to be that it can't find the paper code under Item.class when my mod calls for it. The funny thing is, this is only in the actual game, whereas MCP's startclient.bat version is just fine. My code is as follows:
I have a few other mods, including TMI, Single Player Commands, zeppelin, airship, another mod I made for practice that adds the "Ghast Blaster" (a wand that launches Ghast fireballs), Modloader, the HD patcher, and possible others. These mods worked perfectly together before the addition of my gun mod.
If anyone has some advice, please tell me.
My Website. I make mods for Minecraft and am also making my own game.
open up the reobfed class file and see if that field was obfuscated properly (as it shouldnt be called "paper" if it was)
FD: net/minecraft/src/Item/paper sv/paper
# Field net/minecraft/src/Item/paper renamed to paper from name maker.
I noticed most other items and blocks were renamed to a random letter, whereas a few (including paper) kept their original name. Is this right?
My Website. I make mods for Minecraft and am also making my own game.
no, for some reason its not recompiling correctly, paper should reobf to aL...
Great, so that means it's MCP's fault and until an update comes out I am completely and totally screwed?
My Website. I make mods for Minecraft and am also making my own game.