Error in MCP for 1.0.0
2 posters
MC Modding :: Help :: Help
Page 1 of 1
Error in MCP for 1.0.0
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;
}
}
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
Re: Error in MCP for 1.0.0
not sure cause thos erros dont explain too much but try removing the
- Code:
" ", " "
- Code:
"#", Character.valueOf('X'), Block.dirt
Ranga179- Member
- Posts : 9
Join date : 2011-10-19
Age : 28
Re: Error in MCP for 1.0.0
Thanks, but I already fixed a long time ago.
noctisbeta- Member
- Posts : 4
Join date : 2011-11-03
Similar topics
» [Answered] Variable Error/import error
» Error help
» Error
» reobsfucation error
» [UnAnswered]Tool Error.
» Error help
» Error
» reobsfucation error
» [UnAnswered]Tool Error.
MC Modding :: Help :: Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum