Send last PoseStack pos to RenderLevelStageEvent AFTER_PARTICLES stage. Fixes #10031

This commit is contained in:
LexManos committed 2024-07-02 10:12:16 -07:00
1 parent 4fcf1877c1
commit 4d85053a4d
2 files changed
+4 -3

No files matched your search

@@ -139,7 +139,7 @@
profilerfiller.popPush("particles");
- this.minecraft.particleEngine.render(p_109606_, p_109604_, f);
+ this.minecraft.particleEngine.render(p_109606_, p_109604_, f, frustum);
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES.dispatch(this, p_254120_, p_254120_, this.ticks, p_109604_, frustum);
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES.dispatch(this, posestack.last().pose(), p_254120_, this.ticks, p_109604_, frustum);
RenderStateShard.PARTICLES_TARGET.clearRenderState();
} else {
profilerfiller.popPush("translucent");
@@ -149,7 +149,7 @@
profilerfiller.popPush("particles");
- this.minecraft.particleEngine.render(p_109606_, p_109604_, f);
+ this.minecraft.particleEngine.render(p_109606_, p_109604_, f, frustum);
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES.dispatch(this, p_254120_, p_254120_, this.ticks, p_109604_, frustum);
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES.dispatch(this, posestack.last().pose(), p_254120_, this.ticks, p_109604_, frustum);
}
if (this.minecraft.options.getCloudsType() != CloudStatus.OFF) {
@@ -77,8 +77,9 @@ public class RenderLevelStageEvent extends Event {
}
/**
* {@return the pose stack used for rendering}
* @deprecated Mojang has stopped passing around PosStacks. getProjectionMatrix should be enough.
*/
@Deprecated(forRemoval = true, since = "1.21")
public Matrix4f getPoseStack() {
return poseStack;
}