Convert Particle

This commit is contained in:
DerFrZocker 2023-05-29 14:42:48 +02:00
parent d08d21d1f8
commit eacaa45dbe
No known key found for this signature in database
GPG key ID: 713F71FFFE1DDF91
5 changed files with 242 additions and 157 deletions

View file

@ -1,164 +1,144 @@
package org.bukkit;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import org.bukkit.block.data.BlockData;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.MaterialData;
import org.bukkit.util.OldEnum;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
public enum Particle {
EXPLOSION_NORMAL,
EXPLOSION_LARGE,
EXPLOSION_HUGE,
FIREWORKS_SPARK,
WATER_BUBBLE,
WATER_SPLASH,
WATER_WAKE,
SUSPENDED,
SUSPENDED_DEPTH,
CRIT,
CRIT_MAGIC,
SMOKE_NORMAL,
SMOKE_LARGE,
SPELL,
SPELL_INSTANT,
SPELL_MOB,
SPELL_MOB_AMBIENT,
SPELL_WITCH,
DRIP_WATER,
DRIP_LAVA,
VILLAGER_ANGRY,
VILLAGER_HAPPY,
TOWN_AURA,
NOTE,
PORTAL,
ENCHANTMENT_TABLE,
FLAME,
LAVA,
CLOUD,
public abstract class Particle<D> extends OldEnum<Particle<D>> implements Keyed {
public static final Particle<Void> POOF = getParticle("poof");
public static final Particle<Void> EXPLOSION = getParticle("explosion");
public static final Particle<Void> EXPLOSION_EMITTER = getParticle("explosion_emitter");
public static final Particle<Void> FIREWORK = getParticle("firework");
public static final Particle<Void> BUBBLE = getParticle("bubble");
public static final Particle<Void> SPLASH = getParticle("splash");
public static final Particle<Void> FISHING = getParticle("fishing");
public static final Particle<Void> UNDERWATER = getParticle("underwater");
public static final Particle<Void> CRIT = getParticle("crit");
public static final Particle<Void> ENCHANTED_HIT = getParticle("enchanted_hit");
public static final Particle<Void> SMOKE = getParticle("smoke");
public static final Particle<Void> LARGE_SMOKE = getParticle("large_smoke");
public static final Particle<Void> EFFECT = getParticle("effect");
public static final Particle<Void> INSTANT_EFFECT = getParticle("instant_effect");
public static final Particle<Void> ENTITY_EFFECT = getParticle("entity_effect");
public static final Particle<Void> AMBIENT_ENTITY_EFFECT = getParticle("ambient_entity_effect");
public static final Particle<Void> WITCH = getParticle("witch");
public static final Particle<Void> DRIPPING_WATER = getParticle("dripping_water");
public static final Particle<Void> DRIPPING_LAVA = getParticle("dripping_lava");
public static final Particle<Void> ANGRY_VILLAGER = getParticle("angry_villager");
public static final Particle<Void> HAPPY_VILLAGER = getParticle("happy_villager");
public static final Particle<Void> MYCELIUM = getParticle("mycelium");
public static final Particle<Void> NOTE = getParticle("note");
public static final Particle<Void> PORTAL = getParticle("portal");
public static final Particle<Void> ENCHANT = getParticle("enchant");
public static final Particle<Void> FLAME = getParticle("flame");
public static final Particle<Void> LAVA = getParticle("lava");
public static final Particle<Void> CLOUD = getParticle("cloud");
/**
* Uses {@link Particle.DustOptions} as DataType
*/
REDSTONE(DustOptions.class),
SNOWBALL,
SNOW_SHOVEL,
SLIME,
HEART,
public static final Particle<DustOptions> DUST = getParticle("dust");
public static final Particle<Void> ITEM_SNOWBALL = getParticle("item_snowball");
public static final Particle<Void> ITEM_SLIME = getParticle("item_slime");
public static final Particle<Void> HEART = getParticle("heart");
/**
* Uses {@link ItemStack} as DataType
*/
ITEM_CRACK(ItemStack.class),
public static final Particle<ItemStack> ITEM = getParticle("item");
/**
* Uses {@link BlockData} as DataType
*/
BLOCK_CRACK(BlockData.class),
public static final Particle<BlockData> BLOCK = getParticle("block");
public static final Particle<Void> RAIN = getParticle("rain");
public static final Particle<Void> ELDER_GUARDIAN = getParticle("elder_guardian");
public static final Particle<Void> DRAGON_BREATH = getParticle("dragon_breath");
public static final Particle<Void> END_ROD = getParticle("end_rod");
public static final Particle<Void> DAMAGE_INDICATOR = getParticle("damage_indicator");
public static final Particle<Void> SWEEP_ATTACK = getParticle("sweep_attack");
/**
* Uses {@link BlockData} as DataType
*/
BLOCK_DUST(BlockData.class),
WATER_DROP,
MOB_APPEARANCE,
DRAGON_BREATH,
END_ROD,
DAMAGE_INDICATOR,
SWEEP_ATTACK,
/**
* Uses {@link BlockData} as DataType
*/
FALLING_DUST(BlockData.class),
TOTEM,
SPIT,
SQUID_INK,
BUBBLE_POP,
CURRENT_DOWN,
BUBBLE_COLUMN_UP,
NAUTILUS,
DOLPHIN,
SNEEZE,
CAMPFIRE_COSY_SMOKE,
CAMPFIRE_SIGNAL_SMOKE,
COMPOSTER,
FLASH,
FALLING_LAVA,
LANDING_LAVA,
FALLING_WATER,
DRIPPING_HONEY,
FALLING_HONEY,
LANDING_HONEY,
FALLING_NECTAR,
SOUL_FIRE_FLAME,
ASH,
CRIMSON_SPORE,
WARPED_SPORE,
SOUL,
DRIPPING_OBSIDIAN_TEAR,
FALLING_OBSIDIAN_TEAR,
LANDING_OBSIDIAN_TEAR,
REVERSE_PORTAL,
WHITE_ASH,
public static final Particle<BlockData> FALLING_DUST = getParticle("falling_dust");
public static final Particle<Void> TOTEM_OF_UNDYING = getParticle("totem_of_undying");
public static final Particle<Void> SPIT = getParticle("spit");
public static final Particle<Void> SQUID_INK = getParticle("squid_ink");
public static final Particle<Void> BUBBLE_POP = getParticle("bubble_pop");
public static final Particle<Void> CURRENT_DOWN = getParticle("current_down");
public static final Particle<Void> BUBBLE_COLUMN_UP = getParticle("bubble_column_up");
public static final Particle<Void> NAUTILUS = getParticle("nautilus");
public static final Particle<Void> DOLPHIN = getParticle("dolphin");
public static final Particle<Void> SNEEZE = getParticle("sneeze");
public static final Particle<Void> CAMPFIRE_COSY_SMOKE = getParticle("campfire_cosy_smoke");
public static final Particle<Void> CAMPFIRE_SIGNAL_SMOKE = getParticle("campfire_signal_smoke");
public static final Particle<Void> COMPOSTER = getParticle("composter");
public static final Particle<Void> FLASH = getParticle("flash");
public static final Particle<Void> FALLING_LAVA = getParticle("falling_lava");
public static final Particle<Void> LANDING_LAVA = getParticle("landing_lava");
public static final Particle<Void> FALLING_WATER = getParticle("falling_water");
public static final Particle<Void> DRIPPING_HONEY = getParticle("dripping_honey");
public static final Particle<Void> FALLING_HONEY = getParticle("falling_honey");
public static final Particle<Void> LANDING_HONEY = getParticle("landing_honey");
public static final Particle<Void> FALLING_NECTAR = getParticle("falling_nectar");
public static final Particle<Void> SOUL_FIRE_FLAME = getParticle("soul_fire_flame");
public static final Particle<Void> ASH = getParticle("ash");
public static final Particle<Void> CRIMSON_SPORE = getParticle("crimson_spore");
public static final Particle<Void> WARPED_SPORE = getParticle("warped_spore");
public static final Particle<Void> SOUL = getParticle("soul");
public static final Particle<Void> DRIPPING_OBSIDIAN_TEAR = getParticle("dripping_obsidian_tear");
public static final Particle<Void> FALLING_OBSIDIAN_TEAR = getParticle("falling_obsidian_tear");
public static final Particle<Void> LANDING_OBSIDIAN_TEAR = getParticle("landing_obsidian_tear");
public static final Particle<Void> REVERSE_PORTAL = getParticle("reverse_portal");
public static final Particle<Void> WHITE_ASH = getParticle("white_ash");
/**
* Uses {@link DustTransition} as DataType
*/
DUST_COLOR_TRANSITION(DustTransition.class),
public static final Particle<DustTransition> DUST_COLOR_TRANSITION = getParticle("dust_color_transition");
/**
* Uses {@link Vibration} as DataType
*/
VIBRATION(Vibration.class),
FALLING_SPORE_BLOSSOM,
SPORE_BLOSSOM_AIR,
SMALL_FLAME,
SNOWFLAKE,
DRIPPING_DRIPSTONE_LAVA,
FALLING_DRIPSTONE_LAVA,
DRIPPING_DRIPSTONE_WATER,
FALLING_DRIPSTONE_WATER,
GLOW_SQUID_INK,
GLOW,
WAX_ON,
WAX_OFF,
ELECTRIC_SPARK,
SCRAPE,
SONIC_BOOM,
SCULK_SOUL,
SCULK_CHARGE(Float.class),
SCULK_CHARGE_POP,
SHRIEK(Integer.class),
public static final Particle<Vibration> VIBRATION = getParticle("vibration");
public static final Particle<Void> FALLING_SPORE_BLOSSOM = getParticle("falling_spore_blossom");
public static final Particle<Void> SPORE_BLOSSOM_AIR = getParticle("spore_blossom_air");
public static final Particle<Void> SMALL_FLAME = getParticle("small_flame");
public static final Particle<Void> SNOWFLAKE = getParticle("snowflake");
public static final Particle<Void> DRIPPING_DRIPSTONE_LAVA = getParticle("dripping_dripstone_lava");
public static final Particle<Void> FALLING_DRIPSTONE_LAVA = getParticle("falling_dripstone_lava");
public static final Particle<Void> DRIPPING_DRIPSTONE_WATER = getParticle("dripping_dripstone_water");
public static final Particle<Void> FALLING_DRIPSTONE_WATER = getParticle("falling_dripstone_water");
public static final Particle<Void> GLOW_SQUID_INK = getParticle("glow_squid_ink");
public static final Particle<Void> GLOW = getParticle("glow");
public static final Particle<Void> WAX_ON = getParticle("wax_on");
public static final Particle<Void> WAX_OFF = getParticle("wax_off");
public static final Particle<Void> ELECTRIC_SPARK = getParticle("electric_spark");
public static final Particle<Void> SCRAPE = getParticle("scrape");
public static final Particle<Void> SONIC_BOOM = getParticle("sonic_boom");
public static final Particle<Void> SCULK_SOUL = getParticle("sculk_soul");
public static final Particle<Float> SCULK_CHARGE = getParticle("sculk_charge");
public static final Particle<Void> SCULK_CHARGE_POP = getParticle("sculk_charge_pop");
public static final Particle<Integer> SHRIEK = getParticle("shriek");
@MinecraftExperimental
@ApiStatus.Experimental
DRIPPING_CHERRY_LEAVES,
public static final Particle<Void> DRIPPING_CHERRY_LEAVES = getParticle("dripping_cherry_leaves");
@MinecraftExperimental
@ApiStatus.Experimental
FALLING_CHERRY_LEAVES,
public static final Particle<Void> FALLING_CHERRY_LEAVES = getParticle("falling_cherry_leaves");
@MinecraftExperimental
@ApiStatus.Experimental
LANDING_CHERRY_LEAVES,
public static final Particle<Void> LANDING_CHERRY_LEAVES = getParticle("landing_cherry_leaves");
/**
* Uses {@link BlockData} as DataType
*/
BLOCK_MARKER(BlockData.class),
// ----- Legacy Separator -----
/**
* Uses {@link MaterialData} as DataType
*/
LEGACY_BLOCK_CRACK(MaterialData.class),
/**
* Uses {@link MaterialData} as DataType
*/
LEGACY_BLOCK_DUST(MaterialData.class),
/**
* Uses {@link MaterialData} as DataType
*/
LEGACY_FALLING_DUST(MaterialData.class);
public static final Particle<BlockData> BLOCK_MARKER = getParticle("block_marker");
private final Class<?> dataType;
Particle() {
dataType = Void.class;
}
Particle(/*@NotNull*/ Class<?> data) {
dataType = data;
@NotNull
private static <D> Particle<D> getParticle(@NotNull String key) {
NamespacedKey namespacedKey = NamespacedKey.minecraft(key);
Particle<D> particle = Registry.PARTICLE_TYPE.get(namespacedKey);
Preconditions.checkNotNull(particle, "No particle found for %s. This is a bug.", namespacedKey);
return particle;
}
/**
@ -166,9 +146,7 @@ public enum Particle {
* @return the required data type
*/
@NotNull
public Class<?> getDataType() {
return dataType;
}
public abstract Class<D> getDataType();
/**
* Options which can be applied to redstone dust particles - a particle
@ -229,4 +207,105 @@ public enum Particle {
return toColor;
}
}
/**
* @param name of the particle.
* @return the particle with the given name.
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
*/
@NotNull
@Deprecated
public static Particle<?> valueOf(@NotNull String name) {
name = convertLegacy(name);
Particle<?> particle = Registry.PARTICLE_TYPE.get(NamespacedKey.fromString(name.toLowerCase()));
Preconditions.checkArgument(particle != null, "No particle found with the name %s", name);
return particle;
}
/**
* @return an array of all known particles.
* @deprecated use {@link Registry#iterator()}.
*/
@NotNull
@Deprecated
public static Particle<?>[] values() {
return Lists.newArrayList(Registry.PARTICLE_TYPE).toArray(new Particle[0]);
}
private static String convertLegacy(String from) {
if (from == null) {
return null;
}
switch (from.toLowerCase()) {
case "explosion_normal":
return "poof";
case "explosion_large":
return "explosion";
case "explosion_huge":
return "explosion_emitter";
case "fireworks_spark":
return "firework";
case "water_bubble":
return "bubble";
case "water_splash":
return "splash";
case "water_wake":
return "fishing";
case "suspended":
return "underwater";
case "suspended_depth":
return "underwater";
case "crit_magic":
return "enchanted_hit";
case "smoke_normal":
return "smoke";
case "smoke_large":
return "large_smoke";
case "spell":
return "effect";
case "spell_instant":
return "instant_effect";
case "spell_mob":
return "entity_effect";
case "spell_mob_ambient":
return "ambient_entity_effect";
case "spell_witch":
return "witch";
case "drip_water":
return "dripping_water";
case "drip_lava":
return "dripping_lava";
case "villager_angry":
return "angry_villager";
case "villager_happy":
return "happy_villager";
case "town_aura":
return "mycelium";
case "enchantment_table":
return "enchant";
case "redstone":
return "dust";
case "snowball":
return "item_snowball";
case "snow_shovel":
return "item_snowball";
case "slime":
return "item_slime";
case "item_crack":
return "item";
case "block_crack":
return "block";
case "block_dust":
return "block";
case "water_drop":
return "rain";
case "mob_appearance":
return "elder_guardian";
case "totem":
return "totem_of_undying";
}
return from;
}
}

View file

@ -146,6 +146,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*/
@Deprecated
Registry<Material> MATERIAL = new SimpleRegistry<>(Material.class, (mat) -> !mat.isLegacy());
/**
* Server particle types.
*
* @see Particle
*/
Registry<Particle> PARTICLE_TYPE = Objects.requireNonNull(Bukkit.getRegistry(Particle.class), "No registry present for Particle. This is a bug.");
/**
* Server statistics.
*

View file

@ -2278,7 +2278,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param location the location to spawn at
* @param count the number of particles
*/
public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count);
public void spawnParticle(@NotNull Particle<?> particle, @NotNull Location location, int count);
/**
* Spawns the particle (the number of times specified by count)
@ -2290,7 +2290,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param z the position on the z axis to spawn at
* @param count the number of particles
*/
public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count);
public void spawnParticle(@NotNull Particle<?> particle, double x, double y, double z, int count);
/**
* Spawns the particle (the number of times specified by count)
@ -2303,7 +2303,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, @NotNull Location location, int count, @Nullable T data);
/**
@ -2319,7 +2319,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, double x, double y, double z, int count, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -2334,7 +2334,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param offsetY the maximum random offset on the Y axis
* @param offsetZ the maximum random offset on the Z axis
*/
public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ);
public void spawnParticle(@NotNull Particle<?> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ);
/**
* Spawns the particle (the number of times specified by count)
@ -2351,7 +2351,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param offsetY the maximum random offset on the Y axis
* @param offsetZ the maximum random offset on the Z axis
*/
public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ);
public void spawnParticle(@NotNull Particle<?> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ);
/**
* Spawns the particle (the number of times specified by count)
@ -2369,7 +2369,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -2389,7 +2389,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -2406,7 +2406,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param extra the extra data for this particle, depends on the
* particle used (normally speed)
*/
public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra);
public void spawnParticle(@NotNull Particle<?> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra);
/**
* Spawns the particle (the number of times specified by count)
@ -2425,7 +2425,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param extra the extra data for this particle, depends on the
* particle used (normally speed)
*/
public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra);
public void spawnParticle(@NotNull Particle<?> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra);
/**
* Spawns the particle (the number of times specified by count)
@ -2445,7 +2445,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -2467,7 +2467,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -2490,7 +2490,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* range and encourage their client to render it regardless of
* settings
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
public <T> void spawnParticle(@NotNull Particle<T> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
/**
* Spawns the particle (the number of times specified by count)
@ -2515,7 +2515,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* range and encourage their client to render it regardless of
* settings
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
public <T> void spawnParticle(@NotNull Particle<T> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
/**
* Find the closest nearby structure of a given {@link StructureType}.

View file

@ -126,14 +126,14 @@ public interface AreaEffectCloud extends Entity {
* @return particle the set particle type
*/
@NotNull
Particle getParticle();
Particle<?> getParticle();
/**
* Sets the particle which this cloud will be composed of
*
* @param particle the new particle type
*/
void setParticle(@NotNull Particle particle);
void setParticle(@NotNull Particle<?> particle);
/**
* Sets the particle which this cloud will be composed of
@ -143,7 +143,7 @@ public interface AreaEffectCloud extends Entity {
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
<T> void setParticle(@NotNull Particle particle, @Nullable T data);
<T> void setParticle(@NotNull Particle<T> particle, @Nullable T data);
/**
* Sets the underlying potion data

View file

@ -1445,7 +1445,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param location the location to spawn at
* @param count the number of particles
*/
public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count);
public void spawnParticle(@NotNull Particle<?> particle, @NotNull Location location, int count);
/**
* Spawns the particle (the number of times specified by count)
@ -1457,7 +1457,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param z the position on the z axis to spawn at
* @param count the number of particles
*/
public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count);
public void spawnParticle(@NotNull Particle<?> particle, double x, double y, double z, int count);
/**
* Spawns the particle (the number of times specified by count)
@ -1470,7 +1470,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, @NotNull Location location, int count, @Nullable T data);
/**
@ -1486,7 +1486,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, double x, double y, double z, int count, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -1501,7 +1501,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetY the maximum random offset on the Y axis
* @param offsetZ the maximum random offset on the Z axis
*/
public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ);
public void spawnParticle(@NotNull Particle<?> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ);
/**
* Spawns the particle (the number of times specified by count)
@ -1518,7 +1518,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetY the maximum random offset on the Y axis
* @param offsetZ the maximum random offset on the Z axis
*/
public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ);
public void spawnParticle(@NotNull Particle<?> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ);
/**
* Spawns the particle (the number of times specified by count)
@ -1536,7 +1536,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -1556,7 +1556,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -1573,7 +1573,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param extra the extra data for this particle, depends on the
* particle used (normally speed)
*/
public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra);
public void spawnParticle(@NotNull Particle<?> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra);
/**
* Spawns the particle (the number of times specified by count)
@ -1592,7 +1592,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param extra the extra data for this particle, depends on the
* particle used (normally speed)
*/
public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra);
public void spawnParticle(@NotNull Particle<?> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra);
/**
* Spawns the particle (the number of times specified by count)
@ -1612,7 +1612,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
/**
* Spawns the particle (the number of times specified by count)
@ -1634,7 +1634,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
public <T> void spawnParticle(@NotNull Particle<T> particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
/**
* Return the player's progression on the specified advancement.