diff options
author | SHsuperCM <shsupercm@gmail.com> | 2021-09-15 06:34:09 +0300 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2021-09-15 06:34:09 +0300 |
commit | a0d74c1cd675c2250e5d49b7bd55921e70aedc0e (patch) | |
tree | 20e5c63137b3e2035e7c165750ef23e12424d14e /src/main/java | |
parent | 04503b155395836605f8463f2e71520eabc67bfc (diff) | |
download | CITResewn-a0d74c1cd675c2250e5d49b7bd55921e70aedc0e.tar.gz CITResewn-a0d74c1cd675c2250e5d49b7bd55921e70aedc0e.tar.bz2 CITResewn-a0d74c1cd675c2250e5d49b7bd55921e70aedc0e.zip |
Fixed no world for gui items
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java index 1014a44..1b39512 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java @@ -1,5 +1,6 @@ package shcm.shsupercm.fabric.citresewn.mixin.cititem; +import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.render.model.BakedModel; import net.minecraft.entity.LivingEntity; @@ -19,7 +20,7 @@ public class ItemRendererMixin { if (!CITResewnConfig.INSTANCE().enabled || CITResewn.INSTANCE.activeCITs == null) return; - BakedModel citModel = CITResewn.INSTANCE.activeCITs.getItemModel(stack, cir.getReturnValue(), world, entity); + BakedModel citModel = CITResewn.INSTANCE.activeCITs.getItemModel(stack, cir.getReturnValue(), world == null ? MinecraftClient.getInstance().world : world, entity); if (citModel != null) cir.setReturnValue(citModel); } |