Skip to content

Conversation

Wolfizen
Copy link
Contributor

This particle type was commented out, I implemented this option in SpongePowered/Sponge#3368 so this PR adds the option back to the API.

* vanilla {@link ParticleType}s this option is applicable to is:
*
* <ul>
* <li>{@link ParticleTypes#DUST}</li>
Copy link
Contributor Author

@Wolfizen Wolfizen Apr 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed this documentation because dust is the only particle whose size can be changed with the /particle command (MC 1.16). I'm not sure if there are other particles that can still have their size modified by packet options.

@ImMorpheus ImMorpheus added api: 8 (u) version: 1.16 (unsupported since Oct 17th 2023) status: needs review status: needs testing labels Apr 23, 2021
Copy link
Contributor

@ImMorpheus ImMorpheus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Wolfizen This looks good.

Can you add a default method to ParticleEffect.Builder ? See

* Sets the velocity of the particle effect.
*
* <p>The default velocity is {@link Vector3d#ZERO}.</p>
*
* @param velocity The velocity
* @return This builder for chaining
*/
default Builder velocity(Vector3d velocity) {
return this.option(ParticleOptions.VELOCITY, velocity);
}
/**
* Sets the offset of the particle effect.
*
* <p>The default offset is {@link Vector3d#ZERO}.</p>
*
* @param offset The offset
* @return This builder for chaining
*/
default Builder offset(Vector3d offset) {
return this.option(ParticleOptions.OFFSET, offset);
}
/**
* Sets the amount of particles of the particle effect.
*
* <p>The default quantity is 1.</p>
*
* @param quantity The quantity particles
* @return This builder, for chaining
* @throws IllegalArgumentException If the quantity is less than one
*/
default Builder quantity(int quantity) throws IllegalArgumentException {
return this.option(ParticleOptions.QUANTITY, quantity);
}

@Wolfizen
Copy link
Contributor Author

Can you add a default method to ParticleEffect.Builder ? See

@ImMorpheus Done and re-tested. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: 8 (u) version: 1.16 (unsupported since Oct 17th 2023) status: needs review status: needs testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants