Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing particle options #2477

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.spongepowered.api.registry.RegistryTypes;
import org.spongepowered.api.util.Color;
import org.spongepowered.api.util.Direction;
import org.spongepowered.api.util.Ticks;
import org.spongepowered.math.vector.Vector3d;

/**
Expand Down Expand Up @@ -74,21 +75,21 @@ public final class ParticleOptions {
*/
public static final DefaultedRegistryReference<ParticleOption<Color>> COLOR = ParticleOptions.key(ResourceKey.sponge("color"));

/**
* This option will affect the delay of particles that are spawned.
* The only vanilla {@link ParticleType}s this option isn't applicable to are:
*
* <ul>
* <li>{@link ParticleTypes#SHRIEK}</li>
* </ul>
*/
public static final DefaultedRegistryReference<ParticleOption<Integer>> DELAY = ParticleOptions.key(ResourceKey.sponge("delay"));

/**
* This option will change the direction of a particle.
*/
public static final DefaultedRegistryReference<ParticleOption<Direction>> DIRECTION = ParticleOptions.key(ResourceKey.sponge("direction"));

// /** TODO
// * This option will modify the color of a particle. The only vanilla
// * {@link ParticleType}s this option is applicable to is
// * {@link ParticleTypes#FIREWORKS}.
// *
// * <p>The {@link List} may never be empty. Or a {@link IllegalArgumentException}
// * will be thrown when applying.</p>
// */
// public static final Supplier<ParticleOption<List<FireworkEffect>>> FIREWORK_EFFECTS = Sponge.getRegistry().getCatalogRegistry().provideSupplier(ParticleOption.class, "firework_effects");

/**
* This option will affect the appearance of a particle. The only vanilla
* {@link ParticleType} this option is applicable to are:
Expand All @@ -101,13 +102,6 @@ public final class ParticleOptions {
*/
public static final DefaultedRegistryReference<ParticleOption<ItemStackSnapshot>> ITEM_STACK_SNAPSHOT = ParticleOptions.key(ResourceKey.sponge("item_stack_snapshot"));

// /** TODO
// * This option will affect the appearance of a particle. The only vanilla
// * {@link ParticleType} this option is applicable to is
// * {@link ParticleTypes#NOTE}.
// */
// public static final Supplier<ParticleOption<NotePitch>> NOTE = Sponge.getRegistry().getCatalogRegistry().provideSupplier(ParticleOption.class, "note");

/**
* This option will affect how all the particles are spread.
*/
Expand All @@ -134,6 +128,16 @@ public final class ParticleOptions {
*/
public static final DefaultedRegistryReference<ParticleOption<Integer>> QUANTITY = ParticleOptions.key(ResourceKey.sponge("quantity"));

/**
* This option will change the roll of a particle. The only
* vanilla {@link ParticleType}s this option is applicable to is:
*
* <ul>
* <li>{@link ParticleTypes#SCULK_CHARGE}</li>
* </ul>
*/
public static final DefaultedRegistryReference<ParticleOption<Double>> ROLL = ParticleOptions.key(ResourceKey.sponge("roll"));

/**
* This option will change the scale of a particle. The only
* vanilla {@link ParticleType}s this option is applicable to is:
Expand All @@ -147,21 +151,25 @@ public final class ParticleOptions {
*/
public static final DefaultedRegistryReference<ParticleOption<Double>> SCALE = ParticleOptions.key(ResourceKey.sponge("scale"));

// /** TODO
// * This option will affect whether a particle type will have a lower
// * velocity in the horizontal plane. The only vanilla {@link ParticleType}s
// * that this option will affect are:
// *
// * <ul>
// * <li>{@link ParticleTypes#EFFECT}</li>
// * <li>{@link ParticleTypes#INSTANT_EFFECT}</li>
// * <li>{@link ParticleTypes#WITCH_MAGIC}</li>
// * </ul>
// *
// * <p>These particle types don't have a configurable velocity (through
// * {@link #VELOCITY}) in the horizontal plane.</p>
// */
// public static final Supplier<ParticleOption<Boolean>> SLOW_HORIZONTAL_VELOCITY = Sponge.getRegistry().getCatalogRegistry().provideSupplier(ParticleOption.class, "slow_horizontal_velocity");
/**
* This option will change the color the transition particle will change to.
* The only vanilla {@link ParticleType}s this option is applicable to is:
*
* <ul>
* <li>{@link ParticleTypes#DUST_COLOR_TRANSITION}</li>
* </ul>
*/
public static final DefaultedRegistryReference<ParticleOption<Color>> TO_COLOR = ParticleOptions.key(ResourceKey.sponge("to_color"));

/**
* This option will change the travel time of a particle.
* The only vanilla {@link ParticleType}s this option is applicable to is:
*
* <ul>
* <li>{@link ParticleTypes#VIBRATION}</li>
* </ul>
*/
public static final DefaultedRegistryReference<ParticleOption<Ticks>> TRAVEL_TIME = ParticleOptions.key(ResourceKey.sponge("travel_time"));

/**
* This option will affect how most particles are moving.
Expand Down