Skip to content

fix: skip chest particles that require typed data instead of crashing#516

Merged
tastybento merged 1 commit intodevelopfrom
fix/chest-particle-typed-data
May 3, 2026
Merged

fix: skip chest particles that require typed data instead of crashing#516
tastybento merged 1 commit intodevelopfrom
fix/chest-particle-typed-data

Conversation

@tastybento
Copy link
Copy Markdown
Member

Summary

  • chestParticle() previously only constructed particle data for Particle.DUST. For every other particle type, particleData stayed null, and World#spawnParticle would throw IllegalArgumentException if the configured particle required non-void data (e.g. ITEM, BLOCK, ENTITY_EFFECT).
  • Detect particles whose getDataType() is non-Void, log a warning naming the configured particle, and return early instead of spawning.
  • DUST and particles whose data type is Void continue to work unchanged.

Test plan

  • Configure a non-DUST particle that requires data (e.g. ITEM) and confirm a warning is logged instead of an exception.
  • Configure DUST and confirm the existing rarity-colored dust still spawns.
  • Configure a void-data particle (e.g. FLAME) and confirm it still spawns.

🤖 Generated with Claude Code

Particle.DUST is the only particle type for which we can construct the
required DustOptions data. Previously, any other particle type fell to
particleData = null, and spawnParticle would throw
IllegalArgumentException when the configured particle required
non-void data (e.g. ITEM, BLOCK, ENTITY_EFFECT).

Detect particles with non-void getDataType(), log a warning naming the
configured particle, and return early instead of spawning. DUST and
particles with Void data still work as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tastybento tastybento merged commit 91f422f into develop May 3, 2026
1 check passed
@tastybento tastybento deleted the fix/chest-particle-typed-data branch May 3, 2026 00:35
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 3, 2026

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant