forum Forumsplay_arrow PMC fiber_manual_record Discussion

1

Modders please help!!!

1 emerald12 replies155 views
created 01/20/2012 3:11 am by Jt9
last reply 01/20/2012 7:19 am
when i test my new mod i get this error

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Character

out of my time doing this this is the first time, i use modloader to make mods
Posted by avatar
Jt9
Level 67 : High Grandmaster Modder
251

12 replies

1
01/20/2012 7:19 am
Level 49 : Master Pony
mrstreethobo
avatar
i haveto go for school, be back at 3:30
1
01/20/2012 7:16 am
Level 49 : Master Pony
mrstreethobo
avatar
No you dont, you just have to change one of the to, say, "FL" or "FR"
1
01/20/2012 7:14 am
Level 67 : High Grandmaster Modder
Jt9
avatar
then ive got alot to change
1
01/20/2012 7:13 am
Level 49 : Master Pony
mrstreethobo
avatar
ModLoader.AddRecipe(new ItemStack(Fragment, 2), new Object[] { "O", Character.valueOf('O'), Block.obsidian});
ModLoader.AddRecipe(new ItemStack(Liquid, 1), new Object[] { "F", "P", Character.valueOf('F'), Fragment, Character.valueOf('P'), Item.potion, 8200});
ModLoader.AddRecipe(new ItemStack(Nether, 1), new Object[] { "B", "L", Character.valueOf('B'), Item.blazeRod, Character.valueOf('L'), Liquid});
ModLoader.AddRecipe(new ItemStack(Ooze, 1), new Object[] { "S", "N", Character.valueOf('S'), Item.spiderEye, Character.valueOf('N'), Nether});
ModLoader.AddSmelting(mod_Shadow.Ooze.shiftedIndex, new ItemStack(Shadow, 1));
ModLoader.AddRecipe(new ItemStack(Essence, 1), new Object[] { "SSS", "SSS", "SSS", Character.valueOf('S'), Shadow});
ModLoader.AddRecipe(new ItemStack(Pure, 1), new Object[] { "EEE", "EEE", "EEE", Character.valueOf('E'), Essence});
ModLoader.AddRecipe(new ItemStack(Unstable, 1), new Object[] { "M", "F", Character.valueOf('M'), Item.magmaCream, Character.valueOf('F'), Fragment});
ModLoader.AddRecipe(new ItemStack(Fear, 1), new Object[] { "F", "GU ", "SG", Character.valueOf('F'), Item.flint, Character.valueOf('G'), Item.ghastTear, Character.valueOf('U'), Unstable, Character.valueOf('S'), Item.stick});
ModLoader.AddRecipe(new ItemStack(Corrupted, 1), new Object[] { "E", "B", Character.valueOf('E'), Essence, Character.valueOf('B'), Item.blazeRod});
ModLoader.AddRecipe(new ItemStack(Fused, 1), new Object[] { "OCO", Character.valueOf('O'), Fragment, Character.valueOf('C'), Corrupted});
ModLoader.AddSmelting(mod_Shadow.Fused.shiftedIndex, new ItemStack(Refined, 1));
ModLoader.AddRecipe(new ItemStack(Dark, 1), new Object[] { "E", "P", Character.valueOf('E'), Essence, Character.valueOf('P'), Item.enderPearl});
ModLoader.AddRecipe(new ItemStack(Seeker, 1), new Object[] { " P ", " E ", " C ", Character.valueOf('P'), Pure, Character.valueOf('E'), Essence, Character.valueOf('C'), Corrupted});
ModLoader.AddRecipe(new ItemStack(Shadowsword, 1), new Object[] { "ODO", "FSB", "PRP", Character.valueOf('O'), Fragment, Character.valueOf('D'), Dark, Character.valueOf('F'), Fear, Character.valueOf('S'), Seeker, Character.valueOf('B'), Ooze, Character.valueOf('P'), Pure, Character.valueOf('R'), Refined});
1
01/20/2012 7:06 am
Level 67 : High Grandmaster Modder
Jt9
avatar
ummm where?
1
01/20/2012 7:03 am
Level 49 : Master Pony
mrstreethobo
avatar
FOUND IT you used the integer "F" twice. change one of them to something else.
1
01/20/2012 7:00 am
Level 67 : High Grandmaster Modder
Jt9
avatar
cant find anything... anything here that doesnt have item. or block. is my mod item thing

