From 018e104f3b1724d226691f69c6f437ab229d111e Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Fri, 10 May 2024 19:58:05 -0400 Subject: [PATCH] Fix more particle culling issues (#951) --- .../client/particle/ItemPickupParticle.java.patch | 14 ++++++++++++++ .../client/ParticleBoundsDebugRenderer.java | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 patches/net/minecraft/client/particle/ItemPickupParticle.java.patch diff --git a/patches/net/minecraft/client/particle/ItemPickupParticle.java.patch b/patches/net/minecraft/client/particle/ItemPickupParticle.java.patch new file mode 100644 index 0000000000..b0309a1a4e --- /dev/null +++ b/patches/net/minecraft/client/particle/ItemPickupParticle.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/client/particle/ItemPickupParticle.java ++++ b/net/minecraft/client/particle/ItemPickupParticle.java +@@ -103,4 +_,11 @@ + this.targetYOld = this.targetY; + this.targetZOld = this.targetZ; + } ++ ++ // Neo: Computing a bounding box for the pickup animation is annoying to patch in, and probably slower than ++ // always rendering it ++ @Override ++ public net.minecraft.world.phys.AABB getRenderBoundingBox(float partialTicks) { ++ return net.minecraft.world.phys.AABB.INFINITE; ++ } + } diff --git a/src/main/java/net/neoforged/neoforge/client/ParticleBoundsDebugRenderer.java b/src/main/java/net/neoforged/neoforge/client/ParticleBoundsDebugRenderer.java index e22522540a..df8937d9dc 100644 --- a/src/main/java/net/neoforged/neoforge/client/ParticleBoundsDebugRenderer.java +++ b/src/main/java/net/neoforged/neoforge/client/ParticleBoundsDebugRenderer.java @@ -45,6 +45,8 @@ public static void onRenderLevelStage(RenderLevelStageEvent event) { } }); + Minecraft.getInstance().renderBuffers().bufferSource().endBatch(RenderType.lines()); + poseStack.popPose(); }