From f0ee97bce0c87245f0657812e72a83eebc9c5e32 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 5 May 2024 18:32:57 +0100 Subject: [PATCH] Disable item glints when rendering the auras. Fixes #257 --- .../client/render/LevitatingItemRenderer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/minelittlepony/client/render/LevitatingItemRenderer.java b/src/main/java/com/minelittlepony/client/render/LevitatingItemRenderer.java index 3d272c19..7cb611e3 100644 --- a/src/main/java/com/minelittlepony/client/render/LevitatingItemRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/LevitatingItemRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.client.render.*; import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.component.DataComponentTypes; import net.minecraft.entity.LivingEntity; import net.minecraft.item.CrossbowItem; import net.minecraft.item.ItemStack; @@ -56,6 +57,11 @@ public class LevitatingItemRenderer { if (doMagic) { VertexConsumerProvider interceptedContext = getProvider(pony, renderContext); + if (stack.hasGlint()) { + stack = stack.copy(); + stack.set(DataComponentTypes.ENCHANTMENT_GLINT_OVERRIDE, false); + } + matrix.scale(1.1F, 1.1F, 1.1F); matrix.translate(0.015F, 0.01F, 0.01F);