Posted February 8, 201510 yr So im trying to register 2 different items with metadata sensitve models. Now it finds the model and all but the models for the second item appear on the first item. I cant seem to find the error in this, mainly because i haven't done this before with 1.8. So here is the registering code: private void registerFishItemModels(){ List<String> rawFishModelNames = new ArrayList(); List<String> cookedFishModelNames = new ArrayList(); for(int i = 0; i < FishRegistry.getFishTypeList().length; i++){ FishType fish = FishRegistry.getFishFromID(i); if(fish == null) continue; String s = JUtils.capitalize(fish.fishName); String rawName = Fishing.ID + ":fish" + s + "Raw"; registerItemModelWithMeta(FishingItems.rawFish, i, rawName); rawFishModelNames.add(rawName); if(fish.isCookable()){ String cookedName = Fishing.ID + ":fish" + s + "Cooked"; registerItemModelWithMeta(FishingItems.cookedFish, i, cookedName); cookedFishModelNames.add(cookedName); } } ModelBakery.addVariantName(FishingItems.rawFish, JUtils.convertStringList(rawFishModelNames)); ModelBakery.addVariantName(FishingItems.cookedFish, JUtils.convertStringList(cookedFishModelNames)); } private void registerItemModelWithMeta(Item item, int meta, String loc){ Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(FishingItems.rawFish, meta, new ModelResourceLocation(loc, "inventory")); } *The JUtils class is just an helper class to convert a list to array So the models for the cooked fish appear on the raw fish and non appear on the raw fish. Any help would be greatly apreciated because i cant seem to figure it out. http://www.minecraftforum.net/topic/1937703-162smpforge-pet-mastery-hatch-level-battle/
February 9, 201510 yr Dude... you need more sleep private void registerItemModelWithMeta(Item item, int meta, String loc){ Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( FishingItems.rawFish, // aiiiiee meta, new ModelResourceLocation(loc, "inventory")); -TGG
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.