From fe0f1383ce9829f2999ecbdad6d427bed4dcb48e Mon Sep 17 00:00:00 2001 From: Exidex Date: Sun, 12 Nov 2017 19:05:39 +0100 Subject: [PATCH] Working metaitem rendering. --- .../java/gregtech/api/items/materialitem/MaterialMetaItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/items/materialitem/MaterialMetaItem.java b/src/main/java/gregtech/api/items/materialitem/MaterialMetaItem.java index 25aa362d..9fb0f67f 100644 --- a/src/main/java/gregtech/api/items/materialitem/MaterialMetaItem.java +++ b/src/main/java/gregtech/api/items/materialitem/MaterialMetaItem.java @@ -69,7 +69,7 @@ public class MaterialMetaItem extends StandardMetaItem { int orePrefixAmount = (int) Arrays.stream(this.orePrefixes).filter(Objects::nonNull).count(); ModelLoader.setCustomMeshDefinition(this, stack -> { - if (stack.getMetadata() < orePrefixAmount) { + if (stack.getMetadata() < orePrefixAmount * 1000) { OrePrefix prefix = this.orePrefixes[stack.getMetadata() / 1000]; Material material = Material.MATERIAL_REGISTRY.getObjectById(stack.getMetadata() % 1000); return new ModelResourceLocation(prefix.materialIconType.getItemModelPath(material.materialIconSet), "inventory");