harison513 Posted June 8, 2019 Posted June 8, 2019 (edited) Can't find anything on 1.13.2 for this. Edited June 11, 2019 by harison513 Quote
Cadiboo Posted June 11, 2019 Posted June 11, 2019 Wdym item texture variants. You can add overrides like the bow’s pulling animation, but that’s as far as you can go without rendering them yourself. Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
harison513 Posted June 11, 2019 Author Posted June 11, 2019 @SubscribeEvent @SideOnly(Side.CLIENT) public static void registerRenders(ModelRegistryEvent event) { ModelBakery.registerItemVariants(ModItems.EXAMPLE_ITEM, new ModelResourceLocation(ModItems.EXAMPLE_ITEM.getRegistryName(), "inventory")); for (ItemType itemType : ItemType.itemTypes) { ModelBakery.registerItemVariants(ModItems.EXAMPLE_ITEM, itemType.itemModel); } ModelLoader.setCustomMeshDefinition(ModItems.EXAMPLE_ITEM, new ItemMeshDefinition() { @Override public ModelResourceLocation getModelLocation(ItemStack stack) { if (stack.getTagCompound() != null) { return new ModelResourceLocation(Mod.MODID + ":" + stack.getTagCompound().getString("ItemType"), "inventory"); } else { return new ModelResourceLocation(Mod.MODID + ":" + defaultTexture, "inventory"); } } }); } Here's an example of what I mean. You would register all the model variants for your item, then use the getModelLocation method to return a different model depending on itemstack properties. Apologies if that was unclear. This was for 1.12.2, not even sure if this was the correct way to do it, but I can't work out the way to do it for 1.13.2. Quote
Draco18s Posted June 11, 2019 Posted June 11, 2019 You shouldn't be doing this in 1.13, you should be using two separate item instances. Quote 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.
harison513 Posted June 11, 2019 Author Posted June 11, 2019 On 6/11/2019 at 4:51 PM, Draco18s said: You shouldn't be doing this in 1.13, you should be using two separate item instances. Expand Alright, cheers for letting me know. Quote
Recommended Posts
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.