From 70797a188386cf8605ff44e8b3085e0512b6007a Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 27 Mar 2023 16:46:02 +0100 Subject: [PATCH] Disable the hitbox in first person mode --- .../client/render/DebugBoundingBoxRenderer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/minelittlepony/client/render/DebugBoundingBoxRenderer.java b/src/main/java/com/minelittlepony/client/render/DebugBoundingBoxRenderer.java index 12699fe8..309165c1 100644 --- a/src/main/java/com/minelittlepony/client/render/DebugBoundingBoxRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/DebugBoundingBoxRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.util.math.Box; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; +import com.minelittlepony.api.model.RenderPass; import com.minelittlepony.api.pony.IPony; import com.minelittlepony.client.PonyBounds; @@ -19,6 +20,10 @@ public final class DebugBoundingBoxRenderer { public static void render(IPony pony, EntityRenderer renderer, T entity, MatrixStack stack, VertexConsumerProvider renderContext, float tickDelta) { + if (RenderPass.getCurrent() != RenderPass.WORLD) { + return; + } + MinecraftClient client = MinecraftClient.getInstance(); if (!client.getEntityRenderDispatcher().shouldRenderHitboxes() || entity.isInvisible() || client.hasReducedDebugInfo()) {