Skip to content

Commit

Permalink
Fixed hypothetic NPE crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Asek3 committed Jan 12, 2024
1 parent 2752c29 commit a78c989
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ private void preRenderParticles(Entity entity, float partialTicks, CallbackInfo

@WrapWithCondition(method = {"renderParticles", "renderLitParticles"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/Particle;renderParticle(Lnet/minecraft/client/renderer/BufferBuilder;Lnet/minecraft/entity/Entity;FFFFFF)V"))
private boolean filterParticleList(Particle particle, BufferBuilder f8, Entity f9, float f10, float f11, float f12, float vec3d, float v, float buffer) {
if(this.cullingFrustum == null) {
return true;
}

AxisAlignedBB box = particle.getBoundingBox();

// Hack: Grow the particle's bounding box in order to work around mis-behaved particles
Expand Down

0 comments on commit a78c989

Please sign in to comment.