Skip to content

Commit

Permalink
1.20.5 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Oct 21, 2024
1 parent a44f7a1 commit 8b557ed
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8b557ed

Please sign in to comment.