mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Update to Minecraft 1.21.6
This commit is contained in:
parent
c80061286e
commit
c268b229e9
19 changed files with 332 additions and 11 deletions
2
pom.xml
2
pom.xml
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.21.5-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.6-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Bukkit</name>
|
||||
|
|
|
@ -229,6 +229,10 @@ public final class GameRule<T> {
|
|||
* Whether TNT explodes.
|
||||
*/
|
||||
public static final GameRule<Boolean> TNT_EXPLODES = new GameRule<>("tntExplodes", Boolean.class);
|
||||
/**
|
||||
* Whether the locator bar is enabled.
|
||||
*/
|
||||
public static final GameRule<Boolean> LOCATOR_BAR = new GameRule<>("locatorBar", Boolean.class);
|
||||
|
||||
// Numerical rules
|
||||
/**
|
||||
|
|
|
@ -29,6 +29,7 @@ public interface JukeboxSong extends Keyed, Translatable, RegistryAware {
|
|||
public static final JukeboxSong PRECIPICE = get("precipice");
|
||||
public static final JukeboxSong CREATOR = get("creator");
|
||||
public static final JukeboxSong CREATOR_MUSIC_BOX = get("creator_music_box");
|
||||
public static final JukeboxSong TEARS = get("tears");
|
||||
|
||||
@NotNull
|
||||
private static JukeboxSong get(@NotNull String key) {
|
||||
|
|
|
@ -58,6 +58,7 @@ import org.bukkit.block.data.type.DaylightDetector;
|
|||
import org.bukkit.block.data.type.DecoratedPot;
|
||||
import org.bukkit.block.data.type.Dispenser;
|
||||
import org.bukkit.block.data.type.Door;
|
||||
import org.bukkit.block.data.type.DriedGhast;
|
||||
import org.bukkit.block.data.type.Dripleaf;
|
||||
import org.bukkit.block.data.type.EndPortalFrame;
|
||||
import org.bukkit.block.data.type.EnderChest;
|
||||
|
@ -1692,6 +1693,10 @@ public enum Material implements Keyed, Translatable, RegistryAware {
|
|||
* BlockData: {@link Hatchable}
|
||||
*/
|
||||
SNIFFER_EGG(12980, Hatchable.class),
|
||||
/**
|
||||
* BlockData: {@link DriedGhast}
|
||||
*/
|
||||
DRIED_GHAST(6424, DriedGhast.class),
|
||||
DEAD_TUBE_CORAL_BLOCK(28350),
|
||||
DEAD_BRAIN_CORAL_BLOCK(12979),
|
||||
DEAD_BUBBLE_CORAL_BLOCK(28220),
|
||||
|
@ -2372,6 +2377,22 @@ public enum Material implements Keyed, Translatable, RegistryAware {
|
|||
*/
|
||||
ACTIVATOR_RAIL(5834, RedstoneRail.class),
|
||||
SADDLE(30206, 1),
|
||||
WHITE_HARNESS(16194, 1),
|
||||
ORANGE_HARNESS(29145, 1),
|
||||
MAGENTA_HARNESS(28316, 1),
|
||||
LIGHT_BLUE_HARNESS(10514, 1),
|
||||
YELLOW_HARNESS(21404, 1),
|
||||
LIME_HARNESS(16572, 1),
|
||||
PINK_HARNESS(19439, 1),
|
||||
GRAY_HARNESS(18078, 1),
|
||||
LIGHT_GRAY_HARNESS(6733, 1),
|
||||
CYAN_HARNESS(4109, 1),
|
||||
PURPLE_HARNESS(14314, 1),
|
||||
BLUE_HARNESS(15650, 1),
|
||||
BROWN_HARNESS(8213, 1),
|
||||
GREEN_HARNESS(18400, 1),
|
||||
RED_HARNESS(30368, 1),
|
||||
BLACK_HARNESS(18915, 1),
|
||||
MINECART(14352, 1),
|
||||
CHEST_MINECART(4497, 1),
|
||||
FURNACE_MINECART(14196, 1),
|
||||
|
@ -2809,6 +2830,7 @@ public enum Material implements Keyed, Translatable, RegistryAware {
|
|||
FOX_SPAWN_EGG(22376),
|
||||
FROG_SPAWN_EGG(26682),
|
||||
GHAST_SPAWN_EGG(9970),
|
||||
HAPPY_GHAST_SPAWN_EGG(6330),
|
||||
GLOW_SQUID_SPAWN_EGG(31578),
|
||||
GOAT_SPAWN_EGG(30639),
|
||||
GUARDIAN_SPAWN_EGG(20113),
|
||||
|
@ -2959,7 +2981,7 @@ public enum Material implements Keyed, Translatable, RegistryAware {
|
|||
/**
|
||||
* BlockData: {@link Rotatable}
|
||||
*/
|
||||
PINK_BANNER(19439, 16, Rotatable.class),
|
||||
PINK_BANNER(14302, 16, Rotatable.class),
|
||||
/**
|
||||
* BlockData: {@link Rotatable}
|
||||
*/
|
||||
|
@ -3034,6 +3056,7 @@ public enum Material implements Keyed, Translatable, RegistryAware {
|
|||
MUSIC_DISC_5(9212, 1),
|
||||
MUSIC_DISC_PIGSTEP(21323, 1),
|
||||
MUSIC_DISC_PRECIPICE(28677, 1),
|
||||
MUSIC_DISC_TEARS(27850, 1),
|
||||
DISC_FRAGMENT_5(29729),
|
||||
TRIDENT(7534, 1, 250),
|
||||
NAUTILUS_SHELL(19989),
|
||||
|
@ -5539,26 +5562,42 @@ public enum Material implements Keyed, Translatable, RegistryAware {
|
|||
case SHIELD:
|
||||
return EquipmentSlot.OFF_HAND;
|
||||
case BLACK_CARPET:
|
||||
case BLACK_HARNESS:
|
||||
case BLUE_CARPET:
|
||||
case BLUE_HARNESS:
|
||||
case BROWN_CARPET:
|
||||
case BROWN_HARNESS:
|
||||
case CYAN_CARPET:
|
||||
case CYAN_HARNESS:
|
||||
case DIAMOND_HORSE_ARMOR:
|
||||
case GOLDEN_HORSE_ARMOR:
|
||||
case GRAY_CARPET:
|
||||
case GRAY_HARNESS:
|
||||
case GREEN_CARPET:
|
||||
case GREEN_HARNESS:
|
||||
case IRON_HORSE_ARMOR:
|
||||
case LEATHER_HORSE_ARMOR:
|
||||
case LIGHT_BLUE_CARPET:
|
||||
case LIGHT_BLUE_HARNESS:
|
||||
case LIGHT_GRAY_CARPET:
|
||||
case LIGHT_GRAY_HARNESS:
|
||||
case LIME_CARPET:
|
||||
case LIME_HARNESS:
|
||||
case MAGENTA_CARPET:
|
||||
case MAGENTA_HARNESS:
|
||||
case ORANGE_CARPET:
|
||||
case ORANGE_HARNESS:
|
||||
case PINK_CARPET:
|
||||
case PINK_HARNESS:
|
||||
case PURPLE_CARPET:
|
||||
case PURPLE_HARNESS:
|
||||
case RED_CARPET:
|
||||
case RED_HARNESS:
|
||||
case WHITE_CARPET:
|
||||
case WHITE_HARNESS:
|
||||
case WOLF_ARMOR:
|
||||
case YELLOW_CARPET:
|
||||
case YELLOW_HARNESS:
|
||||
return EquipmentSlot.BODY;
|
||||
case SADDLE:
|
||||
return EquipmentSlot.SADDLE;
|
||||
|
|
|
@ -295,11 +295,20 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound BLOCK_DISPENSER_DISPENSE = getSound("block.dispenser.dispense");
|
||||
Sound BLOCK_DISPENSER_FAIL = getSound("block.dispenser.fail");
|
||||
Sound BLOCK_DISPENSER_LAUNCH = getSound("block.dispenser.launch");
|
||||
Sound BLOCK_DRIED_GHAST_AMBIENT = getSound("block.dried_ghast.ambient");
|
||||
Sound BLOCK_DRIED_GHAST_AMBIENT_WATER = getSound("block.dried_ghast.ambient_water");
|
||||
Sound BLOCK_DRIED_GHAST_BREAK = getSound("block.dried_ghast.break");
|
||||
Sound BLOCK_DRIED_GHAST_FALL = getSound("block.dried_ghast.fall");
|
||||
Sound BLOCK_DRIED_GHAST_PLACE = getSound("block.dried_ghast.place");
|
||||
Sound BLOCK_DRIED_GHAST_PLACE_IN_WATER = getSound("block.dried_ghast.place_in_water");
|
||||
Sound BLOCK_DRIED_GHAST_STEP = getSound("block.dried_ghast.step");
|
||||
Sound BLOCK_DRIED_GHAST_TRANSITION = getSound("block.dried_ghast.transition");
|
||||
Sound BLOCK_DRIPSTONE_BLOCK_BREAK = getSound("block.dripstone_block.break");
|
||||
Sound BLOCK_DRIPSTONE_BLOCK_FALL = getSound("block.dripstone_block.fall");
|
||||
Sound BLOCK_DRIPSTONE_BLOCK_HIT = getSound("block.dripstone_block.hit");
|
||||
Sound BLOCK_DRIPSTONE_BLOCK_PLACE = getSound("block.dripstone_block.place");
|
||||
Sound BLOCK_DRIPSTONE_BLOCK_STEP = getSound("block.dripstone_block.step");
|
||||
Sound BLOCK_DRY_GRASS_AMBIENT = getSound("block.dry_grass.ambient");
|
||||
Sound BLOCK_ENCHANTMENT_TABLE_USE = getSound("block.enchantment_table.use");
|
||||
Sound BLOCK_ENDER_CHEST_CLOSE = getSound("block.ender_chest.close");
|
||||
Sound BLOCK_ENDER_CHEST_OPEN = getSound("block.ender_chest.open");
|
||||
|
@ -407,10 +416,10 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound BLOCK_LAVA_EXTINGUISH = getSound("block.lava.extinguish");
|
||||
Sound BLOCK_LAVA_POP = getSound("block.lava.pop");
|
||||
Sound BLOCK_LEAF_LITTER_BREAK = getSound("block.leaf_litter.break");
|
||||
Sound BLOCK_LEAF_LITTER_STEP = getSound("block.leaf_litter.step");
|
||||
Sound BLOCK_LEAF_LITTER_PLACE = getSound("block.leaf_litter.place");
|
||||
Sound BLOCK_LEAF_LITTER_HIT = getSound("block.leaf_litter.hit");
|
||||
Sound BLOCK_LEAF_LITTER_FALL = getSound("block.leaf_litter.fall");
|
||||
Sound BLOCK_LEAF_LITTER_HIT = getSound("block.leaf_litter.hit");
|
||||
Sound BLOCK_LEAF_LITTER_PLACE = getSound("block.leaf_litter.place");
|
||||
Sound BLOCK_LEAF_LITTER_STEP = getSound("block.leaf_litter.step");
|
||||
Sound BLOCK_LEVER_CLICK = getSound("block.lever.click");
|
||||
Sound BLOCK_LILY_PAD_PLACE = getSound("block.lily_pad.place");
|
||||
Sound BLOCK_LODESTONE_BREAK = getSound("block.lodestone.break");
|
||||
|
@ -607,7 +616,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound BLOCK_SAND_IDLE = getSound("block.sand.idle");
|
||||
Sound BLOCK_SAND_PLACE = getSound("block.sand.place");
|
||||
Sound BLOCK_SAND_STEP = getSound("block.sand.step");
|
||||
Sound BLOCK_SAND_WIND = getSound("block.sand.wind");
|
||||
Sound BLOCK_SCAFFOLDING_BREAK = getSound("block.scaffolding.break");
|
||||
Sound BLOCK_SCAFFOLDING_FALL = getSound("block.scaffolding.fall");
|
||||
Sound BLOCK_SCAFFOLDING_HIT = getSound("block.scaffolding.hit");
|
||||
|
@ -1043,6 +1051,10 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound ENTITY_GENERIC_SMALL_FALL = getSound("entity.generic.small_fall");
|
||||
Sound ENTITY_GENERIC_SPLASH = getSound("entity.generic.splash");
|
||||
Sound ENTITY_GENERIC_SWIM = getSound("entity.generic.swim");
|
||||
Sound ENTITY_GHASTLING_AMBIENT = getSound("entity.ghastling.ambient");
|
||||
Sound ENTITY_GHASTLING_DEATH = getSound("entity.ghastling.death");
|
||||
Sound ENTITY_GHASTLING_HURT = getSound("entity.ghastling.hurt");
|
||||
Sound ENTITY_GHASTLING_SPAWN = getSound("entity.ghastling.spawn");
|
||||
Sound ENTITY_GHAST_AMBIENT = getSound("entity.ghast.ambient");
|
||||
Sound ENTITY_GHAST_DEATH = getSound("entity.ghast.death");
|
||||
Sound ENTITY_GHAST_HURT = getSound("entity.ghast.hurt");
|
||||
|
@ -1084,6 +1096,14 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound ENTITY_GUARDIAN_FLOP = getSound("entity.guardian.flop");
|
||||
Sound ENTITY_GUARDIAN_HURT = getSound("entity.guardian.hurt");
|
||||
Sound ENTITY_GUARDIAN_HURT_LAND = getSound("entity.guardian.hurt_land");
|
||||
Sound ENTITY_HAPPY_GHAST_AMBIENT = getSound("entity.happy_ghast.ambient");
|
||||
Sound ENTITY_HAPPY_GHAST_DEATH = getSound("entity.happy_ghast.death");
|
||||
Sound ENTITY_HAPPY_GHAST_EQUIP = getSound("entity.happy_ghast.equip");
|
||||
Sound ENTITY_HAPPY_GHAST_HARNESS_GOGGLES_DOWN = getSound("entity.happy_ghast.harness_goggles_down");
|
||||
Sound ENTITY_HAPPY_GHAST_HARNESS_GOGGLES_UP = getSound("entity.happy_ghast.harness_goggles_up");
|
||||
Sound ENTITY_HAPPY_GHAST_HURT = getSound("entity.happy_ghast.hurt");
|
||||
Sound ENTITY_HAPPY_GHAST_RIDING = getSound("entity.happy_ghast.riding");
|
||||
Sound ENTITY_HAPPY_GHAST_UNEQUIP = getSound("entity.happy_ghast.unequip");
|
||||
Sound ENTITY_HOGLIN_AMBIENT = getSound("entity.hoglin.ambient");
|
||||
Sound ENTITY_HOGLIN_ANGRY = getSound("entity.hoglin.angry");
|
||||
Sound ENTITY_HOGLIN_ATTACK = getSound("entity.hoglin.attack");
|
||||
|
@ -1136,8 +1156,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound ENTITY_ITEM_FRAME_REMOVE_ITEM = getSound("entity.item_frame.remove_item");
|
||||
Sound ENTITY_ITEM_FRAME_ROTATE_ITEM = getSound("entity.item_frame.rotate_item");
|
||||
Sound ENTITY_ITEM_PICKUP = getSound("entity.item.pickup");
|
||||
Sound ENTITY_LEASH_KNOT_BREAK = getSound("entity.leash_knot.break");
|
||||
Sound ENTITY_LEASH_KNOT_PLACE = getSound("entity.leash_knot.place");
|
||||
Sound ENTITY_LIGHTNING_BOLT_IMPACT = getSound("entity.lightning_bolt.impact");
|
||||
Sound ENTITY_LIGHTNING_BOLT_THUNDER = getSound("entity.lightning_bolt.thunder");
|
||||
Sound ENTITY_LINGERING_POTION_THROW = getSound("entity.lingering_potion.throw");
|
||||
|
@ -1288,7 +1306,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound ENTITY_POLAR_BEAR_HURT = getSound("entity.polar_bear.hurt");
|
||||
Sound ENTITY_POLAR_BEAR_STEP = getSound("entity.polar_bear.step");
|
||||
Sound ENTITY_POLAR_BEAR_WARNING = getSound("entity.polar_bear.warning");
|
||||
Sound ENTITY_PUFFER_FISH_AMBIENT = getSound("entity.puffer_fish.ambient");
|
||||
Sound ENTITY_PUFFER_FISH_BLOW_OUT = getSound("entity.puffer_fish.blow_out");
|
||||
Sound ENTITY_PUFFER_FISH_BLOW_UP = getSound("entity.puffer_fish.blow_up");
|
||||
Sound ENTITY_PUFFER_FISH_DEATH = getSound("entity.puffer_fish.death");
|
||||
|
@ -1637,13 +1654,20 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound ITEM_HOE_TILL = getSound("item.hoe.till");
|
||||
Sound ITEM_HONEYCOMB_WAX_ON = getSound("item.honeycomb.wax_on");
|
||||
Sound ITEM_HONEY_BOTTLE_DRINK = getSound("item.honey_bottle.drink");
|
||||
Sound ITEM_HORSE_ARMOR_UNEQUIP = getSound("item.horse_armor.unequip");
|
||||
Sound ITEM_INK_SAC_USE = getSound("item.ink_sac.use");
|
||||
Sound ITEM_LEAD_BREAK = getSound("item.lead.break");
|
||||
Sound ITEM_LEAD_TIED = getSound("item.lead.tied");
|
||||
Sound ITEM_LEAD_UNTIED = getSound("item.lead.untied");
|
||||
Sound ITEM_LLAMA_CARPET_UNEQUIP = getSound("item.llama_carpet.unequip");
|
||||
Sound ITEM_LODESTONE_COMPASS_LOCK = getSound("item.lodestone_compass.lock");
|
||||
Sound ITEM_MACE_SMASH_AIR = getSound("item.mace.smash_air");
|
||||
Sound ITEM_MACE_SMASH_GROUND = getSound("item.mace.smash_ground");
|
||||
Sound ITEM_MACE_SMASH_GROUND_HEAVY = getSound("item.mace.smash_ground_heavy");
|
||||
Sound ITEM_NETHER_WART_PLANT = getSound("item.nether_wart.plant");
|
||||
Sound ITEM_OMINOUS_BOTTLE_DISPOSE = getSound("item.ominous_bottle.dispose");
|
||||
Sound ITEM_SADDLE_UNEQUIP = getSound("item.saddle.unequip");
|
||||
Sound ITEM_SHEARS_SNIP = getSound("item.shears.snip");
|
||||
Sound ITEM_SHIELD_BLOCK = getSound("item.shield.block");
|
||||
Sound ITEM_SHIELD_BREAK = getSound("item.shield.break");
|
||||
Sound ITEM_SHOVEL_FLATTEN = getSound("item.shovel.flatten");
|
||||
|
@ -1681,6 +1705,7 @@ public interface Sound extends OldEnum<Sound>, Keyed, RegistryAware {
|
|||
Sound MUSIC_DISC_RELIC = getSound("music_disc.relic");
|
||||
Sound MUSIC_DISC_STAL = getSound("music_disc.stal");
|
||||
Sound MUSIC_DISC_STRAD = getSound("music_disc.strad");
|
||||
Sound MUSIC_DISC_TEARS = getSound("music_disc.tears");
|
||||
Sound MUSIC_DISC_WAIT = getSound("music_disc.wait");
|
||||
Sound MUSIC_DISC_WARD = getSound("music_disc.ward");
|
||||
Sound MUSIC_DRAGON = getSound("music.dragon");
|
||||
|
|
|
@ -14,5 +14,6 @@ public enum SoundCategory {
|
|||
NEUTRAL,
|
||||
PLAYERS,
|
||||
AMBIENT,
|
||||
VOICE;
|
||||
VOICE,
|
||||
UI;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public enum Statistic implements Keyed {
|
|||
MINECART_ONE_CM,
|
||||
BOAT_ONE_CM,
|
||||
PIG_ONE_CM,
|
||||
HAPPY_GHAST_ONE_CM,
|
||||
HORSE_ONE_CM,
|
||||
SPRINT_ONE_CM,
|
||||
CROUCH_ONE_CM,
|
||||
|
|
|
@ -525,6 +525,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla block tag representing all blocks that play step sounds with camels on sand.
|
||||
*/
|
||||
Tag<Material> CAMEL_SAND_STEP_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("camel_sand_step_sound_blocks"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all blocks that happy ghasts avoid.
|
||||
*/
|
||||
Tag<Material> HAPPY_GHAST_AVOIDS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("happy_ghast_avoids"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all blocks that block vibration signals.
|
||||
*/
|
||||
|
@ -812,7 +816,20 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
/**
|
||||
* Vanilla block tag representing all blocks that will play ambient desert block sounds.
|
||||
*/
|
||||
Tag<Material> PLAYS_AMBIENT_DESERT_BLOCK_SOUNDS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("plays_ambient_desert_block_sounds"), Material.class);
|
||||
Tag<Material> TRIGGERS_AMBIENT_DESERT_SAND_BLOCK_SOUNDS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("triggers_ambient_desert_sand_block_sounds"), Material.class);
|
||||
/**
|
||||
* @deprecated see {@link #TRIGGERS_AMBIENT_DESERT_SAND_BLOCK_SOUNDS}
|
||||
*/
|
||||
@Deprecated(since = "1.21.6")
|
||||
Tag<Material> PLAYS_AMBIENT_DESERT_BLOCK_SOUNDS = TRIGGERS_AMBIENT_DESERT_SAND_BLOCK_SOUNDS;
|
||||
/**
|
||||
* Vanilla block tag representing all blocks that will play ambient desert dry vegetation sounds.
|
||||
*/
|
||||
Tag<Material> TRIGGERS_AMBIENT_DESERT_DRY_VEGETATION_BLOCK_SOUNDS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("triggers_ambient_desert_dry_vegetation_block_sounds"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all blocks that trigger ambient Dried Ghast sounds to play when a Dried Ghast block is placed on them.
|
||||
*/
|
||||
Tag<Material> RIGGERS_AMBIENT_DRIED_GHAST_BLOCK_SOUNDS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("triggers_ambient_dried_ghast_block_sounds"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all blocks that resemble air.
|
||||
*/
|
||||
|
@ -903,6 +920,18 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla item tag representing all horse tempt items.
|
||||
*/
|
||||
Tag<Material> ITEMS_HORSE_TEMPT_ITEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("horse_tempt_items"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all harnesses.
|
||||
*/
|
||||
Tag<Material> ITEMS_HARNESSES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("harnesses"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all happy ghast food items.
|
||||
*/
|
||||
Tag<Material> ITEMS_HAPPY_GHAST_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("happy_ghast_food"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all happy ghast tempt items.
|
||||
*/
|
||||
Tag<Material> ITEMS_HAPPY_GHAST_TEMPT_ITEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("happy_ghast_tempt_items"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all camel food.
|
||||
*/
|
||||
|
@ -1464,6 +1493,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla tag representing all projectiles which can be punched back.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_CAN_EQUIP_SADDLE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_equip_saddle"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing all entities which can be harnessed.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_CAN_EQUIP_HARNESS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_equip_harnessed"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing all projectiles which can be punched back.
|
||||
*/
|
||||
|
|
|
@ -93,6 +93,10 @@ public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, Regi
|
|||
* How long an entity remains burning after ignition.
|
||||
*/
|
||||
Attribute BURNING_TIME = getAttribute("burning_time");
|
||||
/**
|
||||
* The distance at which the camera is placed away.
|
||||
*/
|
||||
Attribute CAMERA_DISTANCE = getAttribute("camera_distance");
|
||||
/**
|
||||
* Resistance to knockback from explosions.
|
||||
*/
|
||||
|
@ -145,6 +149,14 @@ public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, Regi
|
|||
* Chance of a zombie to spawn reinforcements.
|
||||
*/
|
||||
Attribute SPAWN_REINFORCEMENTS = getAttribute("spawn_reinforcements");
|
||||
/**
|
||||
* Waypoint transmission range.
|
||||
*/
|
||||
Attribute WAYPOINT_TRANSMIT_RANGE = getAttribute("waypoint_transmit_range");
|
||||
/**
|
||||
* Waypoing receive range.
|
||||
*/
|
||||
Attribute WAYPOINT_RECEIVE_RANGE = getAttribute("waypoint_receive_range");
|
||||
|
||||
@NotNull
|
||||
private static Attribute getAttribute(@NotNull String key) {
|
||||
|
|
|
@ -52,6 +52,7 @@ import org.bukkit.block.data.type.DaylightDetector;
|
|||
import org.bukkit.block.data.type.DecoratedPot;
|
||||
import org.bukkit.block.data.type.Dispenser;
|
||||
import org.bukkit.block.data.type.Door;
|
||||
import org.bukkit.block.data.type.DriedGhast;
|
||||
import org.bukkit.block.data.type.Dripleaf;
|
||||
import org.bukkit.block.data.type.EndPortalFrame;
|
||||
import org.bukkit.block.data.type.EnderChest;
|
||||
|
@ -2233,6 +2234,10 @@ public interface BlockType extends Keyed, Translatable, RegistryAware {
|
|||
* BlockData: {@link Hatchable}
|
||||
*/
|
||||
BlockType.Typed<Hatchable> SNIFFER_EGG = getBlockType("sniffer_egg");
|
||||
/**
|
||||
* BlockData: {@link DriedGhast}
|
||||
*/
|
||||
BlockType.Typed<DriedGhast> DRIED_GHAST = getBlockType("dried_ghast");
|
||||
BlockType.Typed<BlockData> DEAD_TUBE_CORAL_BLOCK = getBlockType("dead_tube_coral_block");
|
||||
BlockType.Typed<BlockData> DEAD_BRAIN_CORAL_BLOCK = getBlockType("dead_brain_coral_block");
|
||||
BlockType.Typed<BlockData> DEAD_BUBBLE_CORAL_BLOCK = getBlockType("dead_bubble_coral_block");
|
||||
|
|
31
src/main/java/org/bukkit/block/data/type/DriedGhast.java
Normal file
31
src/main/java/org/bukkit/block/data/type/DriedGhast.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'hydration' represents the hydration level of the block.
|
||||
*/
|
||||
public interface DriedGhast extends Directional, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'hydration' property.
|
||||
*
|
||||
* @return the 'hydration' value
|
||||
*/
|
||||
int getHydration();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'hydration' property.
|
||||
*
|
||||
* @param hydration the new 'hydration' value
|
||||
*/
|
||||
void setHydration(int hydration);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'hydration' property.
|
||||
*
|
||||
* @return the maximum 'hydration' value
|
||||
*/
|
||||
int getMaximumHydration();
|
||||
}
|
|
@ -332,6 +332,7 @@ public enum EntityType implements Keyed, Translatable, RegistryAware {
|
|||
SPRUCE_BOAT("spruce_boat", SpruceBoat.class, -1),
|
||||
SPRUCE_CHEST_BOAT("spruce_chest_boat", SpruceChestBoat.class, -1),
|
||||
CREAKING("creaking", Creaking.class, -1),
|
||||
HAPPY_GHAST("happy_ghast", HappyGhast.class, -1),
|
||||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
|
|
8
src/main/java/org/bukkit/entity/HappyGhast.java
Normal file
8
src/main/java/org/bukkit/entity/HappyGhast.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Happy Ghast.
|
||||
*/
|
||||
public interface HappyGhast extends Animals, Vehicle {
|
||||
|
||||
}
|
|
@ -4,9 +4,11 @@ import java.util.Collection;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FluidCollisionMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.attribute.Attributable;
|
||||
|
@ -787,4 +789,34 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
|||
* @return Whether the entity is invisible
|
||||
*/
|
||||
public boolean isInvisible();
|
||||
|
||||
/**
|
||||
* Gets the waypoint color of this entity or null if default/not set.
|
||||
*
|
||||
* @return waypoint color
|
||||
*/
|
||||
@Nullable
|
||||
public Color getWaypointColor();
|
||||
|
||||
/**
|
||||
* Sets the waypoint color of this entity, null to reset to default.
|
||||
*
|
||||
* @param color new color
|
||||
*/
|
||||
public void setWaypointColor(@Nullable Color color);
|
||||
|
||||
/**
|
||||
* Gets the waypoint style of this entity.
|
||||
*
|
||||
* @return waypoint style
|
||||
*/
|
||||
@NotNull
|
||||
public NamespacedKey getWaypointStyle();
|
||||
|
||||
/**
|
||||
* Sets the waypoint style of this entity.
|
||||
*
|
||||
* @param key new style key or null for default
|
||||
*/
|
||||
public void setWaypointStyle(@Nullable NamespacedKey key);
|
||||
}
|
||||
|
|
|
@ -2287,4 +2287,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|||
* @return whether the player allows server listings
|
||||
*/
|
||||
public boolean isAllowingServerListings();
|
||||
|
||||
/**
|
||||
* Clear the player's open dialog.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public void clearDialog();
|
||||
}
|
||||
|
|
|
@ -51,6 +51,14 @@ public class EntityUnleashEvent extends EntityEvent {
|
|||
* When the entity's leashholder is more than 10 blocks away
|
||||
*/
|
||||
DISTANCE,
|
||||
/**
|
||||
* The leash has been sheared
|
||||
*/
|
||||
SHEAR,
|
||||
/**
|
||||
* A firework has been used
|
||||
*/
|
||||
FIREWORK,
|
||||
UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package org.bukkit.event.player;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Called after a player runs a custom action from a chat event or form
|
||||
* submission.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public class PlayerCustomClickEvent extends PlayerEvent {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@NotNull
|
||||
private final NamespacedKey id;
|
||||
@Nullable
|
||||
private final JsonElement data;
|
||||
|
||||
public PlayerCustomClickEvent(@NotNull Player player, @NotNull NamespacedKey id, @Nullable JsonElement data) {
|
||||
super(player);
|
||||
this.id = id;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of the custom action.
|
||||
*
|
||||
* @return custom action ID
|
||||
*/
|
||||
@NotNull
|
||||
public NamespacedKey getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the data of the custom action as a {@link JsonElement}, or null if
|
||||
* not available.
|
||||
* <br>
|
||||
* If not a form submission, then may be null.
|
||||
*
|
||||
* @return data as JSON or null
|
||||
*/
|
||||
@Nullable
|
||||
public JsonElement getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
|
@ -814,6 +814,7 @@ public interface ItemType extends Keyed, Translatable, RegistryAware {
|
|||
ItemType.Typed<ItemMeta> BLACK_CONCRETE_POWDER = getItemType("black_concrete_powder");
|
||||
ItemType.Typed<ItemMeta> TURTLE_EGG = getItemType("turtle_egg");
|
||||
ItemType.Typed<ItemMeta> SNIFFER_EGG = getItemType("sniffer_egg");
|
||||
ItemType.Typed<ItemMeta> DRIED_GHAST = getItemType("dried_ghast");
|
||||
ItemType.Typed<ItemMeta> DEAD_TUBE_CORAL_BLOCK = getItemType("dead_tube_coral_block");
|
||||
ItemType.Typed<ItemMeta> DEAD_BRAIN_CORAL_BLOCK = getItemType("dead_brain_coral_block");
|
||||
ItemType.Typed<ItemMeta> DEAD_BUBBLE_CORAL_BLOCK = getItemType("dead_bubble_coral_block");
|
||||
|
@ -1023,6 +1024,22 @@ public interface ItemType extends Keyed, Translatable, RegistryAware {
|
|||
ItemType.Typed<ItemMeta> RAIL = getItemType("rail");
|
||||
ItemType.Typed<ItemMeta> ACTIVATOR_RAIL = getItemType("activator_rail");
|
||||
ItemType.Typed<ItemMeta> SADDLE = getItemType("saddle");
|
||||
ItemType.Typed<ItemMeta> WHITE_HARNESS = getItemType("white_harness");
|
||||
ItemType.Typed<ItemMeta> ORANGE_HARNESS = getItemType("orange_harness");
|
||||
ItemType.Typed<ItemMeta> MAGENTA_HARNESS = getItemType("magenta_harness");
|
||||
ItemType.Typed<ItemMeta> LIGHT_BLUE_HARNESS = getItemType("light_blue_harness");
|
||||
ItemType.Typed<ItemMeta> YELLOW_HARNESS = getItemType("yellow_harness");
|
||||
ItemType.Typed<ItemMeta> LIME_HARNESS = getItemType("lime_harness");
|
||||
ItemType.Typed<ItemMeta> PINK_HARNESS = getItemType("pink_harness");
|
||||
ItemType.Typed<ItemMeta> GRAY_HARNESS = getItemType("gray_harness");
|
||||
ItemType.Typed<ItemMeta> LIGHT_GRAY_HARNESS = getItemType("light_gray_harness");
|
||||
ItemType.Typed<ItemMeta> CYAN_HARNESS = getItemType("cyan_harness");
|
||||
ItemType.Typed<ItemMeta> PURPLE_HARNESS = getItemType("purple_harness");
|
||||
ItemType.Typed<ItemMeta> BLUE_HARNESS = getItemType("blue_harness");
|
||||
ItemType.Typed<ItemMeta> BROWN_HARNESS = getItemType("brown_harness");
|
||||
ItemType.Typed<ItemMeta> GREEN_HARNESS = getItemType("green_harness");
|
||||
ItemType.Typed<ItemMeta> RED_HARNESS = getItemType("red_harness");
|
||||
ItemType.Typed<ItemMeta> BLACK_HARNESS = getItemType("black_harness");
|
||||
ItemType.Typed<ItemMeta> MINECART = getItemType("minecart");
|
||||
ItemType.Typed<ItemMeta> CHEST_MINECART = getItemType("chest_minecart");
|
||||
ItemType.Typed<ItemMeta> FURNACE_MINECART = getItemType("furnace_minecart");
|
||||
|
@ -1632,6 +1649,10 @@ public interface ItemType extends Keyed, Translatable, RegistryAware {
|
|||
* ItemMeta: {@link SpawnEggMeta}
|
||||
*/
|
||||
ItemType.Typed<SpawnEggMeta> GHAST_SPAWN_EGG = getItemType("ghast_spawn_egg");
|
||||
/**
|
||||
* ItemMeta: {@link SpawnEggMeta}
|
||||
*/
|
||||
ItemType.Typed<SpawnEggMeta> HAPPY_GHAST_SPAWN_EGG = getItemType("happy_ghast_spawn_egg");
|
||||
/**
|
||||
* ItemMeta: {@link SpawnEggMeta}
|
||||
*/
|
||||
|
@ -2051,6 +2072,7 @@ public interface ItemType extends Keyed, Translatable, RegistryAware {
|
|||
ItemType.Typed<ItemMeta> MUSIC_DISC_5 = getItemType("music_disc_5");
|
||||
ItemType.Typed<ItemMeta> MUSIC_DISC_PIGSTEP = getItemType("music_disc_pigstep");
|
||||
ItemType.Typed<ItemMeta> MUSIC_DISC_PRECIPICE = getItemType("music_disc_precipice");
|
||||
ItemType.Typed<ItemMeta> MUSIC_DISC_TEARS = getItemType("music_disc_tears");
|
||||
ItemType.Typed<ItemMeta> DISC_FRAGMENT_5 = getItemType("disc_fragment_5");
|
||||
ItemType.Typed<ItemMeta> TRIDENT = getItemType("trident");
|
||||
ItemType.Typed<ItemMeta> NAUTILUS_SHELL = getItemType("nautilus_shell");
|
||||
|
|
|
@ -164,4 +164,33 @@ public interface EquippableComponent extends ConfigurationSerializable {
|
|||
* @param equip whether the item will be equipped
|
||||
*/
|
||||
void setEquipOnInteract(boolean equip);
|
||||
|
||||
/**
|
||||
* Gets if the item will be sheared off by shears.
|
||||
*
|
||||
* @return whether the item can be sheared off
|
||||
*/
|
||||
boolean isCanBeSheared();
|
||||
|
||||
/**
|
||||
* Sets if the item will be sheared off by shears.
|
||||
*
|
||||
* @param sheared whether the item can be sheared off
|
||||
*/
|
||||
void setCanBeSheared(boolean sheared);
|
||||
|
||||
/**
|
||||
* Gets the sound to play when the item is sheared.
|
||||
*
|
||||
* @return the sound
|
||||
*/
|
||||
@Nullable
|
||||
Sound getShearingSound();
|
||||
|
||||
/**
|
||||
* Sets the sound to play when the item is sheared.
|
||||
*
|
||||
* @param sound sound or null for current default
|
||||
*/
|
||||
void setShearingSound(@Nullable Sound sound);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue