From 638e1916420329d34646b03c4e24d697d7536ce9 Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Sat, 18 Sep 2021 18:15:49 +0300 Subject: Consistency --- src/main/java/shcm/shsupercm/fabric/citresewn/ActiveCITs.java | 11 ++++++----- .../shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java | 6 +----- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn') diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/ActiveCITs.java b/src/main/java/shcm/shsupercm/fabric/citresewn/ActiveCITs.java index cb765b4..982e1bc 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/ActiveCITs.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/ActiveCITs.java @@ -60,11 +60,12 @@ public class ActiveCITs { List citItems = this.citItems.get(stack.getItem()); if (citItems != null) - for (CITItem citItem : citItems) { - bakedModel = citItem.getItemModel(stack, hand, (ClientWorld) world, entity, seed); - if (bakedModel != null) - break; - } + for (CITItem citItem : citItems) + if (citItem.test(stack, hand, world, entity)) { + bakedModel = citItem.getItemModel(stack, hand, (ClientWorld) world, entity, seed); + if (bakedModel != null) + break; + } if (bakedModel != null && bakedModel.getOverrides() != null) bakedModel = bakedModel.getOverrides().apply(bakedModel, stack, (ClientWorld) world, entity, seed); diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java index c99ba12..cfddf09 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java @@ -315,11 +315,7 @@ public class CITItem extends CIT { } public BakedModel getItemModel(ItemStack stack, Hand hand, ClientWorld world, LivingEntity entity, int seed) { - if (test(stack, hand, world, entity)) { - return bakedSubModels.apply(this.bakedModel, stack, world, entity, seed); - } - - return null; + return bakedSubModels.apply(this.bakedModel, stack, world, entity, seed); } public static class CITOverrideList extends ModelOverrideList { -- cgit