Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 68de2de253
commit cd27f1b0c7
62 changed files with 1914 additions and 156 deletions

View File

@ -3,6 +3,7 @@ package org.bukkit;
import com.google.common.base.Preconditions;
import org.bukkit.block.data.BlockData;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
public enum Particle implements Keyed {
@ -141,6 +142,16 @@ public enum Particle implements Keyed {
* Uses {@link BlockData} as DataType
*/
DUST_PILLAR("dust_pillar", BlockData.class),
/**
* Uses {@link BlockData} as DataType
*/
@ApiStatus.Experimental
BLOCK_CRUMBLE("block_crumble", BlockData.class),
/**
* Uses {@link TargetColor} as DataType
*/
@ApiStatus.Experimental
TRAIL("trail", TargetColor.class),
OMINOUS_SPAWNING("ominous_spawning"),
RAID_OMEN("raid_omen"),
TRIAL_OMEN("trial_omen"),
@ -253,4 +264,39 @@ public enum Particle implements Keyed {
return toColor;
}
}
/**
* Options which can be applied to trail particles - a location and color.
*/
@ApiStatus.Experimental
public static class TargetColor {
private final Location target;
private final Color color;
public TargetColor(@NotNull Location target, @NotNull Color color) {
this.target = target;
this.color = color;
}
/**
* The target of the particles to be displayed.
*
* @return particle target
*/
@NotNull
public Location getTarget() {
return target;
}
/**
* The color of the particles to be displayed.
*
* @return particle color
*/
@NotNull
public Color getColor() {
return color;
}
}
}