mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Disable the hitbox in first person mode
This commit is contained in:
parent
ab22d05a1e
commit
70797a1883
1 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,7 @@ import net.minecraft.util.math.Box;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
import com.minelittlepony.api.model.RenderPass;
|
||||||
import com.minelittlepony.api.pony.IPony;
|
import com.minelittlepony.api.pony.IPony;
|
||||||
import com.minelittlepony.client.PonyBounds;
|
import com.minelittlepony.client.PonyBounds;
|
||||||
|
|
||||||
|
@ -19,6 +20,10 @@ public final class DebugBoundingBoxRenderer {
|
||||||
|
|
||||||
public static <T extends LivingEntity> void render(IPony pony, EntityRenderer<T> renderer, T entity, MatrixStack stack, VertexConsumerProvider renderContext, float tickDelta) {
|
public static <T extends LivingEntity> void render(IPony pony, EntityRenderer<T> renderer, T entity, MatrixStack stack, VertexConsumerProvider renderContext, float tickDelta) {
|
||||||
|
|
||||||
|
if (RenderPass.getCurrent() != RenderPass.WORLD) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MinecraftClient client = MinecraftClient.getInstance();
|
MinecraftClient client = MinecraftClient.getInstance();
|
||||||
|
|
||||||
if (!client.getEntityRenderDispatcher().shouldRenderHitboxes() || entity.isInvisible() || client.hasReducedDebugInfo()) {
|
if (!client.getEntityRenderDispatcher().shouldRenderHitboxes() || entity.isInvisible() || client.hasReducedDebugInfo()) {
|
||||||
|
|
Loading…
Reference in a new issue