aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-09-18 18:15:49 +0300
committerSHsuperCM <shsupercm@gmail.com>2021-09-18 18:15:49 +0300
commit638e1916420329d34646b03c4e24d697d7536ce9 (patch)
tree7ebb464c863c4dcbe12ab2476850aee8570d8636 /src
parent78eeb659b0580880fd0de77d12809af35f63f6fb (diff)
downloadCITResewn-638e1916420329d34646b03c4e24d697d7536ce9.tar.gz
CITResewn-638e1916420329d34646b03c4e24d697d7536ce9.tar.bz2
CITResewn-638e1916420329d34646b03c4e24d697d7536ce9.zip
Consistency
Diffstat (limited to 'src')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/ActiveCITs.java11
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java6
2 files changed, 7 insertions, 10 deletions
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<CITItem> 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 {