MC Modding
Please register and join the community!

Error in MCP for 1.0.0

MC Modding :: Help :: Help

View previous topic View next topic Go down

Error in MCP for 1.0.0

Post by noctisbeta on Sat Nov 26, 2011 5:24 pm

Please help me, I get this error:

Generated 26.11.2011 16:23

Minecraft: Minecraft 1.0.0
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_01, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ASUS EAH6670 Series version 4.1.10664 Compatibility Profile Context, ATI Technologies Inc.

java.lang.StringIndexOutOfBoundsException: String index out of range: 8
at java.lang.String.charAt(String.java:695)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:300)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:372)
at net.minecraft.src.mod_Rifle.<init>(mod_Rifle.java:11)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 2259ff56 ----------



My code mod_rifle
package net.minecraft.src;

public class mod_Rifle extends BaseMod{

public static final Item rifle = new Itemrifle(500).setItemName("Itemrifle");


public mod_Rifle(){
ModLoader.AddName(rifle, "Sniper Rifle");
rifle.iconIndex = ModLoader.addOverride("/gui/items.png", "/Rifle/rifle.png");
ModLoader.AddRecipe(new ItemStack (rifle, 1), new Object []{
" X ", " ", " ",Character.valueOf('X'), Block.dirt
});
}


public String Version(){
return "1.0.0";
}


public String getVersion() {
return null;
}



public void load() {

}
}

Code Itemrifle:
package net.minecraft.src;

public class Itemrifle extends Item{
public Itemrifle(int i){
super(i);
maxStackSize = 64;
}

}


noctisbeta
Member

Posts : 4
Join date : 2011-11-03

View user profile

Back to top Go down

Re: Error in MCP for 1.0.0

Post by Ranga179 on Tue Nov 29, 2011 9:42 pm

not sure cause thos erros dont explain too much but try removing the
Code:
" ", " "
in the recipe so the line would look like this
Code:
"#", Character.valueOf('X'), Block.dirt

Ranga179
Member

Posts : 9
Join date : 2011-10-19
Age : 20

View user profile

Back to top Go down

Re: Error in MCP for 1.0.0

Post by noctisbeta on Tue Nov 29, 2011 10:17 pm

Thanks, but I already fixed a long time ago.

noctisbeta
Member

Posts : 4
Join date : 2011-11-03

View user profile

Back to top Go down

Re: Error in MCP for 1.0.0

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


MC Modding :: Help :: Help

 
Permissions in this forum:
You cannot reply to topics in this forum