ModLoader.AddRecipe(new ItemStack(Fragment, 2), new Object[] { "O", Character.valueOf('O'), Block.obsidian});
ModLoader.AddRecipe(new ItemStack(Liquid, 1), new Object[] { "F", "P", Character.valueOf('F'), Fragment, Character.valueOf('P'), Item.potion, 8200});
ModLoader.AddRecipe(new ItemStack(Nether, 1), new Object[] { "B", "L", Character.valueOf('B'), Item.blazeRod, Character.valueOf('L'), Liquid});
ModLoader.AddRecipe(new ItemStack(Ooze, 1), new Object[] { "S", "N", Character.valueOf('S'), Item.spiderEye, Character.valueOf('N'), Nether});
ModLoader.AddSmelting(mod_Shadow.Ooze.shiftedIndex, new ItemStack(Shadow, 1));
ModLoader.AddRecipe(new ItemStack(Essence, 1), new Object[] { "SSS", "SSS", "SSS", Character.valueOf('S'), Shadow});
ModLoader.AddRecipe(new ItemStack(Pure, 1), new Object[] { "EEE", "EEE", "EEE", Character.valueOf('E'), Essence});
ModLoader.AddRecipe(new ItemStack(Unstable, 1), new Object[] { "M", "F", Character.valueOf('M'), Item.magmaCream, Character.valueOf('F'), Fragment});
ModLoader.AddRecipe(new ItemStack(Fear, 1), new Object[] { " F", "GU ", "SG", Character.valueOf('F'), Item.flint, Character.valueOf('G'), Item.ghastTear, Character.valueOf('U'), Unstable, Character.valueOf('S'), Item.stick});
ModLoader.AddRecipe(new ItemStack(Corrupted, 1), new Object[] { "E", "B", Character.valueOf('E'), Essence, Character.valueOf('B'), Item.blazeRod});
ModLoader.AddRecipe(new ItemStack(Fused, 1), new Object[] { "OCO", Character.valueOf('O'), Fragment, Character.valueOf('C'), Corrupted});
ModLoader.AddSmelting(mod_Shadow.Fused.shiftedIndex, new ItemStack(Refined, 1));
ModLoader.AddRecipe(new ItemStack(Dark, 1), new Object[] { "E", "P", Character.valueOf('E'), Essence, Character.valueOf('P'), Item.enderPearl});
ModLoader.AddRecipe(new ItemStack(Seeker, 1), new Object[] { " P ", " E ", " C ", Character.valueOf('P'), Pure, Character.valueOf('E'), Essence, Character.valueOf('C'), Corrupted});
ModLoader.AddRecipe(new ItemStack(Shadowsword, 1), new Object[] { "ODO", "FSB", "PRP", Character.valueOf('O'), Fragment, Character.valueOf('D'), Dark, Character.valueOf('F'), Fear, Character.valueOf('S'), Seeker, Character.valueOf('B'), Ooze, Character.valueOf('P'), Pure, Character.valueOf('R'), Refined});
1
01/20/2012 6:55 am
Level 31 : Artisan Network
ZaphodX
avatar
Read through your code it looks like you have tried to put a character in something you have declared as an integer.
1
01/20/2012 6:52 am
Level 67 : High Grandmaster Modder
Jt9
avatar
i was trying to add a crafting recipe for the new mod

i dont know if there is just one recipe that is causing it, because minecraft coder pack recompiled it without giving any errors
1
01/20/2012 6:50 am
Level 31 : Artisan Network
ZaphodX
avatar
Like mrstreethobo said we need more details. If you are using Eclipse it should show you an error on the line where it is . Looks like you are mixing up integers and character with how you have tried to initialise them.

@mrstreethobo
Please don't double post, just use the edit button.
1
01/20/2012 6:47 am
Level 49 : Master Pony
mrstreethobo
avatar
maybe change the integer name and see if that works.
1
01/20/2012 6:46 am
Level 49 : Master Pony
mrstreethobo
avatar
what exactly are you trying to do. That would help a lot.

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome