-
Change vanilla item model based off of name/lore
I GOT IT TO WORK WITH ICUSTOMMODELLOADER! It now looks like a potato unless it is named Apple, in which case it looks like an apple. It works as expected My new code: http://pastebin.com/bQAWSUVx Now that I know how, I can use that same concept to make an actual system for it. (Code is very hacky, so anyone reading this shouldn't copy and paste )
-
Change vanilla item model based off of name/lore
@SuppressWarnings("unchecked") private void removeItemFromMesher(Item item, int meta) { try { Field field1 = ItemModelMesher.class.getDeclaredField("simpleShapesCache"); field1.setAccessible(true); Map<Integer, IBakedModel> simpleShapesCache = (Map<Integer, IBakedModel>) field1.get(getMesher()); simpleShapesCache.remove(getIndex(item, meta)); field1.set(getMesher(), simpleShapesCache); Field field2 = ItemModelMesher.class.getDeclaredField("simpleShapes"); field2.setAccessible(true); Map<Integer, ModelResourceLocation> simpleShapes = (Map<Integer, ModelResourceLocation>) field2.get(getMesher()); simpleShapes.remove(getIndex(item, meta)); field2.set(getMesher(), simpleShapes); } catch (NoSuchFieldException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } } I tried doing this on postinit, but it did nothing.
-
Change vanilla item model based off of name/lore
I'm going to try to use reflection to remove the model first.
-
Change vanilla item model based off of name/lore
I discovered in ItemModelMesher: public IBakedModel getItemModel(ItemStack stack) { Item item = stack.getItem(); IBakedModel ibakedmodel = this.getItemModel(item, this.getMetadata(stack)); if (ibakedmodel == null) { ItemMeshDefinition itemmeshdefinition = (ItemMeshDefinition)this.shapers.get(item); if (itemmeshdefinition != null) { ibakedmodel = this.modelManager.getModel(itemmeshdefinition.getModelLocation(stack)); } } if (ibakedmodel == null) { ibakedmodel = this.modelManager.getMissingModel(); } return ibakedmodel; } Does that mean that it's only called for nonexistent meshes? (It checks if baked mesh is null first)
-
Change vanilla item model based off of name/lore
It seems the problem with ItemMeshDefinition is that getModelLocation() is never called. I can't figure out why.
-
Change vanilla item model based off of name/lore
Is it possible to specify custom item overrides based off of nbt data?
-
Change vanilla item model based off of name/lore
http://www.minecraftforge.net/forum/index.php/topic,37398.msg197123.html#msg197123 they were successfully able to use it in 1.9, so I do believe it should work in 1.9. Perhaps it doesn't work because I'm using it with vanilla items?
-
Change vanilla item model based off of name/lore
If I handle the bake event, would I be able to do the original method?
-
Change vanilla item model based off of name/lore
I made it turn to an apple when named Apple, but it crashes when it's a non-apple diamond sword! EDIT: Whoops, forgot to pastebin! http://pastebin.com/wsDQqW5w
-
Change vanilla item model based off of name/lore
I figured out that you can use ItemOverrideList and handleItemState to get the itemstack info, but now I need to know how to generate a baked model from a model json file.
-
Change vanilla item model based off of name/lore
Wouldn't an IBakedModel require me to model it in Techne? I want to use it with Minecraft json models, supplied by the resource pack.
-
Change vanilla item model based off of name/lore
I don't have any access to the ItemStack here though, so how can I change it using the lore or name?
-
Change vanilla item model based off of name/lore
Ok, thanks, I'll try that!
-
Change vanilla item model based off of name/lore
I'm sorry, I tried reading it, but I can't quite understand what exactly I need to do. Could you please explain to me?
-
Change vanilla item model based off of name/lore
Also, I noticed that MinecraftForgeClient.registerItemRenderer is not a thing in 1.9. Any reason for this?
IPS spam blocked by CleanTalk.