Posted December 25, 20168 yr Hi, I have a problem, it's this : My item is big and I don't know why. And, I'm in 1.9.4, my code : In first : public class ItemRedBlue_Fragment extends Item { public ItemRedBlue_Fragment() { setUnlocalizedName(Reference.Items.FRAGMENT.getUnlocalizedName()); setRegistryName(Reference.Items.FRAGMENT.getRegistryName()); setMaxStackSize(120); } } After : public class ModItems { public static Item redblue_fragment; public static void init() { redblue_fragment = new ItemRedBlue_Fragment(); } public static void register() { GameRegistry.register(redblue_fragment); } public static void registerRenders() { registerRender(redblue_fragment); } private static void registerRender(Item i) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(i, 0, new ModelResourceLocation(i.getRegistryName(), "inventory")); } } (The function register is call in the FMLPreInitializationEvent)
December 25, 20168 yr Author My JSON file : { "parent": "builtin/generated", "textures": { "layer0": "redmod:items/redblue_fragment" } }
December 25, 20168 yr Just for understanding: "builtin" is the "the parent is the stuff that is created via actual javacode." But as that's merely a template with the files being able to specify overrides, the rotation, scale, and suchlike are all handled by the json files. Hence the top-most parent for everything else is "item/generated" as it is a direct child of "builtin/generated" but supplies the necessary default overrides for Minecraft's aesthetic. 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.
December 25, 20168 yr Author Okay, thanks for this explanation, I started and I just followed the tutorials of MrCrayfish.
December 25, 20168 yr TBH I think his tutorials are both out-dated and cringe-worthy. Not that they don't work, but that they do a few things that make no sense in the context of teaching new people how to do things and it ends up being very cargo cult-y. And it makes it hard for us on a forum to debug because the poster doesn't actually know which bit they should be posting and we don't know which bit to ask for. We know what piece of code we want to examine but we don't know where they've put it. One example is: @mod class invokes a proxy method proxy invokes a ModBlocks method That method then instantiates each block and registers it (calling yet more proxy methods) The user then posts the block class and says that the model isn't working and there's no error message in the console. So we ask for the main mod class. Then have to ask for the proxy. Then have to ask for the ModBlocks class. And only then can we (through tedious tracing) figure out that they missed a step: their ModBlocks method doesn't actually call anything at all! Or maybe they were forwarding the Forge events through this chain (why!?) and somewhere along the way they wrote preInit(FMLInitializationEvent event) . See how that took three attempts to get the information us (more experienced modders) needed in order to help? 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.