Fixed apple textures

This commit is contained in:
Sollace 2019-01-30 22:26:05 +02:00
parent 7f91a0758c
commit 89cc446be7
2 changed files with 8 additions and 4 deletions

View file

@ -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,

View file

@ -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]));
}
}
}