From 592b74662881024bc9ee3a39d9ae8bd5f571fce4 Mon Sep 17 00:00:00 2001 From: FirstMegaGame4 <84094287+FirstMegaGame4@users.noreply.github.com> Date: Fri, 26 Apr 2024 00:10:27 +0200 Subject: [PATCH] Fix ItemRendererMixin --- .../mmodding_lib/mixin/injectors/client/ItemRendererMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/mmodding/mmodding_lib/mixin/injectors/client/ItemRendererMixin.java b/src/main/java/com/mmodding/mmodding_lib/mixin/injectors/client/ItemRendererMixin.java index 8201fd2..fa82f83 100644 --- a/src/main/java/com/mmodding/mmodding_lib/mixin/injectors/client/ItemRendererMixin.java +++ b/src/main/java/com/mmodding/mmodding_lib/mixin/injectors/client/ItemRendererMixin.java @@ -37,7 +37,7 @@ public abstract class ItemRendererMixin { @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformation$Mode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/BakedModel;getTransformation()Lnet/minecraft/client/render/model/json/ModelTransformation;")) private void wrapHeldModels(ItemStack stack, ModelTransformation.Mode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci, @Local(argsOnly = true) LocalRef mutableModel) { Identifier identifier = InventoryModels.EVENT.invoker().getModelForStack(stack); - if ((renderMode == ModelTransformation.Mode.GUI || renderMode == ModelTransformation.Mode.GROUND || renderMode == ModelTransformation.Mode.FIXED) && identifier != null) { + if ((renderMode == ModelTransformation.Mode.GUI) && identifier != null) { mutableModel.set(((BakedModelManagerDuckInterface) this.models.getModelManager()).mmodding_lib$getModel(identifier)); } }