Posted August 22, 20169 yr What is the value for a zombie head for crafting? Items.SKULL, 1, 2 crashes minecraft.
August 22, 20169 yr Author ItemStack ZombieEgg = new ItemStack (Items.SPAWN_EGG); applyEntityIdToItemStack(ZombieEgg, "Zombie"); GameRegistry.addRecipe(ZombieEgg, new Object[] {" HE", "ATA", "L L", ('A'), MoDropsItems.zombie_arm,('E'), MoDropsItems.adaptive_egg, Character.valueOf('T'), MoDropsItems.zombie_torso, Character.valueOf('L'), MoDropsItems.zombie_leg, Character.valueOf('H'), Items.SKULL, 1, 2}); Crash: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Character at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:244) at net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:230) at net.minecraftforge.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:225) at orangeVillager61.MoDrops.MoRecipes.addRecipes(MoRecipes.java:116)
August 22, 20169 yr The line above the "at" is the super important very special, extremely crucial line that tells you in English what the problem is. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 22, 20169 yr You have a 1, 2 at the end of your new Object[] array. You cannot have those there, what are you trying to do with those? Also, you do not need new Object[] due to the magic of varargs. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 22, 20169 yr he's trying to set an ItemStack with metadata I think, but no idea why not new ItemStack instead of putting its parameters and expecting it to magically work
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.