Jump to content

Miclebrick

Members
  • Posts

    30
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Miclebrick's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. 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 )
  2. @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.
  3. I'm going to try to use reflection to remove the model first.
  4. 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)
  5. It seems the problem with ItemMeshDefinition is that getModelLocation() is never called. I can't figure out why.
  6. Is it possible to specify custom item overrides based off of nbt data?
  7. 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?
  8. If I handle the bake event, would I be able to do the original method?
  9. 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
  10. 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.
  11. 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.
  12. I don't have any access to the ItemStack here though, so how can I change it using the lore or name?
  13. 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?
  14. Also, I noticed that MinecraftForgeClient.registerItemRenderer is not a thing in 1.9. Any reason for this?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.