From 8b557ed14768103c91f4b63f4add6d4012d7e2b2 Mon Sep 17 00:00:00 2001 From: fayer3 Date: Mon, 21 Oct 2024 14:34:20 +0200 Subject: [PATCH] 1.20.5 fixes --- .../mixin/client_vr/renderer/ItemInHandRendererVRMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/ItemInHandRendererVRMixin.java b/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/ItemInHandRendererVRMixin.java index eff6df4ca..592dcef7a 100644 --- a/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/ItemInHandRendererVRMixin.java +++ b/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/ItemInHandRendererVRMixin.java @@ -10,6 +10,7 @@ import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.core.component.DataComponents; import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.HumanoidArm; @@ -123,7 +124,7 @@ public abstract class ItemInHandRendererVRMixin implements ItemInHandRendererExt ItemDisplayContext itemDisplayContext; // third person transforms for custom model data items, but not spear, shield and crossbow - boolean hasCMD = pStack.hasTag() && pStack.getTag().getInt("CustomModelData") != 0 && + boolean hasCMD = pStack.getComponents().has(DataComponents.CUSTOM_MODEL_DATA) && rendertype != VivecraftItemRendering.VivecraftItemTransformType.Crossbow && rendertype != VivecraftItemRendering.VivecraftItemTransformType.Spear && rendertype != VivecraftItemRendering.VivecraftItemTransformType.Shield;