Posted June 26, 20187 yr so i started modding for 1.8 recreating a mod i made in 1.7.10, but after i made a third item the game would not load here's the crashed report it says something about the same item being registered twice crash-2018-06-26_09.55.26-client.txt Edited June 26, 20187 yr by TheMysticMinecart Myles
June 26, 20187 yr ...code? Also, 1.8 is ancient. If you want to use 1.8, at least use 1.8.9 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.
June 26, 20187 yr Author 24 minutes ago, Draco18s said: ...code? Also, 1.8 is ancient. If you want to use 1.8, at least use 1.8.9 ture but i want to make my mods available for many version plus people use 1.7.10 and 1.10 allot still so my plan was to update my mods from 1.7 to 1.8 to 1.9 ect. code(do you only need the item code?): package mysticmyles.Anime_Dekokurafuto.init; import mysticmyles.Anime_Dekokurafuto.Reference; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; public class AnimeItems { public static Item uchiha_logo_item; public static Item yugioh_cardback_item; public static Item dragon_ball_logo0_item; public static void init() { uchiha_logo_item = new Item().setUnlocalizedName("uchiha_logo_item"); yugioh_cardback_item = new Item().setUnlocalizedName("yugioh_cardback_item"); dragon_ball_logo0_item = new Item().setUnlocalizedName("dragon_ball_logo0_item"); } public static void register() { GameRegistry.registerItem(uchiha_logo_item, uchiha_logo_item.getUnlocalizedName().substring(5)); GameRegistry.registerItem(yugioh_cardback_item, yugioh_cardback_item.getUnlocalizedName().substring(5)); GameRegistry.registerItem(yugioh_cardback_item, dragon_ball_logo0_item.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(uchiha_logo_item); registerRender(yugioh_cardback_item); registerRender(dragon_ball_logo0_item); } public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } }
June 26, 20187 yr 6 minutes ago, TheMysticMinecart Myles said: GameRegistry.registerItem(yugioh_cardback_item, yugioh_cardback_item.getUnlocalizedName().substring(5)); GameRegistry.registerItem(yugioh_cardback_item, dragon_ball_logo0_item.getUnlocalizedName().substring(5)); Looks like you're registering yugioh_cardback_item twice. I'm guessing copy & paste are to blame.
June 26, 20187 yr Author 6 minutes ago, Ugdhar said: Looks like you're registering yugioh_cardback_item twice. I'm guessing copy & paste are to blame. wait what 0.0, omg i am so stupid XD wow that was a dumb mistake on my part.... well that's embarrassing i guess this is solved oops
June 26, 20187 yr Author 9 minutes ago, Ugdhar said: Looks like you're registering yugioh_cardback_item twice. I'm guessing copy & paste are to blame. thanks XD
June 26, 20187 yr Also, don't set the registry name to the unlocalized name. Set the unlocaled name to the registry name. Unlocalized names should be used for displaying the item's name only. Problematic Code #7 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.
June 26, 20187 yr Author 18 minutes ago, Draco18s said: Also, don't set the registry name to the unlocalized name. Set the unlocaled name to the registry name. Unlocalized names should be used for displaying the item's name only. Problematic Code #7 so do i just do it like it's done in (1.7.10 the unlocalized name) and how different is 1.8.9 to 1.8
June 26, 20187 yr item.setUnlocalizedName(item.getRegistryName().toString()); 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.
June 28, 20187 yr Author On 6/26/2018 at 1:43 PM, Draco18s said: item.setUnlocalizedName(item.getRegistryName().toString()); uchiha_logo_item = new Item().setUnlocalizedName(item.getRegistryName().toString()); do you mean like this?
June 28, 20187 yr item is a local variable. So no, your code there won't work. 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.
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.