Skip to content

Add particle data to particles - #2279

Closed
neeleshpoli wants to merge 5 commits into
Pumpkin-MC:masterfrom
neeleshpoli:master
Closed

Add particle data to particles#2279
neeleshpoli wants to merge 5 commits into
Pumpkin-MC:masterfrom
neeleshpoli:master

Conversation

@neeleshpoli

@neeleshpoli neeleshpoli commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds data fields to the particles, using automatically generated code with pumpkin-codegen. A struct is created for each particle, and they all implement SerializeParticleData trait.

Changes (in this repository)

  • Update pumpkin-codegen to generate structs for each particle and respective SerializeParticleData implementation
    • Note: Vibration and Item particles are not implemented due to the complexity of the data. For now, they are particles without fields.
  • Update all occurrences of the old Particles enum to use the new generated structs
  • Update command argument parser to use new Particle structs
    • Note: Currently only the particles without data fields are implemented for the particle argument parser.
  • Correct the particle type of Armor Stands (closes Armor stands produce death particles when destroyed #1621)

Testing

I didn't add any tests, but I performed manual testing:

  • Using particle command
  • Breaking armor stands
  • Breaking blocks where particles were refactored (like sponge blocks)

Companion PR

This is the PR for the extractor changes.

- Changed the visibility of `get_world_res` from private to super.
- Removed the `spawn_particle` method from `World` to streamline the interface for plugins. Generate a new spawn function for each particle for plugins to spawn functions.
- Updated the `spawn_particle` method in `World` to accept a generic particle type that implements `SerializeParticleData`.
- Adjusted particle spawning logic to use the new generic approach, ensuring compatibility with different particle types.
@neeleshpoli

Copy link
Copy Markdown
Contributor Author

Ok didn't realize that I actually didn't need to create the PR for the wit-types repo, will close that.

@RoosterBooster007 RoosterBooster007 added the enhancement New feature or request label Jun 18, 2026
@Snowiiii Snowiiii closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Armor stands produce death particles when destroyed

3 participants