From 89cc446be7a1df337b2e79f7377d80fd123a7f76 Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 30 Jan 2019 22:26:05 +0200 Subject: [PATCH] Fixed apple textures --- src/main/java/com/minelittlepony/unicopia/UItems.java | 3 ++- .../unicopia/forgebullshit/ItemModels.java | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/UItems.java b/src/main/java/com/minelittlepony/unicopia/UItems.java index 8e9cf2b7..7a70667e 100644 --- a/src/main/java/com/minelittlepony/unicopia/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/UItems.java @@ -186,10 +186,11 @@ public class UItems { if (UClient.isClientSide()) { ItemModels.registerAllVariants(cloud_slab, CloudType.getVariants("_cloud_slab")); ItemModels.registerAllVariants(cloud_block, CloudType.getVariants("_cloud_block")); + ItemModels.registerAllVariants(apple, Unicopia.MODID, apple.getVariants()); ItemModels.registerAll( cloud_spawner, - apple, zap_apple, + zap_apple, rotten_apple, cooked_zap_apple, dew_drop, tomato, cloudsdale_tomato, diff --git a/src/main/java/com/minelittlepony/unicopia/forgebullshit/ItemModels.java b/src/main/java/com/minelittlepony/unicopia/forgebullshit/ItemModels.java index 3185be36..194a23c3 100644 --- a/src/main/java/com/minelittlepony/unicopia/forgebullshit/ItemModels.java +++ b/src/main/java/com/minelittlepony/unicopia/forgebullshit/ItemModels.java @@ -23,9 +23,12 @@ public class ItemModels { * Registers a model for the given item and all associated variants. */ public static void registerAllVariants(Item item, String... variants) { - for (int i = 0; i < variants.length; i++) { - ModelLoader.setCustomModelResourceLocation(item, i, new ModelResourceLocation(item.getRegistryName().getNamespace() + ":" + variants[i])); - } + registerAllVariants(item, item.getRegistryName().getNamespace(), variants); } + public static void registerAllVariants(Item item, String domain, String... variants) { + for (int i = 0; i < variants.length; i++) { + ModelLoader.setCustomModelResourceLocation(item, i, new ModelResourceLocation(domain + ":" + variants[i])); + } + } }