Skip to content

Disabling firework particles crashes the game #39

Closed

Description

@ItsEmpa

Minecraft doesn't have handling of a nullable particle in FireworkParticles.Starter.createParticle

image

And when fireworks particle are disabled, it returns null in createParticle

@Inject(
method = "createParticle(Lnet/minecraft/core/particles/ParticleOptions;DDDDDD)Lnet/minecraft/client/particle/Particle;",
at = @At("HEAD"),
cancellable = true
)
private void overflowparticles$captureTypeA(ParticleOptions options, double d, double e, double f, double g, double h, double i, CallbackInfoReturnable<Particle> cir) {
overflowparticles$currentType = options.getType();
if (!overflowparticles$shouldSpawn(overflowparticles$currentType)) {
cir.setReturnValue(null);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions