mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 19:28:03 +01:00
Update to Minecraft 1.21.2
By: md_5 <git@md-5.net>
This commit is contained in:
parent
68de2de253
commit
cd27f1b0c7
62 changed files with 1914 additions and 156 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.21.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.2-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Bukkit</name>
|
||||
|
|
|
@ -13,6 +13,12 @@ public interface FeatureFlag extends Keyed {
|
|||
|
||||
public static final FeatureFlag VANILLA = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("vanilla"));
|
||||
|
||||
/**
|
||||
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19.3 - 1.21.2
|
||||
*
|
||||
* @deprecated not available since 1.21.2
|
||||
*/
|
||||
@Deprecated
|
||||
public static final FeatureFlag BUNDLE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("bundle"));
|
||||
|
||||
/**
|
||||
|
@ -32,4 +38,11 @@ public interface FeatureFlag extends Keyed {
|
|||
*/
|
||||
@Deprecated
|
||||
public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21"));
|
||||
|
||||
public static final FeatureFlag WINTER_DROP = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("winter_drop"));
|
||||
|
||||
public static final FeatureFlag REDSTONE_EXPERIMENTS = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("redstone_experiments"));
|
||||
|
||||
public static final FeatureFlag MINECART_IMPROVEMENTS = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("minecart_improvements"));
|
||||
|
||||
}
|
||||
|
|
|
@ -29,6 +29,11 @@ public final class GameRule<T> {
|
|||
*/
|
||||
public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT = new GameRule<>("commandBlockOutput", Boolean.class);
|
||||
|
||||
/**
|
||||
* Whether the server should skip checking player speed.
|
||||
*/
|
||||
public static final GameRule<Boolean> DISABLE_PLAYER_MOVEMENT_CHECK = new GameRule<>("disablePlayerMovementCheck", Boolean.class);
|
||||
|
||||
/**
|
||||
* Whether the server should skip checking player speed when the player is
|
||||
* wearing elytra.
|
||||
|
@ -278,6 +283,12 @@ public final class GameRule<T> {
|
|||
*/
|
||||
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = new GameRule<>("playersNetherPortalCreativeDelay", Integer.class);
|
||||
|
||||
/**
|
||||
* The maximum speed of minecarts (when the new movement algorithm is
|
||||
* enabled).
|
||||
*/
|
||||
public static final GameRule<Integer> MINECART_MAX_SPEED = new GameRule<>("minecartMaxSpeed", Integer.class);
|
||||
|
||||
/**
|
||||
* The number of chunks around spawn which will be kept loaded at all times.
|
||||
*/
|
||||
|
|
|
@ -53,6 +53,7 @@ import org.bukkit.block.data.type.Comparator;
|
|||
import org.bukkit.block.data.type.CopperBulb;
|
||||
import org.bukkit.block.data.type.CoralWallFan;
|
||||
import org.bukkit.block.data.type.Crafter;
|
||||
import org.bukkit.block.data.type.CreakingHeart;
|
||||
import org.bukkit.block.data.type.DaylightDetector;
|
||||
import org.bukkit.block.data.type.DecoratedPot;
|
||||
import org.bukkit.block.data.type.Dispenser;
|
||||
|
@ -68,6 +69,7 @@ import org.bukkit.block.data.type.Gate;
|
|||
import org.bukkit.block.data.type.GlassPane;
|
||||
import org.bukkit.block.data.type.GlowLichen;
|
||||
import org.bukkit.block.data.type.Grindstone;
|
||||
import org.bukkit.block.data.type.HangingMoss;
|
||||
import org.bukkit.block.data.type.HangingSign;
|
||||
import org.bukkit.block.data.type.Hopper;
|
||||
import org.bukkit.block.data.type.Jigsaw;
|
||||
|
@ -79,6 +81,7 @@ import org.bukkit.block.data.type.Lectern;
|
|||
import org.bukkit.block.data.type.Light;
|
||||
import org.bukkit.block.data.type.LightningRod;
|
||||
import org.bukkit.block.data.type.MangrovePropagule;
|
||||
import org.bukkit.block.data.type.MossyCarpet;
|
||||
import org.bukkit.block.data.type.NoteBlock;
|
||||
import org.bukkit.block.data.type.Observer;
|
||||
import org.bukkit.block.data.type.PinkPetals;
|
||||
|
@ -212,6 +215,9 @@ public enum Material implements Keyed, Translatable {
|
|||
ACACIA_PLANKS(31312),
|
||||
CHERRY_PLANKS(8354),
|
||||
DARK_OAK_PLANKS(20869),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_PLANKS(21660),
|
||||
MANGROVE_PLANKS(7078),
|
||||
BAMBOO_PLANKS(8520),
|
||||
CRIMSON_PLANKS(18812),
|
||||
|
@ -245,6 +251,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Sapling}
|
||||
*/
|
||||
DARK_OAK_SAPLING(14933, Sapling.class),
|
||||
/**
|
||||
* BlockData: {@link Sapling}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_SAPLING(15508, Sapling.class),
|
||||
/**
|
||||
* BlockData: {@link MangrovePropagule}
|
||||
*/
|
||||
|
@ -412,6 +424,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
CHERRY_LOG(20847, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_LOG(13346, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -468,6 +486,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
STRIPPED_DARK_OAK_LOG(6492, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
STRIPPED_PALE_OAK_LOG(25375, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -508,6 +532,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
STRIPPED_DARK_OAK_WOOD(16000, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
STRIPPED_PALE_OAK_WOOD(20330, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -548,6 +578,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
CHERRY_WOOD(9826, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_WOOD(29429, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -592,6 +628,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
DARK_OAK_LEAVES(22254, Leaves.class),
|
||||
/**
|
||||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_LEAVES(6408, Leaves.class),
|
||||
/**
|
||||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
|
@ -681,12 +723,27 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Ageable}
|
||||
*/
|
||||
KELP(21916, Ageable.class),
|
||||
MOSS_CARPET(8221),
|
||||
/**
|
||||
* BlockData: {@link PinkPetals}
|
||||
*/
|
||||
PINK_PETALS(10420, PinkPetals.class),
|
||||
MOSS_CARPET(8221),
|
||||
MOSS_BLOCK(9175),
|
||||
/**
|
||||
* BlockData: {@link MossyCarpet}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_MOSS_CARPET(24824, MossyCarpet.class),
|
||||
/**
|
||||
* BlockData: {@link HangingMoss}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_HANGING_MOSS(13108, HangingMoss.class),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_MOSS_BLOCK(5318),
|
||||
/**
|
||||
* BlockData: {@link Waterlogged}
|
||||
*/
|
||||
|
@ -731,6 +788,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Slab}
|
||||
*/
|
||||
DARK_OAK_SLAB(28852, Slab.class),
|
||||
/**
|
||||
* BlockData: {@link Slab}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_SLAB(22048, Slab.class),
|
||||
/**
|
||||
* BlockData: {@link Slab}
|
||||
*/
|
||||
|
@ -858,6 +921,12 @@ public enum Material implements Keyed, Translatable {
|
|||
*/
|
||||
PURPUR_STAIRS(8921, Stairs.class),
|
||||
SPAWNER(7018),
|
||||
/**
|
||||
* BlockData: {@link CreakingHeart}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
CREAKING_HEART(11442, CreakingHeart.class),
|
||||
/**
|
||||
* BlockData: {@link Chest}
|
||||
*/
|
||||
|
@ -922,6 +991,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Fence}
|
||||
*/
|
||||
DARK_OAK_FENCE(21767, Fence.class),
|
||||
/**
|
||||
* BlockData: {@link Fence}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_FENCE(10547, Fence.class),
|
||||
/**
|
||||
* BlockData: {@link Fence}
|
||||
*/
|
||||
|
@ -1102,6 +1177,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
DARK_OAK_STAIRS(22921, Stairs.class),
|
||||
/**
|
||||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_STAIRS(20755, Stairs.class),
|
||||
/**
|
||||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
|
@ -1964,6 +2045,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Switch}
|
||||
*/
|
||||
DARK_OAK_BUTTON(6214, Switch.class),
|
||||
/**
|
||||
* BlockData: {@link Switch}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_BUTTON(5238, Switch.class),
|
||||
/**
|
||||
* BlockData: {@link Switch}
|
||||
*/
|
||||
|
@ -2024,6 +2111,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
DARK_OAK_PRESSURE_PLATE(31375, Powerable.class),
|
||||
/**
|
||||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_PRESSURE_PLATE(30527, Powerable.class),
|
||||
/**
|
||||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
|
@ -2072,6 +2165,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Door}
|
||||
*/
|
||||
DARK_OAK_DOOR(10669, Door.class),
|
||||
/**
|
||||
* BlockData: {@link Door}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_DOOR(23817, Door.class),
|
||||
/**
|
||||
* BlockData: {@link Door}
|
||||
*/
|
||||
|
@ -2152,6 +2251,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
DARK_OAK_TRAPDOOR(10355, TrapDoor.class),
|
||||
/**
|
||||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_TRAPDOOR(20647, TrapDoor.class),
|
||||
/**
|
||||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
|
@ -2228,6 +2333,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Gate}
|
||||
*/
|
||||
DARK_OAK_FENCE_GATE(10679, Gate.class),
|
||||
/**
|
||||
* BlockData: {@link Gate}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_FENCE_GATE(21221, Gate.class),
|
||||
/**
|
||||
* BlockData: {@link Gate}
|
||||
*/
|
||||
|
@ -2268,6 +2379,7 @@ public enum Material implements Keyed, Translatable {
|
|||
HOPPER_MINECART(19024, 1),
|
||||
CARROT_ON_A_STICK(27809, 1, 25),
|
||||
WARPED_FUNGUS_ON_A_STICK(11706, 1, 100),
|
||||
PHANTOM_MEMBRANE(18398),
|
||||
ELYTRA(23829, 1, 432),
|
||||
OAK_BOAT(17570, 1),
|
||||
OAK_CHEST_BOAT(7765, 1),
|
||||
|
@ -2283,6 +2395,12 @@ public enum Material implements Keyed, Translatable {
|
|||
CHERRY_CHEST_BOAT(7165, 1),
|
||||
DARK_OAK_BOAT(28618, 1),
|
||||
DARK_OAK_CHEST_BOAT(8733, 1),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_BOAT(18534, 1),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_CHEST_BOAT(26297, 1),
|
||||
MANGROVE_BOAT(20792, 1),
|
||||
MANGROVE_CHEST_BOAT(18572, 1),
|
||||
BAMBOO_RAFT(25901, 1),
|
||||
|
@ -2418,6 +2536,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Sign}
|
||||
*/
|
||||
DARK_OAK_SIGN(15127, 16, Sign.class),
|
||||
/**
|
||||
* BlockData: {@link Sign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_SIGN(12116, 16, Sign.class),
|
||||
/**
|
||||
* BlockData: {@link Sign}
|
||||
*/
|
||||
|
@ -2462,6 +2586,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
DARK_OAK_HANGING_SIGN(23360, 16, HangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_HANGING_SIGN(7097, 16, HangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
|
@ -2501,6 +2631,22 @@ public enum Material implements Keyed, Translatable {
|
|||
COMPASS(24139),
|
||||
RECOVERY_COMPASS(12710),
|
||||
BUNDLE(16835, 1),
|
||||
WHITE_BUNDLE(12072, 1),
|
||||
ORANGE_BUNDLE(18288, 1),
|
||||
MAGENTA_BUNDLE(15328, 1),
|
||||
LIGHT_BLUE_BUNDLE(18639, 1),
|
||||
YELLOW_BUNDLE(27749, 1),
|
||||
LIME_BUNDLE(30093, 1),
|
||||
PINK_BUNDLE(21400, 1),
|
||||
GRAY_BUNDLE(21262, 1),
|
||||
LIGHT_GRAY_BUNDLE(26338, 1),
|
||||
CYAN_BUNDLE(8942, 1),
|
||||
PURPLE_BUNDLE(10319, 1),
|
||||
BLUE_BUNDLE(31501, 1),
|
||||
BROWN_BUNDLE(15464, 1),
|
||||
GREEN_BUNDLE(4597, 1),
|
||||
RED_BUNDLE(19986, 1),
|
||||
BLACK_BUNDLE(22519, 1),
|
||||
FISHING_ROD(4167, 1, 64),
|
||||
CLOCK(14980),
|
||||
SPYGLASS(27490, 1),
|
||||
|
@ -2625,8 +2771,8 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Ageable}
|
||||
*/
|
||||
NETHER_WART(29227, Ageable.class),
|
||||
POTION(24020, 1),
|
||||
GLASS_BOTTLE(6116),
|
||||
POTION(24020, 1),
|
||||
SPIDER_EYE(9318),
|
||||
FERMENTED_SPIDER_EYE(19386),
|
||||
BLAZE_POWDER(18941),
|
||||
|
@ -2714,6 +2860,9 @@ public enum Material implements Keyed, Translatable {
|
|||
WITHER_SKELETON_SPAWN_EGG(10073),
|
||||
WOLF_SPAWN_EGG(21692),
|
||||
ZOGLIN_SPAWN_EGG(7442),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
CREAKING_SPAWN_EGG(9598),
|
||||
ZOMBIE_SPAWN_EGG(5814),
|
||||
ZOMBIE_HORSE_SPAWN_EGG(4275),
|
||||
ZOMBIE_VILLAGER_SPAWN_EGG(10311),
|
||||
|
@ -2723,6 +2872,7 @@ public enum Material implements Keyed, Translatable {
|
|||
WIND_CHARGE(23928),
|
||||
WRITABLE_BOOK(13393, 1),
|
||||
WRITTEN_BOOK(24164, 16),
|
||||
BREEZE_ROD(14281),
|
||||
MACE(4771, 1, 500),
|
||||
ITEM_FRAME(27318),
|
||||
GLOW_ITEM_FRAME(26473),
|
||||
|
@ -2888,7 +3038,6 @@ public enum Material implements Keyed, Translatable {
|
|||
MUSIC_DISC_PRECIPICE(28677, 1),
|
||||
DISC_FRAGMENT_5(29729),
|
||||
TRIDENT(7534, 1, 250),
|
||||
PHANTOM_MEMBRANE(18398),
|
||||
NAUTILUS_SHELL(19989),
|
||||
HEART_OF_THE_SEA(11807),
|
||||
CROSSBOW(4340, 1, 465),
|
||||
|
@ -2905,6 +3054,8 @@ public enum Material implements Keyed, Translatable {
|
|||
PIGLIN_BANNER_PATTERN(22028, 1),
|
||||
FLOW_BANNER_PATTERN(32683, 1),
|
||||
GUSTER_BANNER_PATTERN(27267, 1),
|
||||
FIELD_MASONED_BANNER_PATTERN(19157, 1),
|
||||
BORDURE_INDENTED_BANNER_PATTERN(25850, 1),
|
||||
GOAT_HORN(28237, 1),
|
||||
/**
|
||||
* BlockData: {@link Levelled}
|
||||
|
@ -3223,7 +3374,6 @@ public enum Material implements Keyed, Translatable {
|
|||
*/
|
||||
VAULT(6288, Vault.class),
|
||||
OMINOUS_BOTTLE(26321),
|
||||
BREEZE_ROD(14281),
|
||||
/**
|
||||
* BlockData: {@link Levelled}
|
||||
*/
|
||||
|
@ -3285,6 +3435,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
DARK_OAK_WALL_SIGN(9508, 16, WallSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_WALL_SIGN(23103, 16, WallSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
|
@ -3321,6 +3477,12 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
DARK_OAK_WALL_HANGING_SIGN(14296, WallHangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_OAK_WALL_HANGING_SIGN(23484, WallHangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
|
@ -3391,6 +3553,9 @@ public enum Material implements Keyed, Translatable {
|
|||
POTTED_ACACIA_SAPLING(14096),
|
||||
POTTED_CHERRY_SAPLING(30785),
|
||||
POTTED_DARK_OAK_SAPLING(6486),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
POTTED_PALE_OAK_SAPLING(15538),
|
||||
POTTED_MANGROVE_PROPAGULE(22003),
|
||||
POTTED_FERN(23315),
|
||||
POTTED_DANDELION(9727),
|
||||
|
|
|
@ -47,5 +47,6 @@ public @interface MinecraftExperimental {
|
|||
@ApiStatus.Internal
|
||||
public enum Requires {
|
||||
|
||||
WINTER_DROP,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,6 +246,14 @@ public enum Sound implements Keyed {
|
|||
BLOCK_CORAL_BLOCK_STEP("block.coral_block.step"),
|
||||
BLOCK_CRAFTER_CRAFT("block.crafter.craft"),
|
||||
BLOCK_CRAFTER_FAIL("block.crafter.fail"),
|
||||
BLOCK_CREAKING_HEART_BREAK("block.creaking_heart.break"),
|
||||
BLOCK_CREAKING_HEART_FALL("block.creaking_heart.fall"),
|
||||
BLOCK_CREAKING_HEART_HIT("block.creaking_heart.hit"),
|
||||
BLOCK_CREAKING_HEART_HURT("block.creaking_heart.hurt"),
|
||||
BLOCK_CREAKING_HEART_IDLE("block.creaking_heart.idle"),
|
||||
BLOCK_CREAKING_HEART_PLACE("block.creaking_heart.place"),
|
||||
BLOCK_CREAKING_HEART_SPAWN("block.creaking_heart.spawn"),
|
||||
BLOCK_CREAKING_HEART_STEP("block.creaking_heart.step"),
|
||||
BLOCK_CROP_BREAK("block.crop.break"),
|
||||
BLOCK_DECORATED_POT_BREAK("block.decorated_pot.break"),
|
||||
BLOCK_DECORATED_POT_FALL("block.decorated_pot.fall"),
|
||||
|
@ -502,6 +510,7 @@ public enum Sound implements Keyed {
|
|||
BLOCK_PACKED_MUD_HIT("block.packed_mud.hit"),
|
||||
BLOCK_PACKED_MUD_PLACE("block.packed_mud.place"),
|
||||
BLOCK_PACKED_MUD_STEP("block.packed_mud.step"),
|
||||
BLOCK_PALE_HANGING_MOSS_IDLE("block.pale_hanging_moss.idle"),
|
||||
BLOCK_PINK_PETALS_BREAK("block.pink_petals.break"),
|
||||
BLOCK_PINK_PETALS_FALL("block.pink_petals.fall"),
|
||||
BLOCK_PINK_PETALS_HIT("block.pink_petals.hit"),
|
||||
|
@ -634,6 +643,11 @@ public enum Sound implements Keyed {
|
|||
BLOCK_SOUL_SOIL_HIT("block.soul_soil.hit"),
|
||||
BLOCK_SOUL_SOIL_PLACE("block.soul_soil.place"),
|
||||
BLOCK_SOUL_SOIL_STEP("block.soul_soil.step"),
|
||||
BLOCK_SPAWNER_BREAK("block.spawner.break"),
|
||||
BLOCK_SPAWNER_FALL("block.spawner.fall"),
|
||||
BLOCK_SPAWNER_HIT("block.spawner.hit"),
|
||||
BLOCK_SPAWNER_PLACE("block.spawner.place"),
|
||||
BLOCK_SPAWNER_STEP("block.spawner.step"),
|
||||
BLOCK_SPONGE_ABSORB("block.sponge.absorb"),
|
||||
BLOCK_SPONGE_BREAK("block.sponge.break"),
|
||||
BLOCK_SPONGE_FALL("block.sponge.fall"),
|
||||
|
@ -866,6 +880,16 @@ public enum Sound implements Keyed {
|
|||
ENTITY_COW_HURT("entity.cow.hurt"),
|
||||
ENTITY_COW_MILK("entity.cow.milk"),
|
||||
ENTITY_COW_STEP("entity.cow.step"),
|
||||
ENTITY_CREAKING_ACTIVATE("entity.creaking.activate"),
|
||||
ENTITY_CREAKING_AMBIENT("entity.creaking.ambient"),
|
||||
ENTITY_CREAKING_ATTACK("entity.creaking.attack"),
|
||||
ENTITY_CREAKING_DEACTIVATE("entity.creaking.deactivate"),
|
||||
ENTITY_CREAKING_DEATH("entity.creaking.death"),
|
||||
ENTITY_CREAKING_FREEZE("entity.creaking.freeze"),
|
||||
ENTITY_CREAKING_SPAWN("entity.creaking.spawn"),
|
||||
ENTITY_CREAKING_STEP("entity.creaking.step"),
|
||||
ENTITY_CREAKING_SWAY("entity.creaking.sway"),
|
||||
ENTITY_CREAKING_UNFREEZE("entity.creaking.unfreeze"),
|
||||
ENTITY_CREEPER_DEATH("entity.creeper.death"),
|
||||
ENTITY_CREEPER_HURT("entity.creeper.hurt"),
|
||||
ENTITY_CREEPER_PRIMED("entity.creeper.primed"),
|
||||
|
@ -1004,7 +1028,6 @@ public enum Sound implements Keyed {
|
|||
ENTITY_GOAT_SCREAMING_AMBIENT("entity.goat.screaming.ambient"),
|
||||
ENTITY_GOAT_SCREAMING_DEATH("entity.goat.screaming.death"),
|
||||
ENTITY_GOAT_SCREAMING_EAT("entity.goat.screaming.eat"),
|
||||
ENTITY_GOAT_SCREAMING_HORN_BREAK("entity.goat.screaming.horn_break"),
|
||||
ENTITY_GOAT_SCREAMING_HURT("entity.goat.screaming.hurt"),
|
||||
ENTITY_GOAT_SCREAMING_LONG_JUMP("entity.goat.screaming.long_jump"),
|
||||
ENTITY_GOAT_SCREAMING_MILK("entity.goat.screaming.milk"),
|
||||
|
@ -1131,6 +1154,7 @@ public enum Sound implements Keyed {
|
|||
ENTITY_PARROT_IMITATE_BLAZE("entity.parrot.imitate.blaze"),
|
||||
ENTITY_PARROT_IMITATE_BOGGED("entity.parrot.imitate.bogged"),
|
||||
ENTITY_PARROT_IMITATE_BREEZE("entity.parrot.imitate.breeze"),
|
||||
ENTITY_PARROT_IMITATE_CREAKING("entity.parrot.imitate.creaking"),
|
||||
ENTITY_PARROT_IMITATE_CREEPER("entity.parrot.imitate.creeper"),
|
||||
ENTITY_PARROT_IMITATE_DROWNED("entity.parrot.imitate.drowned"),
|
||||
ENTITY_PARROT_IMITATE_ELDER_GUARDIAN("entity.parrot.imitate.elder_guardian"),
|
||||
|
@ -1508,6 +1532,7 @@ public enum Sound implements Keyed {
|
|||
ITEM_BUCKET_FILL_TADPOLE("item.bucket.fill_tadpole"),
|
||||
ITEM_BUNDLE_DROP_CONTENTS("item.bundle.drop_contents"),
|
||||
ITEM_BUNDLE_INSERT("item.bundle.insert"),
|
||||
ITEM_BUNDLE_INSERT_FAIL("item.bundle.insert_fail"),
|
||||
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
|
||||
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
|
||||
ITEM_CROP_PLANT("item.crop.plant"),
|
||||
|
@ -1524,7 +1549,6 @@ public enum Sound implements Keyed {
|
|||
ITEM_FIRECHARGE_USE("item.firecharge.use"),
|
||||
ITEM_FLINTANDSTEEL_USE("item.flintandsteel.use"),
|
||||
ITEM_GLOW_INK_SAC_USE("item.glow_ink_sac.use"),
|
||||
ITEM_GOAT_HORN_PLAY("item.goat_horn.play"),
|
||||
ITEM_GOAT_HORN_SOUND_0("item.goat_horn.sound.0"),
|
||||
ITEM_GOAT_HORN_SOUND_1("item.goat_horn.sound.1"),
|
||||
ITEM_GOAT_HORN_SOUND_2("item.goat_horn.sound.2"),
|
||||
|
@ -1614,6 +1638,7 @@ public enum Sound implements Keyed {
|
|||
PARTICLE_SOUL_ESCAPE("particle.soul_escape"),
|
||||
UI_BUTTON_CLICK("ui.button.click"),
|
||||
UI_CARTOGRAPHY_TABLE_TAKE_RESULT("ui.cartography_table.take_result"),
|
||||
UI_HUD_BUBBLE_POP("ui.hud.bubble_pop"),
|
||||
UI_LOOM_SELECT_PATTERN("ui.loom.select_pattern"),
|
||||
UI_LOOM_TAKE_RESULT("ui.loom.take_result"),
|
||||
UI_STONECUTTER_SELECT_RECIPE("ui.stonecutter.select_recipe"),
|
||||
|
|
|
@ -111,6 +111,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla block tag representing all dark oak log and bark variants.
|
||||
*/
|
||||
Tag<Material> DARK_OAK_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dark_oak_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all pale oak log and bark variants.
|
||||
*/
|
||||
Tag<Material> PALE_OAK_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("pale_oak_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all oak log and bark variants.
|
||||
*/
|
||||
|
@ -696,6 +700,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla block tag representing all blocks which frogs will spawn on.
|
||||
*/
|
||||
Tag<Material> FROGS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("frogs_spawnable_on"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all blocks which bats will spawn on.
|
||||
*/
|
||||
Tag<Material> BATS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bats_spawnable_on"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all blocks which azaleas will grow on.
|
||||
*/
|
||||
|
@ -791,6 +799,18 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla item tag representing all items ignored by piglin babies.
|
||||
*/
|
||||
Tag<Material> IGNORED_BY_PIGLIN_BABIES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("ignored_by_piglin_babies"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which will prevent piglins from being angered.
|
||||
*/
|
||||
Tag<Material> ITEMS_PIGLIN_SAFE_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("piglin_safe_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which can be used to duplicate Allays when they are dancing.
|
||||
*/
|
||||
Tag<Material> ITEMS_DUPLICATES_ALLAYS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("duplicates_allays"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all brewing stand fuel items.
|
||||
*/
|
||||
Tag<Material> ITEMS_BREWING_FUEL = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("brewing_fuel"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all meat.
|
||||
*/
|
||||
|
@ -889,6 +909,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla item tag representing all panda food.
|
||||
*/
|
||||
Tag<Material> ITEMS_PANDA_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("panda_food"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items that a panda will pick up and eat from the ground.
|
||||
*/
|
||||
Tag<Material> ITEMS_PANDA_EATS_FROM_GROUND = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("panda_eats_from_ground"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all pig food.
|
||||
*/
|
||||
|
@ -965,10 +989,62 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla item tag representing all items that may be placed in beacons.
|
||||
*/
|
||||
Tag<Material> ITEMS_BEACON_PAYMENT_ITEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("beacon_payment_items"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all wooden tool materials.
|
||||
*/
|
||||
Tag<Material> ITEMS_WOODEN_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_tool_materials"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all stone tool materials.
|
||||
*/
|
||||
Tag<Material> ITEMS_STONE_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stone_tool_materials"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all iron tool materials.
|
||||
*/
|
||||
Tag<Material> ITEMS_IRON_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("iron_tool_materials"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all gold tool materials.
|
||||
*/
|
||||
Tag<Material> ITEMS_GOLD_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("gold_tool_materials"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all diamond tool materials.
|
||||
*/
|
||||
Tag<Material> ITEMS_DIAMOND_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("diamond_tool_materials"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all netherite tool materials.
|
||||
*/
|
||||
Tag<Material> ITEMS_NETHERITE_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("netherite_tool_materials"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair leather armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_LEATHER_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_leather_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair chain armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_CHAIN_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_chain_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair iron armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_IRON_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_iron_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair gold armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_GOLD_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_gold_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair diamond armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_DIAMOND_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_diamond_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair netherite armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_NETHERITE_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_netherite_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair turtle helmets.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_TURTLE_HELMET = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_turtle_helmet"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which repair wolf armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_REPAIRS_WOLF_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("repairs_wolf_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all furnace materials.
|
||||
*/
|
||||
|
@ -1064,13 +1140,25 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
@Deprecated(forRemoval = true)
|
||||
Tag<Material> ITEMS_TOOLS = ITEMS_BREAKS_DECORATED_POTS;
|
||||
/**
|
||||
* Vanilla item tag representing all seeds planteable by villagers.
|
||||
* Vanilla item tag representing all seeds plantable by villagers.
|
||||
*/
|
||||
Tag<Material> ITEMS_VILLAGER_PLANTABLE_SEEDS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("villager_plantable_seeds"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which villagers pick up.
|
||||
*/
|
||||
Tag<Material> ITEMS_VILLAGER_PICKS_UP = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("villager_picks_up"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all dyeable items.
|
||||
*/
|
||||
Tag<Material> ITEMS_DYEABLE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("dyeable"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all furnace minecart fuel.
|
||||
*/
|
||||
Tag<Material> ITEMS_FURNACE_MINECART_FUEL = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("furnace_minecart_fuel"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all bundle items.
|
||||
*/
|
||||
Tag<Material> ITEMS_BUNDLES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("bundles"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all enchantable foot armor.
|
||||
*/
|
||||
|
@ -1147,6 +1235,14 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla item tag representing all items enchantable with mace enchantments.
|
||||
*/
|
||||
Tag<Material> ITEMS_ENCHANTABLE_MACE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mace"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which when equipped will hide the entity from maps.
|
||||
*/
|
||||
Tag<Material> ITEMS_MAP_INVISIBILITY_EQUIPMENT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("map_invisibility_equipment"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which disguise the wearer's gaze from other entities.
|
||||
*/
|
||||
Tag<Material> ITEMS_GAZE_DISGUISE_EQUIPMENT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("gaze_disguise_equipment"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items that confer freeze immunity on
|
||||
* the wearer.
|
||||
|
|
|
@ -14,127 +14,131 @@ public enum Attribute implements Keyed, Translatable {
|
|||
/**
|
||||
* Maximum health of an Entity.
|
||||
*/
|
||||
GENERIC_MAX_HEALTH("generic.max_health"),
|
||||
GENERIC_MAX_HEALTH("max_health"),
|
||||
/**
|
||||
* Range at which an Entity will follow others.
|
||||
*/
|
||||
GENERIC_FOLLOW_RANGE("generic.follow_range"),
|
||||
GENERIC_FOLLOW_RANGE("follow_range"),
|
||||
/**
|
||||
* Resistance of an Entity to knockback.
|
||||
*/
|
||||
GENERIC_KNOCKBACK_RESISTANCE("generic.knockback_resistance"),
|
||||
GENERIC_KNOCKBACK_RESISTANCE("knockback_resistance"),
|
||||
/**
|
||||
* Movement speed of an Entity.
|
||||
*/
|
||||
GENERIC_MOVEMENT_SPEED("generic.movement_speed"),
|
||||
GENERIC_MOVEMENT_SPEED("movement_speed"),
|
||||
/**
|
||||
* Flying speed of an Entity.
|
||||
*/
|
||||
GENERIC_FLYING_SPEED("generic.flying_speed"),
|
||||
GENERIC_FLYING_SPEED("flying_speed"),
|
||||
/**
|
||||
* Attack damage of an Entity.
|
||||
*/
|
||||
GENERIC_ATTACK_DAMAGE("generic.attack_damage"),
|
||||
GENERIC_ATTACK_DAMAGE("attack_damage"),
|
||||
/**
|
||||
* Attack knockback of an Entity.
|
||||
*/
|
||||
GENERIC_ATTACK_KNOCKBACK("generic.attack_knockback"),
|
||||
GENERIC_ATTACK_KNOCKBACK("attack_knockback"),
|
||||
/**
|
||||
* Attack speed of an Entity.
|
||||
*/
|
||||
GENERIC_ATTACK_SPEED("generic.attack_speed"),
|
||||
GENERIC_ATTACK_SPEED("attack_speed"),
|
||||
/**
|
||||
* Armor bonus of an Entity.
|
||||
*/
|
||||
GENERIC_ARMOR("generic.armor"),
|
||||
GENERIC_ARMOR("armor"),
|
||||
/**
|
||||
* Armor durability bonus of an Entity.
|
||||
*/
|
||||
GENERIC_ARMOR_TOUGHNESS("generic.armor_toughness"),
|
||||
GENERIC_ARMOR_TOUGHNESS("armor_toughness"),
|
||||
/**
|
||||
* The fall damage multiplier of an Entity.
|
||||
*/
|
||||
GENERIC_FALL_DAMAGE_MULTIPLIER("generic.fall_damage_multiplier"),
|
||||
GENERIC_FALL_DAMAGE_MULTIPLIER("fall_damage_multiplier"),
|
||||
/**
|
||||
* Luck bonus of an Entity.
|
||||
*/
|
||||
GENERIC_LUCK("generic.luck"),
|
||||
GENERIC_LUCK("luck"),
|
||||
/**
|
||||
* Maximum absorption of an Entity.
|
||||
*/
|
||||
GENERIC_MAX_ABSORPTION("generic.max_absorption"),
|
||||
GENERIC_MAX_ABSORPTION("max_absorption"),
|
||||
/**
|
||||
* The distance which an Entity can fall without damage.
|
||||
*/
|
||||
GENERIC_SAFE_FALL_DISTANCE("generic.safe_fall_distance"),
|
||||
GENERIC_SAFE_FALL_DISTANCE("safe_fall_distance"),
|
||||
/**
|
||||
* The relative scale of an Entity.
|
||||
*/
|
||||
GENERIC_SCALE("generic.scale"),
|
||||
GENERIC_SCALE("scale"),
|
||||
/**
|
||||
* The height which an Entity can walk over.
|
||||
*/
|
||||
GENERIC_STEP_HEIGHT("generic.step_height"),
|
||||
GENERIC_STEP_HEIGHT("step_height"),
|
||||
/**
|
||||
* The gravity applied to an Entity.
|
||||
*/
|
||||
GENERIC_GRAVITY("generic.gravity"),
|
||||
GENERIC_GRAVITY("gravity"),
|
||||
/**
|
||||
* Strength with which an Entity will jump.
|
||||
*/
|
||||
GENERIC_JUMP_STRENGTH("generic.jump_strength"),
|
||||
GENERIC_JUMP_STRENGTH("jump_strength"),
|
||||
/**
|
||||
* How long an entity remains burning after ingition.
|
||||
*/
|
||||
GENERIC_BURNING_TIME("generic.burning_time"),
|
||||
GENERIC_BURNING_TIME("burning_time"),
|
||||
/**
|
||||
* Resistance to knockback from explosions.
|
||||
*/
|
||||
GENERIC_EXPLOSION_KNOCKBACK_RESISTANCE("generic.explosion_knockback_resistance"),
|
||||
GENERIC_EXPLOSION_KNOCKBACK_RESISTANCE("explosion_knockback_resistance"),
|
||||
/**
|
||||
* Movement speed through difficult terrain.
|
||||
*/
|
||||
GENERIC_MOVEMENT_EFFICIENCY("generic.movement_efficiency"),
|
||||
GENERIC_MOVEMENT_EFFICIENCY("movement_efficiency"),
|
||||
/**
|
||||
* Oxygen use underwater.
|
||||
*/
|
||||
GENERIC_OXYGEN_BONUS("generic.oxygen_bonus"),
|
||||
GENERIC_OXYGEN_BONUS("oxygen_bonus"),
|
||||
/**
|
||||
* Movement speed through water.
|
||||
*/
|
||||
GENERIC_WATER_MOVEMENT_EFFICIENCY("generic.water_movement_efficiency"),
|
||||
GENERIC_WATER_MOVEMENT_EFFICIENCY("water_movement_efficiency"),
|
||||
/**
|
||||
* Range at which mobs will be tempted by items.
|
||||
*/
|
||||
GENERIC_TEMPT_RANGE("tempt_range"),
|
||||
/**
|
||||
* The block reach distance of a Player.
|
||||
*/
|
||||
PLAYER_BLOCK_INTERACTION_RANGE("player.block_interaction_range"),
|
||||
PLAYER_BLOCK_INTERACTION_RANGE("block_interaction_range"),
|
||||
/**
|
||||
* The entity reach distance of a Player.
|
||||
*/
|
||||
PLAYER_ENTITY_INTERACTION_RANGE("player.entity_interaction_range"),
|
||||
PLAYER_ENTITY_INTERACTION_RANGE("entity_interaction_range"),
|
||||
/**
|
||||
* Block break speed of a Player.
|
||||
*/
|
||||
PLAYER_BLOCK_BREAK_SPEED("player.block_break_speed"),
|
||||
PLAYER_BLOCK_BREAK_SPEED("block_break_speed"),
|
||||
/**
|
||||
* Mining speed for correct tools.
|
||||
*/
|
||||
PLAYER_MINING_EFFICIENCY("player.mining_efficiency"),
|
||||
PLAYER_MINING_EFFICIENCY("mining_efficiency"),
|
||||
/**
|
||||
* Sneaking speed.
|
||||
*/
|
||||
PLAYER_SNEAKING_SPEED("player.sneaking_speed"),
|
||||
PLAYER_SNEAKING_SPEED("sneaking_speed"),
|
||||
/**
|
||||
* Underwater mining speed.
|
||||
*/
|
||||
PLAYER_SUBMERGED_MINING_SPEED("player.submerged_mining_speed"),
|
||||
PLAYER_SUBMERGED_MINING_SPEED("submerged_mining_speed"),
|
||||
/**
|
||||
* Sweeping damage.
|
||||
*/
|
||||
PLAYER_SWEEPING_DAMAGE_RATIO("player.sweeping_damage_ratio"),
|
||||
PLAYER_SWEEPING_DAMAGE_RATIO("sweeping_damage_ratio"),
|
||||
/**
|
||||
* Chance of a zombie to spawn reinforcements.
|
||||
*/
|
||||
ZOMBIE_SPAWN_REINFORCEMENTS("zombie.spawn_reinforcements");
|
||||
ZOMBIE_SPAWN_REINFORCEMENTS("spawn_reinforcements");
|
||||
|
||||
private final NamespacedKey key;
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ package org.bukkit.block;
|
|||
|
||||
import java.util.Locale;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
|
@ -73,6 +75,9 @@ public enum Biome implements Keyed {
|
|||
JAGGED_PEAKS,
|
||||
STONY_PEAKS,
|
||||
CHERRY_GROVE,
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
PALE_GARDEN,
|
||||
/**
|
||||
* Represents a custom Biome
|
||||
*/
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.bukkit.block;
|
|||
import java.util.function.Consumer;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Registry;
|
||||
import org.bukkit.Translatable;
|
||||
|
@ -47,6 +48,7 @@ import org.bukkit.block.data.type.Comparator;
|
|||
import org.bukkit.block.data.type.CopperBulb;
|
||||
import org.bukkit.block.data.type.CoralWallFan;
|
||||
import org.bukkit.block.data.type.Crafter;
|
||||
import org.bukkit.block.data.type.CreakingHeart;
|
||||
import org.bukkit.block.data.type.DaylightDetector;
|
||||
import org.bukkit.block.data.type.DecoratedPot;
|
||||
import org.bukkit.block.data.type.Dispenser;
|
||||
|
@ -62,6 +64,7 @@ import org.bukkit.block.data.type.Gate;
|
|||
import org.bukkit.block.data.type.GlassPane;
|
||||
import org.bukkit.block.data.type.GlowLichen;
|
||||
import org.bukkit.block.data.type.Grindstone;
|
||||
import org.bukkit.block.data.type.HangingMoss;
|
||||
import org.bukkit.block.data.type.HangingSign;
|
||||
import org.bukkit.block.data.type.Hopper;
|
||||
import org.bukkit.block.data.type.Jigsaw;
|
||||
|
@ -73,6 +76,7 @@ import org.bukkit.block.data.type.Lectern;
|
|||
import org.bukkit.block.data.type.Light;
|
||||
import org.bukkit.block.data.type.LightningRod;
|
||||
import org.bukkit.block.data.type.MangrovePropagule;
|
||||
import org.bukkit.block.data.type.MossyCarpet;
|
||||
import org.bukkit.block.data.type.NoteBlock;
|
||||
import org.bukkit.block.data.type.Observer;
|
||||
import org.bukkit.block.data.type.PinkPetals;
|
||||
|
@ -205,6 +209,9 @@ public interface BlockType extends Keyed, Translatable {
|
|||
BlockType.Typed<BlockData> ACACIA_PLANKS = getBlockType("acacia_planks");
|
||||
BlockType.Typed<BlockData> CHERRY_PLANKS = getBlockType("cherry_planks");
|
||||
BlockType.Typed<BlockData> DARK_OAK_PLANKS = getBlockType("dark_oak_planks");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<BlockData> PALE_OAK_PLANKS = getBlockType("pale_oak_planks");
|
||||
BlockType.Typed<BlockData> MANGROVE_PLANKS = getBlockType("mangrove_planks");
|
||||
BlockType.Typed<BlockData> BAMBOO_PLANKS = getBlockType("bamboo_planks");
|
||||
BlockType.Typed<BlockData> BAMBOO_MOSAIC = getBlockType("bamboo_mosaic");
|
||||
|
@ -236,6 +243,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Sapling}
|
||||
*/
|
||||
BlockType.Typed<Sapling> DARK_OAK_SAPLING = getBlockType("dark_oak_sapling");
|
||||
/**
|
||||
* BlockData: {@link Sapling}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Sapling> PALE_OAK_SAPLING = getBlockType("pale_oak_sapling");
|
||||
/**
|
||||
* BlockData: {@link MangrovePropagule}
|
||||
*/
|
||||
|
@ -295,6 +308,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
BlockType.Typed<Orientable> DARK_OAK_LOG = getBlockType("dark_oak_log");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Orientable> PALE_OAK_LOG = getBlockType("pale_oak_log");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -335,6 +354,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
BlockType.Typed<Orientable> STRIPPED_DARK_OAK_LOG = getBlockType("stripped_dark_oak_log");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Orientable> STRIPPED_PALE_OAK_LOG = getBlockType("stripped_pale_oak_log");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -375,6 +400,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
BlockType.Typed<Orientable> DARK_OAK_WOOD = getBlockType("dark_oak_wood");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Orientable> PALE_OAK_WOOD = getBlockType("pale_oak_wood");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -407,6 +438,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
BlockType.Typed<Orientable> STRIPPED_DARK_OAK_WOOD = getBlockType("stripped_dark_oak_wood");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Orientable> STRIPPED_PALE_OAK_WOOD = getBlockType("stripped_pale_oak_wood");
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -439,6 +476,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
BlockType.Typed<Leaves> DARK_OAK_LEAVES = getBlockType("dark_oak_leaves");
|
||||
/**
|
||||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Leaves> PALE_OAK_LEAVES = getBlockType("pale_oak_leaves");
|
||||
/**
|
||||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
|
@ -622,6 +665,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
BlockType.Typed<Fire> FIRE = getBlockType("fire");
|
||||
BlockType.Typed<BlockData> SOUL_FIRE = getBlockType("soul_fire");
|
||||
BlockType.Typed<BlockData> SPAWNER = getBlockType("spawner");
|
||||
/**
|
||||
* BlockData: {@link Fire}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<CreakingHeart> CREAKING_HEART = getBlockType("creaking_heart");
|
||||
/**
|
||||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
|
@ -678,6 +727,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Sign}
|
||||
*/
|
||||
BlockType.Typed<Sign> DARK_OAK_SIGN = getBlockType("dark_oak_sign");
|
||||
/**
|
||||
* BlockData: {@link Sign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Sign> PALE_OAK_SIGN = getBlockType("pale_oak_sign");
|
||||
/**
|
||||
* BlockData: {@link Sign}
|
||||
*/
|
||||
|
@ -730,6 +785,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
BlockType.Typed<WallSign> DARK_OAK_WALL_SIGN = getBlockType("dark_oak_wall_sign");
|
||||
/**
|
||||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<WallSign> PALE_OAK_WALL_SIGN = getBlockType("pale_oak_wall_sign");
|
||||
/**
|
||||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
|
@ -766,6 +827,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
BlockType.Typed<HangingSign> DARK_OAK_HANGING_SIGN = getBlockType("dark_oak_hanging_sign");
|
||||
/**
|
||||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<HangingSign> PALE_OAK_HANGING_SIGN = getBlockType("pale_oak_hanging_sign");
|
||||
/**
|
||||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
|
@ -810,6 +877,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
BlockType.Typed<WallHangingSign> DARK_OAK_WALL_HANGING_SIGN = getBlockType("dark_oak_wall_hanging_sign");
|
||||
/**
|
||||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<WallHangingSign> PALE_OAK_WALL_HANGING_SIGN = getBlockType("pale_oak_wall_hanging_sign");
|
||||
/**
|
||||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
|
@ -866,6 +939,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
BlockType.Typed<Powerable> DARK_OAK_PRESSURE_PLATE = getBlockType("dark_oak_pressure_plate");
|
||||
/**
|
||||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Powerable> PALE_OAK_PRESSURE_PLATE = getBlockType("pale_oak_pressure_plate");
|
||||
/**
|
||||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
|
@ -998,6 +1077,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
BlockType.Typed<TrapDoor> DARK_OAK_TRAPDOOR = getBlockType("dark_oak_trapdoor");
|
||||
/**
|
||||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<TrapDoor> PALE_OAK_TRAPDOOR = getBlockType("pale_oak_trapdoor");
|
||||
/**
|
||||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
|
@ -1185,6 +1270,9 @@ public interface BlockType extends Keyed, Translatable {
|
|||
BlockType.Typed<BlockData> POTTED_ACACIA_SAPLING = getBlockType("potted_acacia_sapling");
|
||||
BlockType.Typed<BlockData> POTTED_CHERRY_SAPLING = getBlockType("potted_cherry_sapling");
|
||||
BlockType.Typed<BlockData> POTTED_DARK_OAK_SAPLING = getBlockType("potted_dark_oak_sapling");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<BlockData> POTTED_PALE_OAK_SAPLING = getBlockType("potted_pale_oak_sapling");
|
||||
BlockType.Typed<BlockData> POTTED_MANGROVE_PROPAGULE = getBlockType("potted_mangrove_propagule");
|
||||
BlockType.Typed<BlockData> POTTED_FERN = getBlockType("potted_fern");
|
||||
BlockType.Typed<BlockData> POTTED_DANDELION = getBlockType("potted_dandelion");
|
||||
|
@ -1240,6 +1328,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Switch}
|
||||
*/
|
||||
BlockType.Typed<Switch> DARK_OAK_BUTTON = getBlockType("dark_oak_button");
|
||||
/**
|
||||
* BlockData: {@link Switch}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Switch> PALE_OAK_BUTTON = getBlockType("pale_oak_button");
|
||||
/**
|
||||
* BlockData: {@link Switch}
|
||||
*/
|
||||
|
@ -1452,6 +1546,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
BlockType.Typed<Stairs> DARK_OAK_STAIRS = getBlockType("dark_oak_stairs");
|
||||
/**
|
||||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Stairs> PALE_OAK_STAIRS = getBlockType("pale_oak_stairs");
|
||||
/**
|
||||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
|
@ -1715,6 +1815,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Slab}
|
||||
*/
|
||||
BlockType.Typed<Slab> DARK_OAK_SLAB = getBlockType("dark_oak_slab");
|
||||
/**
|
||||
* BlockData: {@link Slab}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Slab> PALE_OAK_SLAB = getBlockType("pale_oak_slab");
|
||||
/**
|
||||
* BlockData: {@link Slab}
|
||||
*/
|
||||
|
@ -1811,6 +1917,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Gate}
|
||||
*/
|
||||
BlockType.Typed<Gate> DARK_OAK_FENCE_GATE = getBlockType("dark_oak_fence_gate");
|
||||
/**
|
||||
* BlockData: {@link Gate}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Gate> PALE_OAK_FENCE_GATE = getBlockType("pale_oak_fence_gate");
|
||||
/**
|
||||
* BlockData: {@link Gate}
|
||||
*/
|
||||
|
@ -1843,6 +1955,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Fence}
|
||||
*/
|
||||
BlockType.Typed<Fence> DARK_OAK_FENCE = getBlockType("dark_oak_fence");
|
||||
/**
|
||||
* BlockData: {@link Fence}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Fence> PALE_OAK_FENCE = getBlockType("pale_oak_fence");
|
||||
/**
|
||||
* BlockData: {@link Fence}
|
||||
*/
|
||||
|
@ -1875,6 +1993,12 @@ public interface BlockType extends Keyed, Translatable {
|
|||
* BlockData: {@link Door}
|
||||
*/
|
||||
BlockType.Typed<Door> DARK_OAK_DOOR = getBlockType("dark_oak_door");
|
||||
/**
|
||||
* BlockData: {@link Door}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<Door> PALE_OAK_DOOR = getBlockType("pale_oak_door");
|
||||
/**
|
||||
* BlockData: {@link Door}
|
||||
*/
|
||||
|
@ -3176,12 +3300,27 @@ public interface BlockType extends Keyed, Translatable {
|
|||
BlockType.Typed<BlockData> SPORE_BLOSSOM = getBlockType("spore_blossom");
|
||||
BlockType.Typed<BlockData> AZALEA = getBlockType("azalea");
|
||||
BlockType.Typed<BlockData> FLOWERING_AZALEA = getBlockType("flowering_azalea");
|
||||
BlockType.Typed<BlockData> MOSS_CARPET = getBlockType("moss_carpet");
|
||||
/**
|
||||
* BlockData: {@link PinkPetals}
|
||||
*/
|
||||
BlockType.Typed<PinkPetals> PINK_PETALS = getBlockType("pink_petals");
|
||||
BlockType.Typed<BlockData> MOSS_CARPET = getBlockType("moss_carpet");
|
||||
BlockType.Typed<BlockData> MOSS_BLOCK = getBlockType("moss_block");
|
||||
/**
|
||||
* BlockData: {@link MossyCarpet}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<MossyCarpet> PALE_MOSS_CARPET = getBlockType("pale_moss_carpet");
|
||||
/**
|
||||
* BlockData: {@link HangingMoss}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<HangingMoss> PALE_HANGING_MOSS = getBlockType("pale_hanging_moss");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
BlockType.Typed<BlockData> PALE_MOSS_BLOCK = getBlockType("pale_moss_block");
|
||||
/**
|
||||
* BlockData: {@link BigDripleaf}
|
||||
*/
|
||||
|
|
12
paper-api/src/main/java/org/bukkit/block/CreakingHeart.java
Normal file
12
paper-api/src/main/java/org/bukkit/block/CreakingHeart.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a creaking heart.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface CreakingHeart extends TileState {
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -21,8 +23,10 @@ public interface Lockable {
|
|||
* Gets the key needed to access the container.
|
||||
*
|
||||
* @return the key needed.
|
||||
* @deprecated locks are not necessarily pure strings
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
String getLock();
|
||||
|
||||
/**
|
||||
|
@ -30,6 +34,18 @@ public interface Lockable {
|
|||
* string) to remove key.
|
||||
*
|
||||
* @param key the key required to access the container.
|
||||
* @deprecated locks are not necessarily pure strings
|
||||
*/
|
||||
@Deprecated
|
||||
void setLock(@Nullable String key);
|
||||
|
||||
/**
|
||||
* Sets the key required to access this container. All explicit
|
||||
* modifications to the set key will be required to match on the opening
|
||||
* key. Set to null to remove key.
|
||||
*
|
||||
* @param key the key required to access the container.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
void setLockItem(@Nullable ItemStack key);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.Orientable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 'creaking' is the creaking status of this block.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface CreakingHeart extends Orientable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'creaking' property.
|
||||
*
|
||||
* @return the 'creaking' value
|
||||
*/
|
||||
@NotNull
|
||||
Creaking getCreaking();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'creaking' property.
|
||||
*
|
||||
* @param creaking the new 'creaking' value
|
||||
*/
|
||||
void setCreaking(@NotNull Creaking creaking);
|
||||
|
||||
/**
|
||||
* Creaking status.
|
||||
*/
|
||||
public enum Creaking {
|
||||
|
||||
/**
|
||||
* The block is disabled.
|
||||
*/
|
||||
DISABLED,
|
||||
/**
|
||||
* The block is dormant.
|
||||
*/
|
||||
DORMANT,
|
||||
/**
|
||||
* The block is active.
|
||||
*/
|
||||
ACTIVE;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* 'tip' indicates whether this block is a tip.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface HangingMoss extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'tip' property.
|
||||
*
|
||||
* @return the 'tip' value
|
||||
*/
|
||||
boolean isTip();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'tip' property.
|
||||
*
|
||||
* @param tip the new 'tip' value
|
||||
*/
|
||||
void setTip(boolean tip);
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* This class encompasses the 'north', 'east', 'south', 'west', height flags
|
||||
* which are used to set the height of a face.
|
||||
*
|
||||
* 'bottom' denotes whether this is a bottom block.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface MossyCarpet extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'bottom' property.
|
||||
*
|
||||
* @return the 'bottom' value
|
||||
*/
|
||||
boolean isBottom();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'bottom' property.
|
||||
*
|
||||
* @param bottom the new 'bottom' value
|
||||
*/
|
||||
void setBottom(boolean bottom);
|
||||
|
||||
/**
|
||||
* Gets the height of the specified face.
|
||||
*
|
||||
* @param face to check
|
||||
* @return if face is enabled
|
||||
*/
|
||||
@NotNull
|
||||
Height getHeight(@NotNull BlockFace face);
|
||||
|
||||
/**
|
||||
* Set the height of the specified face.
|
||||
*
|
||||
* @param face to set
|
||||
* @param height the height
|
||||
*/
|
||||
void setHeight(@NotNull BlockFace face, @NotNull Height height);
|
||||
|
||||
/**
|
||||
* The different heights a face may have.
|
||||
*/
|
||||
public enum Height {
|
||||
/**
|
||||
* Not present.
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
* Low face present.
|
||||
*/
|
||||
LOW,
|
||||
/**
|
||||
* Tall face present.
|
||||
*/
|
||||
TALL;
|
||||
}
|
||||
}
|
|
@ -5,7 +5,6 @@ import java.util.Map;
|
|||
import org.bukkit.entity.EntitySnapshot;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.loot.LootTable;
|
||||
import org.bukkit.loot.LootTables;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -128,8 +127,7 @@ public class SpawnerEntry {
|
|||
/**
|
||||
* Set the loot table for the entity.
|
||||
* <br>
|
||||
* To remove a loot table use null. Do not use {@link LootTables#EMPTY}
|
||||
* to clear a LootTable.
|
||||
* To remove a loot table use null.
|
||||
*
|
||||
* @param table this {@link org.bukkit.entity.Mob} will have.
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,7 @@ public interface DamageType extends Keyed, Translatable {
|
|||
public static final DamageType STARVE = getDamageType("starve");
|
||||
public static final DamageType CACTUS = getDamageType("cactus");
|
||||
public static final DamageType FALL = getDamageType("fall");
|
||||
public static final DamageType ENDER_PEARL = getDamageType("ender_pearl");
|
||||
public static final DamageType FLY_INTO_WALL = getDamageType("fly_into_wall");
|
||||
public static final DamageType OUT_OF_WORLD = getDamageType("out_of_world");
|
||||
public static final DamageType GENERIC = getDamageType("generic");
|
||||
|
@ -66,6 +67,7 @@ public interface DamageType extends Keyed, Translatable {
|
|||
public static final DamageType OUTSIDE_BORDER = getDamageType("outside_border");
|
||||
public static final DamageType GENERIC_KILL = getDamageType("generic_kill");
|
||||
public static final DamageType WIND_CHARGE = getDamageType("wind_charge");
|
||||
public static final DamageType MACE_SMASH = getDamageType("mace_smash");
|
||||
|
||||
@NotNull
|
||||
private static DamageType getDamageType(@NotNull String key) {
|
||||
|
|
|
@ -32,7 +32,9 @@ public interface Boat extends Vehicle {
|
|||
* Gets the type of the boat.
|
||||
*
|
||||
* @return the boat type
|
||||
* @deprecated different boats types are now different entity types
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
Type getBoatType();
|
||||
|
||||
|
@ -40,7 +42,9 @@ public interface Boat extends Vehicle {
|
|||
* Sets the type of the boat.
|
||||
*
|
||||
* @param type the new type
|
||||
* @deprecated different boats types are now different entity types
|
||||
*/
|
||||
@Deprecated
|
||||
void setBoatType(@NotNull Type type);
|
||||
|
||||
/**
|
||||
|
@ -134,7 +138,9 @@ public interface Boat extends Vehicle {
|
|||
|
||||
/**
|
||||
* Represents the type of boats.
|
||||
* @deprecated different boats types are now different entity types
|
||||
*/
|
||||
@Deprecated
|
||||
public enum Type {
|
||||
OAK(Material.OAK_PLANKS),
|
||||
SPRUCE(Material.SPRUCE_PLANKS),
|
||||
|
|
13
paper-api/src/main/java/org/bukkit/entity/Creaking.java
Normal file
13
paper-api/src/main/java/org/bukkit/entity/Creaking.java
Normal file
|
@ -0,0 +1,13 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Creaking.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface Creaking extends Monster {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Creaking spawned from a creaking heart which will not persist.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface CreakingTransient extends Creaking {
|
||||
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
public interface Dolphin extends WaterMob { }
|
||||
public interface Dolphin extends Ageable, WaterMob { }
|
||||
|
|
|
@ -7,9 +7,30 @@ import java.util.Map;
|
|||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Translatable;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.boat.AcaciaBoat;
|
||||
import org.bukkit.entity.boat.AcaciaChestBoat;
|
||||
import org.bukkit.entity.boat.BambooChestRaft;
|
||||
import org.bukkit.entity.boat.BambooRaft;
|
||||
import org.bukkit.entity.boat.BirchBoat;
|
||||
import org.bukkit.entity.boat.BirchChestBoat;
|
||||
import org.bukkit.entity.boat.CherryBoat;
|
||||
import org.bukkit.entity.boat.CherryChestBoat;
|
||||
import org.bukkit.entity.boat.DarkOakBoat;
|
||||
import org.bukkit.entity.boat.DarkOakChestBoat;
|
||||
import org.bukkit.entity.boat.JungleBoat;
|
||||
import org.bukkit.entity.boat.JungleChestBoat;
|
||||
import org.bukkit.entity.boat.MangroveBoat;
|
||||
import org.bukkit.entity.boat.MangroveChestBoat;
|
||||
import org.bukkit.entity.boat.OakBoat;
|
||||
import org.bukkit.entity.boat.OakChestBoat;
|
||||
import org.bukkit.entity.boat.PaleOakBoat;
|
||||
import org.bukkit.entity.boat.PaleOakChestBoat;
|
||||
import org.bukkit.entity.boat.SpruceBoat;
|
||||
import org.bukkit.entity.boat.SpruceChestBoat;
|
||||
import org.bukkit.entity.minecart.CommandMinecart;
|
||||
import org.bukkit.entity.minecart.ExplosiveMinecart;
|
||||
import org.bukkit.entity.minecart.HopperMinecart;
|
||||
|
@ -19,6 +40,7 @@ import org.bukkit.entity.minecart.SpawnerMinecart;
|
|||
import org.bukkit.entity.minecart.StorageMinecart;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -181,10 +203,6 @@ public enum EntityType implements Keyed, Translatable {
|
|||
* @see CommandMinecart
|
||||
*/
|
||||
COMMAND_BLOCK_MINECART("command_block_minecart", CommandMinecart.class, 40),
|
||||
/**
|
||||
* A placed boat.
|
||||
*/
|
||||
BOAT("boat", Boat.class, 41),
|
||||
/**
|
||||
* @see RideableMinecart
|
||||
*/
|
||||
|
@ -275,7 +293,6 @@ public enum EntityType implements Keyed, Translatable {
|
|||
GOAT("goat", Goat.class, -1),
|
||||
MARKER("marker", Marker.class, -1),
|
||||
ALLAY("allay", Allay.class, -1),
|
||||
CHEST_BOAT("chest_boat", ChestBoat.class, -1),
|
||||
FROG("frog", Frog.class, -1),
|
||||
TADPOLE("tadpole", Tadpole.class, -1),
|
||||
WARDEN("warden", Warden.class, -1),
|
||||
|
@ -291,6 +308,32 @@ public enum EntityType implements Keyed, Translatable {
|
|||
ARMADILLO("armadillo", Armadillo.class, -1),
|
||||
BOGGED("bogged", Bogged.class, -1),
|
||||
OMINOUS_ITEM_SPAWNER("ominous_item_spawner", OminousItemSpawner.class, -1),
|
||||
ACACIA_BOAT("acacia_boat", AcaciaBoat.class, -1),
|
||||
ACACIA_CHEST_BOAT("acacia_chest_boat", AcaciaChestBoat.class, -1),
|
||||
BAMBOO_RAFT("bamboo_raft", BambooRaft.class, -1),
|
||||
BAMBOO_CHEST_RAFT("bamboo_chest_raft", BambooChestRaft.class, -1),
|
||||
BIRCH_BOAT("birch_boat", BirchBoat.class, -1),
|
||||
BIRCH_CHEST_BOAT("birch_chest_boat", BirchChestBoat.class, -1),
|
||||
CHERRY_BOAT("cherry_boat", CherryBoat.class, -1),
|
||||
CHERRY_CHEST_BOAT("cherry_chest_boat", CherryChestBoat.class, -1),
|
||||
DARK_OAK_BOAT("dark_oak_boat", DarkOakBoat.class, -1),
|
||||
DARK_OAK_CHEST_BOAT("dark_oak_chest_boat", DarkOakChestBoat.class, -1),
|
||||
JUNGLE_BOAT("jungle_boat", JungleBoat.class, -1),
|
||||
JUNGLE_CHEST_BOAT("jungle_chest_boat", JungleChestBoat.class, -1),
|
||||
MANGROVE_BOAT("mangrove_boat", MangroveBoat.class, -1),
|
||||
MANGROVE_CHEST_BOAT("mangrove_chest_boat", MangroveChestBoat.class, -1),
|
||||
OAK_BOAT("oak_boat", OakBoat.class, -1),
|
||||
OAK_CHEST_BOAT("oak_chest_boat", OakChestBoat.class, -1),
|
||||
PALE_OAK_BOAT("pale_oak_boat", PaleOakBoat.class, -1),
|
||||
PALE_OAK_CHEST_BOAT("pale_oak_chest_boat", PaleOakChestBoat.class, -1),
|
||||
SPRUCE_BOAT("spruce_boat", SpruceBoat.class, -1),
|
||||
SPRUCE_CHEST_BOAT("spruce_chest_boat", SpruceChestBoat.class, -1),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
CREAKING("creaking", Creaking.class, -1),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
CREAKING_TRANSIENT("creaking_transient", CreakingTransient.class, -1),
|
||||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
|
|
|
@ -6,14 +6,18 @@ package org.bukkit.entity;
|
|||
public interface Explosive extends Entity {
|
||||
|
||||
/**
|
||||
* Set the radius affected by this explosive's explosion
|
||||
* Set the radius affected by this explosive's explosion.
|
||||
* <br>
|
||||
* This is the base yield, which may be affected by other entity attributes.
|
||||
*
|
||||
* @param yield The explosive yield
|
||||
*/
|
||||
public void setYield(float yield);
|
||||
|
||||
/**
|
||||
* Return the radius or yield of this explosive's explosion
|
||||
* Return the radius or yield of this explosive's explosion.
|
||||
* <br>
|
||||
* This is the base yield, which may be affected by other entity attributes.
|
||||
*
|
||||
* @return the radius of blocks affected
|
||||
*/
|
||||
|
|
|
@ -256,6 +256,37 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
|||
*/
|
||||
public void setCooldown(@NotNull Material material, int ticks);
|
||||
|
||||
/**
|
||||
* Check whether a cooldown is active on the specified item.
|
||||
*
|
||||
* @param item the item to check
|
||||
* @return if a cooldown is active on the item
|
||||
*/
|
||||
public boolean hasCooldown(@NotNull ItemStack item);
|
||||
|
||||
/**
|
||||
* Get the cooldown time in ticks remaining for the specified item.
|
||||
*
|
||||
* @param item the item to check
|
||||
* @return the remaining cooldown time in ticks
|
||||
*/
|
||||
public int getCooldown(@NotNull ItemStack item);
|
||||
|
||||
/**
|
||||
* Set a cooldown on the specified item for a certain amount of ticks.
|
||||
* ticks. 0 ticks will result in the removal of the cooldown.
|
||||
* <p>
|
||||
* Cooldowns are used by the server for items such as ender pearls and
|
||||
* shields to prevent them from being used repeatedly.
|
||||
* <p>
|
||||
* Note that cooldowns will not by themselves stop an item from being used
|
||||
* for attacking.
|
||||
*
|
||||
* @param item the item to set the cooldown for
|
||||
* @param ticks the amount of ticks to set or 0 to remove
|
||||
*/
|
||||
public void setCooldown(@NotNull ItemStack item, int ticks);
|
||||
|
||||
/**
|
||||
* Get the sleep ticks of the player. This value may be capped.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.GameRule;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.util.Vector;
|
||||
|
@ -30,7 +31,9 @@ public interface Minecart extends Vehicle {
|
|||
* velocity.
|
||||
*
|
||||
* @return The max speed
|
||||
* @see GameRule#MINECART_MAX_SPEED
|
||||
*/
|
||||
@Deprecated
|
||||
public double getMaxSpeed();
|
||||
|
||||
/**
|
||||
|
@ -38,7 +41,9 @@ public interface Minecart extends Vehicle {
|
|||
* 0.4D.
|
||||
*
|
||||
* @param speed The max speed
|
||||
* @see GameRule#MINECART_MAX_SPEED
|
||||
*/
|
||||
@Deprecated
|
||||
public void setMaxSpeed(double speed);
|
||||
|
||||
/**
|
||||
|
|
|
@ -106,6 +106,21 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|||
*/
|
||||
public void setPlayerListName(@Nullable String name);
|
||||
|
||||
/**
|
||||
* Gets the relative order that the player is shown on the player list.
|
||||
*
|
||||
* @return the player list order
|
||||
*/
|
||||
public int getPlayerListOrder();
|
||||
|
||||
/**
|
||||
* Sets the relative order that the player is shown on the in-game player
|
||||
* list.
|
||||
*
|
||||
* @param order new player list order, must be positive
|
||||
*/
|
||||
public void setPlayerListOrder(int order);
|
||||
|
||||
/**
|
||||
* Gets the currently displayed player list header for this player.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,43 @@
|
|||
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a salmon fish.
|
||||
*/
|
||||
public interface Salmon extends Fish { }
|
||||
public interface Salmon extends Fish {
|
||||
|
||||
/**
|
||||
* Get the variant of this salmon.
|
||||
*
|
||||
* @return salmon variant
|
||||
*/
|
||||
@NotNull
|
||||
public Variant getVariant();
|
||||
|
||||
/**
|
||||
* Set the variant of this salmon.
|
||||
*
|
||||
* @param variant salmon variant
|
||||
*/
|
||||
public void setVariant(@NotNull Variant variant);
|
||||
|
||||
/**
|
||||
* Represents the variant of a salmon - ie its size.
|
||||
*/
|
||||
public enum Variant {
|
||||
|
||||
/**
|
||||
* Small salmon.
|
||||
*/
|
||||
SMALL,
|
||||
/**
|
||||
* Default salmon.
|
||||
*/
|
||||
MEDIUM,
|
||||
/**
|
||||
* Large salmon.
|
||||
*/
|
||||
LARGE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,4 @@ package org.bukkit.entity;
|
|||
/**
|
||||
* Represents a Squid.
|
||||
*/
|
||||
public interface Squid extends WaterMob {}
|
||||
public interface Squid extends Ageable, WaterMob {}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents an acacia boat.
|
||||
*/
|
||||
public interface AcaciaBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents an acacia chest boat.
|
||||
*/
|
||||
public interface AcaciaChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a bamboo chest raft.
|
||||
*/
|
||||
public interface BambooChestRaft extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a bamboo raft.
|
||||
*/
|
||||
public interface BambooRaft extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a birch boat.
|
||||
*/
|
||||
public interface BirchBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a birch chest boat.
|
||||
*/
|
||||
public interface BirchChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a cherry boat.
|
||||
*/
|
||||
public interface CherryBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a cherry chest boat.
|
||||
*/
|
||||
public interface CherryChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a dark oak boat.
|
||||
*/
|
||||
public interface DarkOakBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a dark oak chest boat.
|
||||
*/
|
||||
public interface DarkOakChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a jungle boat.
|
||||
*/
|
||||
public interface JungleBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a jungle chest boat.
|
||||
*/
|
||||
public interface JungleChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a mangrove boat.
|
||||
*/
|
||||
public interface MangroveBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a mangrove chest boat.
|
||||
*/
|
||||
public interface MangroveChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents an oak boat.
|
||||
*/
|
||||
public interface OakBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents an oak chest boat.
|
||||
*/
|
||||
public interface OakChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents an pale oak boat.
|
||||
*/
|
||||
public interface PaleOakBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents an pale oak chest boat.
|
||||
*/
|
||||
public interface PaleOakChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a spruce boat.
|
||||
*/
|
||||
public interface SpruceBoat extends Boat {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a spruce chest boat.
|
||||
*/
|
||||
public interface SpruceChestBoat extends ChestBoat {
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* Interfaces for various {@link org.bukkit.entity.Boat} types.
|
||||
*/
|
||||
package org.bukkit.entity.boat;
|
|
@ -1,11 +1,12 @@
|
|||
package org.bukkit.entity.minecart;
|
||||
|
||||
import org.bukkit.entity.Explosive;
|
||||
import org.bukkit.entity.Minecart;
|
||||
|
||||
/**
|
||||
* Represents a Minecart with TNT inside it that can explode when triggered.
|
||||
*/
|
||||
public interface ExplosiveMinecart extends Minecart {
|
||||
public interface ExplosiveMinecart extends Minecart, Explosive {
|
||||
|
||||
/**
|
||||
* Set the fuse ticks of this minecart.
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.google.common.collect.Multimap;
|
|||
import java.util.function.Consumer;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Registry;
|
||||
import org.bukkit.Translatable;
|
||||
|
@ -135,6 +136,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_PLANKS = getItemType("acacia_planks");
|
||||
ItemType.Typed<ItemMeta> CHERRY_PLANKS = getItemType("cherry_planks");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_PLANKS = getItemType("dark_oak_planks");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_PLANKS = getItemType("pale_oak_planks");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_PLANKS = getItemType("mangrove_planks");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_PLANKS = getItemType("bamboo_planks");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_PLANKS = getItemType("crimson_planks");
|
||||
|
@ -147,6 +151,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_SAPLING = getItemType("acacia_sapling");
|
||||
ItemType.Typed<ItemMeta> CHERRY_SAPLING = getItemType("cherry_sapling");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_SAPLING = getItemType("dark_oak_sapling");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_SAPLING = getItemType("pale_oak_sapling");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_PROPAGULE = getItemType("mangrove_propagule");
|
||||
ItemType.Typed<ItemMeta> BEDROCK = getItemType("bedrock");
|
||||
ItemType.Typed<ItemMeta> SAND = getItemType("sand");
|
||||
|
@ -237,6 +244,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_LOG = getItemType("acacia_log");
|
||||
ItemType.Typed<ItemMeta> CHERRY_LOG = getItemType("cherry_log");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_LOG = getItemType("dark_oak_log");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_LOG = getItemType("pale_oak_log");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_LOG = getItemType("mangrove_log");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_ROOTS = getItemType("mangrove_roots");
|
||||
ItemType.Typed<ItemMeta> MUDDY_MANGROVE_ROOTS = getItemType("muddy_mangrove_roots");
|
||||
|
@ -250,6 +260,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> STRIPPED_ACACIA_LOG = getItemType("stripped_acacia_log");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_CHERRY_LOG = getItemType("stripped_cherry_log");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_DARK_OAK_LOG = getItemType("stripped_dark_oak_log");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> STRIPPED_PALE_OAK_LOG = getItemType("stripped_pale_oak_log");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_MANGROVE_LOG = getItemType("stripped_mangrove_log");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_CRIMSON_STEM = getItemType("stripped_crimson_stem");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_WARPED_STEM = getItemType("stripped_warped_stem");
|
||||
|
@ -260,6 +273,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> STRIPPED_ACACIA_WOOD = getItemType("stripped_acacia_wood");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_CHERRY_WOOD = getItemType("stripped_cherry_wood");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_DARK_OAK_WOOD = getItemType("stripped_dark_oak_wood");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> STRIPPED_PALE_OAK_WOOD = getItemType("stripped_pale_oak_wood");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_MANGROVE_WOOD = getItemType("stripped_mangrove_wood");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_CRIMSON_HYPHAE = getItemType("stripped_crimson_hyphae");
|
||||
ItemType.Typed<ItemMeta> STRIPPED_WARPED_HYPHAE = getItemType("stripped_warped_hyphae");
|
||||
|
@ -271,6 +287,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_WOOD = getItemType("acacia_wood");
|
||||
ItemType.Typed<ItemMeta> CHERRY_WOOD = getItemType("cherry_wood");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_WOOD = getItemType("dark_oak_wood");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_WOOD = getItemType("pale_oak_wood");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_WOOD = getItemType("mangrove_wood");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_HYPHAE = getItemType("crimson_hyphae");
|
||||
ItemType.Typed<ItemMeta> WARPED_HYPHAE = getItemType("warped_hyphae");
|
||||
|
@ -281,6 +300,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_LEAVES = getItemType("acacia_leaves");
|
||||
ItemType.Typed<ItemMeta> CHERRY_LEAVES = getItemType("cherry_leaves");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_LEAVES = getItemType("dark_oak_leaves");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_LEAVES = getItemType("pale_oak_leaves");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_LEAVES = getItemType("mangrove_leaves");
|
||||
ItemType.Typed<ItemMeta> AZALEA_LEAVES = getItemType("azalea_leaves");
|
||||
ItemType.Typed<ItemMeta> FLOWERING_AZALEA_LEAVES = getItemType("flowering_azalea_leaves");
|
||||
|
@ -343,9 +365,18 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> TWISTING_VINES = getItemType("twisting_vines");
|
||||
ItemType.Typed<ItemMeta> SUGAR_CANE = getItemType("sugar_cane");
|
||||
ItemType.Typed<ItemMeta> KELP = getItemType("kelp");
|
||||
ItemType.Typed<ItemMeta> MOSS_CARPET = getItemType("moss_carpet");
|
||||
ItemType.Typed<ItemMeta> PINK_PETALS = getItemType("pink_petals");
|
||||
ItemType.Typed<ItemMeta> MOSS_CARPET = getItemType("moss_carpet");
|
||||
ItemType.Typed<ItemMeta> MOSS_BLOCK = getItemType("moss_block");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_MOSS_CARPET = getItemType("pale_moss_carpet");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_HANGING_MOSS = getItemType("pale_hanging_moss");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_MOSS_BLOCK = getItemType("pale_moss_block");
|
||||
ItemType.Typed<ItemMeta> HANGING_ROOTS = getItemType("hanging_roots");
|
||||
ItemType.Typed<ItemMeta> BIG_DRIPLEAF = getItemType("big_dripleaf");
|
||||
ItemType.Typed<ItemMeta> SMALL_DRIPLEAF = getItemType("small_dripleaf");
|
||||
|
@ -357,6 +388,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_SLAB = getItemType("acacia_slab");
|
||||
ItemType.Typed<ItemMeta> CHERRY_SLAB = getItemType("cherry_slab");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_SLAB = getItemType("dark_oak_slab");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_SLAB = getItemType("pale_oak_slab");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_SLAB = getItemType("mangrove_slab");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_SLAB = getItemType("bamboo_slab");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_MOSAIC_SLAB = getItemType("bamboo_mosaic_slab");
|
||||
|
@ -406,6 +440,12 @@ public interface ItemType extends Keyed, Translatable {
|
|||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
ItemType.Typed<BlockStateMeta> SPAWNER = getItemType("spawner");
|
||||
/**
|
||||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<BlockStateMeta> CREAKING_HEART = getItemType("creaking_heart");
|
||||
/**
|
||||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
|
@ -434,6 +474,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_FENCE = getItemType("acacia_fence");
|
||||
ItemType.Typed<ItemMeta> CHERRY_FENCE = getItemType("cherry_fence");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_FENCE = getItemType("dark_oak_fence");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_FENCE = getItemType("pale_oak_fence");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_FENCE = getItemType("mangrove_fence");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_FENCE = getItemType("bamboo_fence");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_FENCE = getItemType("crimson_fence");
|
||||
|
@ -518,6 +561,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_STAIRS = getItemType("acacia_stairs");
|
||||
ItemType.Typed<ItemMeta> CHERRY_STAIRS = getItemType("cherry_stairs");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_STAIRS = getItemType("dark_oak_stairs");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_STAIRS = getItemType("pale_oak_stairs");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_STAIRS = getItemType("mangrove_stairs");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_STAIRS = getItemType("bamboo_stairs");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_MOSAIC_STAIRS = getItemType("bamboo_mosaic_stairs");
|
||||
|
@ -909,6 +955,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_BUTTON = getItemType("acacia_button");
|
||||
ItemType.Typed<ItemMeta> CHERRY_BUTTON = getItemType("cherry_button");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_BUTTON = getItemType("dark_oak_button");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_BUTTON = getItemType("pale_oak_button");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_BUTTON = getItemType("mangrove_button");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_BUTTON = getItemType("bamboo_button");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_BUTTON = getItemType("crimson_button");
|
||||
|
@ -924,6 +973,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_PRESSURE_PLATE = getItemType("acacia_pressure_plate");
|
||||
ItemType.Typed<ItemMeta> CHERRY_PRESSURE_PLATE = getItemType("cherry_pressure_plate");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_PRESSURE_PLATE = getItemType("dark_oak_pressure_plate");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_PRESSURE_PLATE = getItemType("pale_oak_pressure_plate");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_PRESSURE_PLATE = getItemType("mangrove_pressure_plate");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_PRESSURE_PLATE = getItemType("bamboo_pressure_plate");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_PRESSURE_PLATE = getItemType("crimson_pressure_plate");
|
||||
|
@ -936,6 +988,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_DOOR = getItemType("acacia_door");
|
||||
ItemType.Typed<ItemMeta> CHERRY_DOOR = getItemType("cherry_door");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_DOOR = getItemType("dark_oak_door");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_DOOR = getItemType("pale_oak_door");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_DOOR = getItemType("mangrove_door");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_DOOR = getItemType("bamboo_door");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_DOOR = getItemType("crimson_door");
|
||||
|
@ -956,6 +1011,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_TRAPDOOR = getItemType("acacia_trapdoor");
|
||||
ItemType.Typed<ItemMeta> CHERRY_TRAPDOOR = getItemType("cherry_trapdoor");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_TRAPDOOR = getItemType("dark_oak_trapdoor");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_TRAPDOOR = getItemType("pale_oak_trapdoor");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_TRAPDOOR = getItemType("mangrove_trapdoor");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_TRAPDOOR = getItemType("bamboo_trapdoor");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_TRAPDOOR = getItemType("crimson_trapdoor");
|
||||
|
@ -975,6 +1033,9 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> ACACIA_FENCE_GATE = getItemType("acacia_fence_gate");
|
||||
ItemType.Typed<ItemMeta> CHERRY_FENCE_GATE = getItemType("cherry_fence_gate");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_FENCE_GATE = getItemType("dark_oak_fence_gate");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_FENCE_GATE = getItemType("pale_oak_fence_gate");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_FENCE_GATE = getItemType("mangrove_fence_gate");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_FENCE_GATE = getItemType("bamboo_fence_gate");
|
||||
ItemType.Typed<ItemMeta> CRIMSON_FENCE_GATE = getItemType("crimson_fence_gate");
|
||||
|
@ -991,6 +1052,7 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> HOPPER_MINECART = getItemType("hopper_minecart");
|
||||
ItemType.Typed<ItemMeta> CARROT_ON_A_STICK = getItemType("carrot_on_a_stick");
|
||||
ItemType.Typed<ItemMeta> WARPED_FUNGUS_ON_A_STICK = getItemType("warped_fungus_on_a_stick");
|
||||
ItemType.Typed<ItemMeta> PHANTOM_MEMBRANE = getItemType("phantom_membrane");
|
||||
ItemType.Typed<ItemMeta> ELYTRA = getItemType("elytra");
|
||||
ItemType.Typed<ItemMeta> OAK_BOAT = getItemType("oak_boat");
|
||||
ItemType.Typed<ItemMeta> OAK_CHEST_BOAT = getItemType("oak_chest_boat");
|
||||
|
@ -1006,6 +1068,12 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> CHERRY_CHEST_BOAT = getItemType("cherry_chest_boat");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_BOAT = getItemType("dark_oak_boat");
|
||||
ItemType.Typed<ItemMeta> DARK_OAK_CHEST_BOAT = getItemType("dark_oak_chest_boat");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_BOAT = getItemType("pale_oak_boat");
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<ItemMeta> PALE_OAK_CHEST_BOAT = getItemType("pale_oak_chest_boat");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_BOAT = getItemType("mangrove_boat");
|
||||
ItemType.Typed<ItemMeta> MANGROVE_CHEST_BOAT = getItemType("mangrove_chest_boat");
|
||||
ItemType.Typed<ItemMeta> BAMBOO_RAFT = getItemType("bamboo_raft");
|
||||
|
@ -1216,6 +1284,12 @@ public interface ItemType extends Keyed, Translatable {
|
|||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
ItemType.Typed<BlockStateMeta> DARK_OAK_SIGN = getItemType("dark_oak_sign");
|
||||
/**
|
||||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<BlockStateMeta> PALE_OAK_SIGN = getItemType("pale_oak_sign");
|
||||
/**
|
||||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
|
@ -1260,6 +1334,12 @@ public interface ItemType extends Keyed, Translatable {
|
|||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
ItemType.Typed<BlockStateMeta> DARK_OAK_HANGING_SIGN = getItemType("dark_oak_hanging_sign");
|
||||
/**
|
||||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<BlockStateMeta> PALE_OAK_HANGING_SIGN = getItemType("pale_oak_hanging_sign");
|
||||
/**
|
||||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
|
@ -1311,6 +1391,70 @@ public interface ItemType extends Keyed, Translatable {
|
|||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> BUNDLE = getItemType("bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> WHITE_BUNDLE = getItemType("white_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> ORANGE_BUNDLE = getItemType("orange_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> MAGENTA_BUNDLE = getItemType("magenta_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> LIGHT_BLUE_BUNDLE = getItemType("light_blue_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> YELLOW_BUNDLE = getItemType("yellow_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> LIME_BUNDLE = getItemType("lime_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> PINK_BUNDLE = getItemType("pink_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> GRAY_BUNDLE = getItemType("gray_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> LIGHT_GRAY_BUNDLE = getItemType("light_gray_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> CYAN_BUNDLE = getItemType("cyan_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> PURPLE_BUNDLE = getItemType("purple_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> BLUE_BUNDLE = getItemType("blue_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> BROWN_BUNDLE = getItemType("brown_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> GREEN_BUNDLE = getItemType("green_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> RED_BUNDLE = getItemType("red_bundle");
|
||||
/**
|
||||
* ItemMeta: {@link BundleMeta}
|
||||
*/
|
||||
ItemType.Typed<BundleMeta> BLACK_BUNDLE = getItemType("black_bundle");
|
||||
ItemType.Typed<ItemMeta> FISHING_ROD = getItemType("fishing_rod");
|
||||
ItemType.Typed<ItemMeta> CLOCK = getItemType("clock");
|
||||
ItemType.Typed<ItemMeta> SPYGLASS = getItemType("spyglass");
|
||||
|
@ -1384,11 +1528,11 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> GHAST_TEAR = getItemType("ghast_tear");
|
||||
ItemType.Typed<ItemMeta> GOLD_NUGGET = getItemType("gold_nugget");
|
||||
ItemType.Typed<ItemMeta> NETHER_WART = getItemType("nether_wart");
|
||||
ItemType.Typed<ItemMeta> GLASS_BOTTLE = getItemType("glass_bottle");
|
||||
/**
|
||||
* ItemMeta: {@link PotionMeta}
|
||||
*/
|
||||
ItemType.Typed<PotionMeta> POTION = getItemType("potion");
|
||||
ItemType.Typed<ItemMeta> GLASS_BOTTLE = getItemType("glass_bottle");
|
||||
ItemType.Typed<ItemMeta> SPIDER_EYE = getItemType("spider_eye");
|
||||
ItemType.Typed<ItemMeta> FERMENTED_SPIDER_EYE = getItemType("fermented_spider_eye");
|
||||
ItemType.Typed<ItemMeta> BLAZE_POWDER = getItemType("blaze_powder");
|
||||
|
@ -1456,6 +1600,12 @@ public interface ItemType extends Keyed, Translatable {
|
|||
* ItemMeta: {@link SpawnEggMeta}
|
||||
*/
|
||||
ItemType.Typed<SpawnEggMeta> COW_SPAWN_EGG = getItemType("cow_spawn_egg");
|
||||
/**
|
||||
* ItemMeta: {@link SpawnEggMeta}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
ItemType.Typed<SpawnEggMeta> CREAKING_SPAWN_EGG = getItemType("creaking_spawn_egg");
|
||||
/**
|
||||
* ItemMeta: {@link SpawnEggMeta}
|
||||
*/
|
||||
|
@ -1731,6 +1881,7 @@ public interface ItemType extends Keyed, Translatable {
|
|||
* ItemMeta: {@link BookMeta}
|
||||
*/
|
||||
ItemType.Typed<BookMeta> WRITTEN_BOOK = getItemType("written_book");
|
||||
ItemType.Typed<ItemMeta> BREEZE_ROD = getItemType("breeze_rod");
|
||||
ItemType.Typed<ItemMeta> MACE = getItemType("mace");
|
||||
ItemType.Typed<ItemMeta> ITEM_FRAME = getItemType("item_frame");
|
||||
ItemType.Typed<ItemMeta> GLOW_ITEM_FRAME = getItemType("glow_item_frame");
|
||||
|
@ -1923,7 +2074,6 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> MUSIC_DISC_PRECIPICE = getItemType("music_disc_precipice");
|
||||
ItemType.Typed<ItemMeta> DISC_FRAGMENT_5 = getItemType("disc_fragment_5");
|
||||
ItemType.Typed<ItemMeta> TRIDENT = getItemType("trident");
|
||||
ItemType.Typed<ItemMeta> PHANTOM_MEMBRANE = getItemType("phantom_membrane");
|
||||
ItemType.Typed<ItemMeta> NAUTILUS_SHELL = getItemType("nautilus_shell");
|
||||
ItemType.Typed<ItemMeta> HEART_OF_THE_SEA = getItemType("heart_of_the_sea");
|
||||
/**
|
||||
|
@ -1943,6 +2093,8 @@ public interface ItemType extends Keyed, Translatable {
|
|||
ItemType.Typed<ItemMeta> PIGLIN_BANNER_PATTERN = getItemType("piglin_banner_pattern");
|
||||
ItemType.Typed<ItemMeta> FLOW_BANNER_PATTERN = getItemType("flow_banner_pattern");
|
||||
ItemType.Typed<ItemMeta> GUSTER_BANNER_PATTERN = getItemType("guster_banner_pattern");
|
||||
ItemType.Typed<ItemMeta> FIELD_MASONED_BANNER_PATTERN = getItemType("field_masoned_banner_pattern");
|
||||
ItemType.Typed<ItemMeta> BORDURE_INDENTED_BANNER_PATTERN = getItemType("bordure_indented_banner_pattern");
|
||||
/**
|
||||
* ItemMeta: {@link MusicInstrumentMeta}
|
||||
*/
|
||||
|
@ -2108,7 +2260,6 @@ public interface ItemType extends Keyed, Translatable {
|
|||
* ItemMeta: {@link OminousBottleMeta}
|
||||
*/
|
||||
ItemType.Typed<OminousBottleMeta> OMINOUS_BOTTLE = getItemType("ominous_bottle");
|
||||
ItemType.Typed<ItemMeta> BREEZE_ROD = getItemType("breeze_rod");
|
||||
//</editor-fold>
|
||||
|
||||
@NotNull
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
package org.bukkit.inventory;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a recipe which will change the type of the input material when
|
||||
* combined with an additional material, but preserve all custom data. Only the
|
||||
* item type of the result stack will be used.
|
||||
* <br>
|
||||
* Used for dyeing shulker boxes in Vanilla.
|
||||
*/
|
||||
public class TransmuteRecipe extends CraftingRecipe implements ComplexRecipe {
|
||||
|
||||
private final RecipeChoice input;
|
||||
private final RecipeChoice material;
|
||||
|
||||
/**
|
||||
* Create a transmute recipe to produce a result of the specified type.
|
||||
*
|
||||
* @param key the unique recipe key
|
||||
* @param result the transmuted result material
|
||||
* @param input the input ingredient
|
||||
* @param material the additional ingredient
|
||||
*/
|
||||
public TransmuteRecipe(@NotNull NamespacedKey key, @NotNull Material result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) {
|
||||
super(key, checkResult(new ItemStack(result)));
|
||||
this.input = input;
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the input material, which will be transmuted.
|
||||
*
|
||||
* @return the input from transmutation
|
||||
*/
|
||||
@NotNull
|
||||
public RecipeChoice getInput() {
|
||||
return input.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the additional material required to cause the transmutation.
|
||||
*
|
||||
* @return the ingredient material
|
||||
*/
|
||||
@NotNull
|
||||
public RecipeChoice getMaterial() {
|
||||
return material.clone();
|
||||
}
|
||||
}
|
|
@ -5,19 +5,26 @@ import java.util.Collection;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.damage.DamageType;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemFactory;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemRarity;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.components.EquippableComponent;
|
||||
import org.bukkit.inventory.meta.components.FoodComponent;
|
||||
import org.bukkit.inventory.meta.components.JukeboxPlayableComponent;
|
||||
import org.bukkit.inventory.meta.components.ToolComponent;
|
||||
import org.bukkit.inventory.meta.components.UseCooldownComponent;
|
||||
import org.bukkit.inventory.meta.tags.CustomItemTagContainer;
|
||||
import org.bukkit.persistence.PersistentDataHolder;
|
||||
import org.bukkit.tag.DamageTypeTags;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -179,6 +186,27 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
|||
*/
|
||||
void setCustomModelData(@Nullable Integer data);
|
||||
|
||||
/**
|
||||
* Gets if the enchantable component is set.
|
||||
*
|
||||
* @return if an enchantable is set.
|
||||
*/
|
||||
boolean hasEnchantable();
|
||||
|
||||
/**
|
||||
* Gets the enchantable component. Higher values allow higher enchantments.
|
||||
*
|
||||
* @return max_stack_size
|
||||
*/
|
||||
int getEnchantable();
|
||||
|
||||
/**
|
||||
* Sets the enchantable. Higher values allow higher enchantments.
|
||||
*
|
||||
* @param enchantable enchantable value
|
||||
*/
|
||||
void setEnchantable(@Nullable Integer enchantable);
|
||||
|
||||
/**
|
||||
* Checks for the existence of any enchantments.
|
||||
*
|
||||
|
@ -292,6 +320,50 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
|||
*/
|
||||
void setHideTooltip(boolean hideTooltip);
|
||||
|
||||
/**
|
||||
* Gets if this item has a custom tooltip style.
|
||||
*
|
||||
* @return if a tooltip_style is set
|
||||
*/
|
||||
boolean hasTooltipStyle();
|
||||
|
||||
/**
|
||||
* Gets the custom tooltip style.
|
||||
*
|
||||
* @return the tooltip style
|
||||
*/
|
||||
@Nullable
|
||||
NamespacedKey getTooltipStyle();
|
||||
|
||||
/**
|
||||
* Sets the custom tooltip style.
|
||||
*
|
||||
* @param tooltipStyle the new style
|
||||
*/
|
||||
void setTooltipStyle(@Nullable NamespacedKey tooltipStyle);
|
||||
|
||||
/**
|
||||
* Gets if this item has a custom item model.
|
||||
*
|
||||
* @return if a item_model is set
|
||||
*/
|
||||
boolean hasItemModel();
|
||||
|
||||
/**
|
||||
* Gets the custom item model.
|
||||
*
|
||||
* @return the item model
|
||||
*/
|
||||
@Nullable
|
||||
NamespacedKey getItemModel();
|
||||
|
||||
/**
|
||||
* Sets the custom item model.
|
||||
*
|
||||
* @param itemModel the new model
|
||||
*/
|
||||
void setItemModel(@Nullable NamespacedKey itemModel);
|
||||
|
||||
/**
|
||||
* Return if the unbreakable tag is true. An unbreakable item will not lose
|
||||
* durability.
|
||||
|
@ -336,12 +408,31 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
|||
*/
|
||||
void setEnchantmentGlintOverride(@Nullable Boolean override);
|
||||
|
||||
/**
|
||||
* Checks if this item is a glider. If true, this item will allow players to
|
||||
* glide when it is equipped.
|
||||
*
|
||||
* @return glider
|
||||
*/
|
||||
boolean isGlider();
|
||||
|
||||
/**
|
||||
* Sets if this item is a glider. If true, this item will allow players to
|
||||
* glide when it is equipped.
|
||||
*
|
||||
* @param glider glider
|
||||
*/
|
||||
void setGlider(boolean glider);
|
||||
|
||||
/**
|
||||
* Checks if this item is fire_resistant. If true, it will not burn in fire
|
||||
* or lava.
|
||||
*
|
||||
* @return fire_resistant
|
||||
* @deprecated use {@link #getDamageResistant()} and
|
||||
* {@link DamageTypeTags#IS_FIRE}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFireResistant();
|
||||
|
||||
/**
|
||||
|
@ -349,9 +440,39 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
|||
* or lava.
|
||||
*
|
||||
* @param fireResistant fire_resistant
|
||||
* @deprecated use {@link #setDamageResistant(org.bukkit.Tag)} and
|
||||
* {@link DamageTypeTags#IS_FIRE}
|
||||
*/
|
||||
@Deprecated
|
||||
void setFireResistant(boolean fireResistant);
|
||||
|
||||
/**
|
||||
* Gets if this item is resistant to certain types of damage.
|
||||
*
|
||||
* @return true if a resistance is set
|
||||
*/
|
||||
boolean hasDamageResistant();
|
||||
|
||||
/**
|
||||
* Gets the type of damage this item will be resistant to when in entity
|
||||
* form.
|
||||
*
|
||||
* Plugins should check {@link #hasDamageResistant()} before calling this
|
||||
* method.
|
||||
*
|
||||
* @return damage type
|
||||
*/
|
||||
@Nullable
|
||||
Tag<DamageType> getDamageResistant();
|
||||
|
||||
/**
|
||||
* Sets the type of damage this item will be resistant to when in entity
|
||||
* form.
|
||||
*
|
||||
* @param tag the tag, or null to clear
|
||||
*/
|
||||
void setDamageResistant(@Nullable Tag<DamageType> tag);
|
||||
|
||||
/**
|
||||
* Gets if the max_stack_size is set.
|
||||
*
|
||||
|
@ -399,6 +520,61 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
|||
*/
|
||||
void setRarity(@Nullable ItemRarity rarity);
|
||||
|
||||
/**
|
||||
* Checks if the use remainder is set.
|
||||
*
|
||||
* @return if a use remainder item is set
|
||||
*/
|
||||
boolean hasUseRemainder();
|
||||
|
||||
/**
|
||||
* Gets the item which this item will convert to when used.
|
||||
* <p>
|
||||
* The returned component is a snapshot of its current state and does not
|
||||
* reflect a live view of what is on an item. After changing any value on
|
||||
* this component, it must be set with {@link #setUseRemainder(ItemStack)}
|
||||
* to apply the changes.
|
||||
*
|
||||
* @return remainder
|
||||
*/
|
||||
@Nullable
|
||||
ItemStack getUseRemainder();
|
||||
|
||||
/**
|
||||
* Sets the item which this item will convert to when used.
|
||||
*
|
||||
* @param remainder new item
|
||||
*/
|
||||
void setUseRemainder(@Nullable ItemStack remainder);
|
||||
|
||||
/**
|
||||
* Checks if the use cooldown is set.
|
||||
*
|
||||
* @return if a use cooldown is set
|
||||
*/
|
||||
boolean hasUseCooldown();
|
||||
|
||||
/**
|
||||
* Gets the use cooldown set on this item, or creates an empty cooldown
|
||||
* instance.
|
||||
* <p>
|
||||
* The returned component is a snapshot of its current state and does not
|
||||
* reflect a live view of what is on an item. After changing any value on
|
||||
* this component, it must be set with
|
||||
* {@link #setUseCooldown(UseCooldownComponent)} to apply the changes.
|
||||
*
|
||||
* @return cooldown
|
||||
*/
|
||||
@NotNull
|
||||
UseCooldownComponent getUseCooldown();
|
||||
|
||||
/**
|
||||
* Sets the item use cooldown.
|
||||
*
|
||||
* @param cooldown new cooldown
|
||||
*/
|
||||
void setUseCooldown(@Nullable UseCooldownComponent cooldown);
|
||||
|
||||
/**
|
||||
* Checks if the food is set.
|
||||
*
|
||||
|
@ -453,6 +629,34 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
|||
*/
|
||||
void setTool(@Nullable ToolComponent tool);
|
||||
|
||||
/**
|
||||
* Checks if the equippable is set.
|
||||
*
|
||||
* @return if a equippable is set
|
||||
*/
|
||||
boolean hasEquippable();
|
||||
|
||||
/**
|
||||
* Gets the equippable set on this item, or creates an empty equippable
|
||||
* instance.
|
||||
* <p>
|
||||
* The returned component is a snapshot of its current state and does not
|
||||
* reflect a live view of what is on an item. After changing any value on
|
||||
* this component, it must be set with
|
||||
* {@link #setEquippable(EquippableComponent)} to apply the changes.
|
||||
*
|
||||
* @return equippable
|
||||
*/
|
||||
@NotNull
|
||||
EquippableComponent getEquippable();
|
||||
|
||||
/**
|
||||
* Sets the equippable tool.
|
||||
*
|
||||
* @param equippable new equippable
|
||||
*/
|
||||
void setEquippable(@Nullable EquippableComponent equippable);
|
||||
|
||||
/**
|
||||
* Checks if the jukebox playable is set.
|
||||
*
|
||||
|
|
|
@ -146,6 +146,31 @@ public interface PotionMeta extends ItemMeta {
|
|||
*/
|
||||
void setColor(@Nullable Color color);
|
||||
|
||||
/**
|
||||
* Checks for existence of a custom potion name translation suffix.
|
||||
*
|
||||
* @return true if this has a custom potion name
|
||||
*/
|
||||
boolean hasCustomName();
|
||||
|
||||
/**
|
||||
* Gets the potion name translation suffix that is set.
|
||||
* <p>
|
||||
* Plugins should check that hasCustomName() returns <code>true</code>
|
||||
* before calling this method.
|
||||
*
|
||||
* @return the potion name that is set
|
||||
*/
|
||||
@Nullable
|
||||
String getCustomName();
|
||||
|
||||
/**
|
||||
* Sets the potion name translation suffix.
|
||||
*
|
||||
* @param name the name to set
|
||||
*/
|
||||
void setCustomName(@Nullable String name);
|
||||
|
||||
@Override
|
||||
PotionMeta clone();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,153 @@
|
|||
package org.bukkit.inventory.meta.components;
|
||||
|
||||
import java.util.Collection;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a component which can turn any item into equippable armor.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface EquippableComponent extends ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Gets the slot the item can be equipped to.
|
||||
*
|
||||
* @return slot
|
||||
*/
|
||||
@NotNull
|
||||
EquipmentSlot getSlot();
|
||||
|
||||
/**
|
||||
* Sets the slot the item can be equipped to.
|
||||
*
|
||||
* @param slot new slot
|
||||
*/
|
||||
void setSlot(@NotNull EquipmentSlot slot);
|
||||
|
||||
/**
|
||||
* Gets the sound to play when the item is equipped.
|
||||
*
|
||||
* @return the sound
|
||||
*/
|
||||
@Nullable
|
||||
Sound getEquipSound();
|
||||
|
||||
/**
|
||||
* Sets the sound to play when the item is equipped.
|
||||
*
|
||||
* @param sound sound or null for current default
|
||||
*/
|
||||
void setEquipSound(@Nullable Sound sound);
|
||||
|
||||
/**
|
||||
* Gets the key of the model to use when equipped.
|
||||
*
|
||||
* @return model key
|
||||
*/
|
||||
@Nullable
|
||||
NamespacedKey getModel();
|
||||
|
||||
/**
|
||||
* Sets the key of the model to use when equipped.
|
||||
*
|
||||
* @param key model key
|
||||
*/
|
||||
void setModel(@Nullable NamespacedKey key);
|
||||
|
||||
/**
|
||||
* Gets the key of the camera overlay to use when equipped.
|
||||
*
|
||||
* @return camera overlay key
|
||||
*/
|
||||
@Nullable
|
||||
NamespacedKey getCameraOverlay();
|
||||
|
||||
/**
|
||||
* Sets the key of the camera overlay to use when equipped.
|
||||
*
|
||||
* @param key camera overlay key
|
||||
*/
|
||||
void setCameraOverlay(@Nullable NamespacedKey key);
|
||||
|
||||
/**
|
||||
* Gets the entities which can equip this item.
|
||||
*
|
||||
* @return the entities
|
||||
*/
|
||||
@Nullable
|
||||
Collection<EntityType> getAllowedEntities();
|
||||
|
||||
/**
|
||||
* Sets the entities which can equip this item.
|
||||
*
|
||||
* @param entities the entity types
|
||||
*/
|
||||
void setAllowedEntities(@Nullable EntityType entities);
|
||||
|
||||
/**
|
||||
* Sets the entities which can equip this item.
|
||||
*
|
||||
* @param entities the entity types
|
||||
*/
|
||||
void setAllowedEntities(@Nullable Collection<EntityType> entities);
|
||||
|
||||
/**
|
||||
* Set the entity types (represented as an entity {@link Tag}) which can
|
||||
* equip this item.
|
||||
*
|
||||
* @param tag the entity tag
|
||||
* @throws IllegalArgumentException if the passed {@code tag} is not an entity
|
||||
* tag
|
||||
*/
|
||||
void setAllowedEntities(@Nullable Tag<EntityType> tag);
|
||||
|
||||
/**
|
||||
* Gets whether the item can be equipped by a dispenser.
|
||||
*
|
||||
* @return equippable status
|
||||
*/
|
||||
boolean isDispensable();
|
||||
|
||||
/**
|
||||
* Sets whether the item can be equipped by a dispenser.
|
||||
*
|
||||
* @param dispensable new equippable status
|
||||
*/
|
||||
void setDispensable(boolean dispensable);
|
||||
|
||||
/**
|
||||
* Gets if the item is swappable by right clicking.
|
||||
*
|
||||
* @return swappable status
|
||||
*/
|
||||
boolean isSwappable();
|
||||
|
||||
/**
|
||||
* Sets if the item is swappable by right clicking.
|
||||
*
|
||||
* @param swappable new status
|
||||
*/
|
||||
void setSwappable(boolean swappable);
|
||||
|
||||
/**
|
||||
* Gets if the item will be damaged when the wearing entity is damaged.
|
||||
*
|
||||
* @return whether the item will be damaged
|
||||
*/
|
||||
boolean isDamageOnHurt();
|
||||
|
||||
/**
|
||||
* Sets if the item will be damaged when the wearing entity is damaged.
|
||||
*
|
||||
* @param damage whether the item will be damaged
|
||||
*/
|
||||
void setDamageOnHurt(boolean damage);
|
||||
}
|
|
@ -1,12 +1,7 @@
|
|||
package org.bukkit.inventory.meta.components;
|
||||
|
||||
import java.util.List;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a component which can turn any item into food.
|
||||
|
@ -55,93 +50,4 @@ public interface FoodComponent extends ConfigurationSerializable {
|
|||
* @param canAlwaysEat whether always edible
|
||||
*/
|
||||
void setCanAlwaysEat(boolean canAlwaysEat);
|
||||
|
||||
/**
|
||||
* Gets the time in seconds it will take for this item to be eaten.
|
||||
*
|
||||
* @return eat time
|
||||
*/
|
||||
float getEatSeconds();
|
||||
|
||||
/**
|
||||
* Sets the time in seconds it will take for this item to be eaten.
|
||||
*
|
||||
* @param eatSeconds new eat time
|
||||
*/
|
||||
void setEatSeconds(float eatSeconds);
|
||||
|
||||
/**
|
||||
* Gets the item this food will convert to once eaten.
|
||||
*
|
||||
* @return converted item
|
||||
*/
|
||||
@Nullable
|
||||
ItemStack getUsingConvertsTo();
|
||||
|
||||
/**
|
||||
* Sets the item this food will convert to once eaten.
|
||||
*
|
||||
* @param item converted item
|
||||
*/
|
||||
void setUsingConvertsTo(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Gets the effects which may be applied by this item when eaten.
|
||||
*
|
||||
* @return food effects
|
||||
*/
|
||||
@NotNull
|
||||
List<FoodEffect> getEffects();
|
||||
|
||||
/**
|
||||
* Sets the effects which may be applied by this item when eaten.
|
||||
*
|
||||
* @param effects new effects
|
||||
*/
|
||||
void setEffects(@NotNull List<FoodEffect> effects);
|
||||
|
||||
/**
|
||||
* Adds an effect which may be applied by this item when eaten.
|
||||
*
|
||||
* @param effect the effect
|
||||
* @param probability the probability of the effect being applied
|
||||
* @return the added effect
|
||||
*/
|
||||
@NotNull
|
||||
FoodEffect addEffect(@NotNull PotionEffect effect, float probability);
|
||||
|
||||
/**
|
||||
* An effect which may be applied by this item when eaten.
|
||||
*/
|
||||
public interface FoodEffect extends ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Gets the effect which may be applied.
|
||||
*
|
||||
* @return the effect
|
||||
*/
|
||||
@NotNull
|
||||
PotionEffect getEffect();
|
||||
|
||||
/**
|
||||
* Sets the effect which may be applied.
|
||||
*
|
||||
* @param effect the new effect
|
||||
*/
|
||||
void setEffect(@NotNull PotionEffect effect);
|
||||
|
||||
/**
|
||||
* Gets the probability of this effect being applied.
|
||||
*
|
||||
* @return probability
|
||||
*/
|
||||
float getProbability();
|
||||
|
||||
/**
|
||||
* Sets the probability of this effect being applied.
|
||||
*
|
||||
* @param probability between 0 and 1 inclusive.
|
||||
*/
|
||||
void setProbability(float probability);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package org.bukkit.inventory.meta.components;
|
||||
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a component which determines the cooldown applied to use of this
|
||||
* item.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface UseCooldownComponent extends ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Gets the time in seconds it will take for this item to be eaten.
|
||||
*
|
||||
* @return eat time
|
||||
*/
|
||||
float getCooldownSeconds();
|
||||
|
||||
/**
|
||||
* Sets the time in seconds it will take for this item to be eaten.
|
||||
*
|
||||
* @param eatSeconds new eat time, must be positive
|
||||
*/
|
||||
void setCooldownSeconds(float eatSeconds);
|
||||
|
||||
/**
|
||||
* Gets the custom cooldown group to be used for similar items, if set.
|
||||
*
|
||||
* @return the cooldown group
|
||||
*/
|
||||
@Nullable
|
||||
NamespacedKey getCooldownGroup();
|
||||
|
||||
/**
|
||||
* Sets the custom cooldown group to be used for similar items.
|
||||
*
|
||||
* @param song the cooldown group
|
||||
*/
|
||||
void setCooldownGroup(@Nullable NamespacedKey song);
|
||||
}
|
|
@ -15,7 +15,6 @@ import org.jetbrains.annotations.NotNull;
|
|||
*/
|
||||
public enum LootTables implements Keyed {
|
||||
|
||||
EMPTY("empty"),
|
||||
// Chests/Dispensers - treasure chests
|
||||
ABANDONED_MINESHAFT("chests/abandoned_mineshaft"),
|
||||
BURIED_TREASURE("chests/buried_treasure"),
|
||||
|
@ -175,8 +174,12 @@ public enum LootTables implements Keyed {
|
|||
SHEPHERD_GIFT("gameplay/hero_of_the_village/shepherd_gift"),
|
||||
TOOLSMITH_GIFT("gameplay/hero_of_the_village/toolsmith_gift"),
|
||||
WEAPONSMITH_GIFT("gameplay/hero_of_the_village/weaponsmith_gift"),
|
||||
UNEMPLOYED_GIFT("gameplay/hero_of_the_village/unemployed_gift"),
|
||||
BABY_VILLAGER_GIFT("gameplay/hero_of_the_village/baby_gift"),
|
||||
SNIFFER_DIGGING("gameplay/sniffer_digging"),
|
||||
PANDA_SNEEZE("gameplay/panda_sneeze"),
|
||||
CHICKEN_LAY("gameplay/chicken_lay"),
|
||||
ARMADILLO_SHED("gameplay/armadillo_shed"),
|
||||
PIGLIN_BARTERING("gameplay/piglin_bartering"),
|
||||
// Spawners
|
||||
TRIAL_CHAMBER_KEY("spawners/trial_chamber/key"),
|
||||
|
@ -186,6 +189,27 @@ public enum LootTables implements Keyed {
|
|||
TRIAL_CHAMBER_ITEMS_TO_DROP_WHEN_OMINOUS("spawners/trial_chamber/items_to_drop_when_ominous"),
|
||||
// Shearing
|
||||
SHEARING_BOGGED("shearing/bogged"),
|
||||
SHEARING_MOOSHROOM("shearing/mooshroom"),
|
||||
SHEARING_MOOSHROOM_RED("shearing/mooshroom/red"),
|
||||
SHEARING_MOOSHROOM_BROWN("shearing/mooshroom/brown"),
|
||||
SHEARING_SNOW_GOLEM("shearing/snow_golem"),
|
||||
SHEARING_SHEEP("shearing/sheep"),
|
||||
SHEARING_SHEEP_BLACK("shearing/sheep/black"),
|
||||
SHEARING_SHEEP_BLUE("shearing/sheep/blue"),
|
||||
SHEARING_SHEEP_BROWN("shearing/sheep/brown"),
|
||||
SHEARING_SHEEP_CYAN("shearing/sheep/cyan"),
|
||||
SHEARING_SHEEP_GRAY("shearing/sheep/gray"),
|
||||
SHEARING_SHEEP_GREEN("shearing/sheep/green"),
|
||||
SHEARING_SHEEP_LIGHT_BLUE("shearing/sheep/light_blue"),
|
||||
SHEARING_SHEEP_LIGHT_GRAY("shearing/sheep/light_gray"),
|
||||
SHEARING_SHEEP_LIME("shearing/sheep/lime"),
|
||||
SHEARING_SHEEP_MAGENTA("shearing/sheep/magenta"),
|
||||
SHEARING_SHEEP_ORANGE("shearing/sheep/orange"),
|
||||
SHEARING_SHEEP_PINK("shearing/sheep/pink"),
|
||||
SHEARING_SHEEP_PURPLE("shearing/sheep/purple"),
|
||||
SHEARING_SHEEP_RED("shearing/sheep/red"),
|
||||
SHEARING_SHEEP_WHITE("shearing/sheep/white"),
|
||||
SHEARING_SHEEP_YELLOW("shearing/sheep/yellow"),
|
||||
// Archaeology
|
||||
DESERT_WELL_ARCHAEOLOGY("archaeology/desert_well"),
|
||||
DESERT_PYRAMID_ARCHAEOLOGY("archaeology/desert_pyramid"),
|
||||
|
|
|
@ -16,8 +16,7 @@ public interface Lootable {
|
|||
/**
|
||||
* Set the loot table for a container or entity.
|
||||
* <br>
|
||||
* To remove a loot table use null. Do not use {@link LootTables#EMPTY} to
|
||||
* clear a LootTable.
|
||||
* To remove a loot table use null.
|
||||
*
|
||||
* @param table the Loot Table this {@link org.bukkit.block.Container} or
|
||||
* {@link org.bukkit.entity.Mob} will have.
|
||||
|
|
168
paper-api/src/main/java/org/bukkit/tag/DamageTypeTags.java
Normal file
168
paper-api/src/main/java/org/bukkit/tag/DamageTypeTags.java
Normal file
|
@ -0,0 +1,168 @@
|
|||
package org.bukkit.tag;
|
||||
|
||||
import java.util.Objects;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.damage.DamageType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Vanilla {@link DamageType} {@link Tag tags}.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public final class DamageTypeTags {
|
||||
|
||||
/**
|
||||
* Vanilla tag representing damage types which damage helmets.
|
||||
*/
|
||||
public static final Tag<DamageType> DAMAGES_HELMET = getTag("damages_helmet");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass armor.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_ARMOR = getTag("bypasses_armor");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass shields.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_SHIELD = getTag("bypasses_shield");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass invulnerability.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_INVULNERABILITY = getTag("bypasses_invulnerability");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass cooldowns.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_COOLDOWN = getTag("bypasses_cooldown");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass effects.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_EFFECTS = getTag("bypasses_effects");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass resistance.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_RESISTANCE = getTag("bypasses_resistance");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass enchantments.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_ENCHANTMENTS = getTag("bypasses_enchantments");
|
||||
/**
|
||||
* Vanilla tag representing all fire damage types.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_FIRE = getTag("is_fire");
|
||||
/**
|
||||
* Vanilla tag representing damage types which originate from projectiles.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_PROJECTILE = getTag("is_projectile");
|
||||
/**
|
||||
* Vanilla tag representing damage types which witches are resistant to.
|
||||
*/
|
||||
public static final Tag<DamageType> WITCH_RESISTANT_TO = getTag("witch_resistant_to");
|
||||
/**
|
||||
* Vanilla tag representing all explosion damage types.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_EXPLOSION = getTag("is_explosion");
|
||||
/**
|
||||
* Vanilla tag representing all fall damage types.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_FALL = getTag("is_fall");
|
||||
/**
|
||||
* Vanilla tag representing all drowning damage types.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_DROWNING = getTag("is_drowning");
|
||||
/**
|
||||
* Vanilla tag representing all freezing damage types.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_FREEZING = getTag("is_freezing");
|
||||
/**
|
||||
* Vanilla tag representing all lightning damage types.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_LIGHTNING = getTag("is_lightning");
|
||||
/**
|
||||
* Vanilla tag representing damage types which do not cause entities to
|
||||
* anger.
|
||||
*/
|
||||
public static final Tag<DamageType> NO_ANGER = getTag("no_anger");
|
||||
/**
|
||||
* Vanilla tag representing damage types which do not cause an impact.
|
||||
*/
|
||||
public static final Tag<DamageType> NO_IMPACT = getTag("no_impact");
|
||||
/**
|
||||
* Vanilla tag representing damage types which cause maximum fall damage.
|
||||
*/
|
||||
public static final Tag<DamageType> ALWAYS_MOST_SIGNIFICANT_FALL = getTag("always_most_significant_fall");
|
||||
/**
|
||||
* Vanilla tag representing damage types which withers are immune to.
|
||||
*/
|
||||
public static final Tag<DamageType> WITHER_IMMUNE_TO = getTag("wither_immune_to");
|
||||
/**
|
||||
* Vanilla tag representing damage types which ignite armor stands.
|
||||
*/
|
||||
public static final Tag<DamageType> IGNITES_ARMOR_STANDS = getTag("ignites_armor_stands");
|
||||
/**
|
||||
* Vanilla tag representing damage types which burn armor stands.
|
||||
*/
|
||||
public static final Tag<DamageType> BURNS_ARMOR_STANDS = getTag("burns_armor_stands");
|
||||
/**
|
||||
* Vanilla tag representing damage types which avoid guardian thorn damage.
|
||||
*/
|
||||
public static final Tag<DamageType> AVOIDS_GUARDIAN_THORNS = getTag("avoids_guardian_thorns");
|
||||
/**
|
||||
* Vanilla tag representing damage types which always trigger silverfish.
|
||||
*/
|
||||
public static final Tag<DamageType> ALWAYS_TRIGGERS_SILVERFISH = getTag("always_triggers_silverfish");
|
||||
/**
|
||||
* Vanilla tag representing damage types which always hurt enderdragons.
|
||||
*/
|
||||
public static final Tag<DamageType> ALWAYS_HURTS_ENDER_DRAGONS = getTag("always_hurts_ender_dragons");
|
||||
/**
|
||||
* Vanilla tag representing damage types which do not cause knockback.
|
||||
*/
|
||||
public static final Tag<DamageType> NO_KNOCKBACK = getTag("no_knockback");
|
||||
/**
|
||||
* Vanilla tag representing damage types which always kill armor stands.
|
||||
*/
|
||||
public static final Tag<DamageType> ALWAYS_KILLS_ARMOR_STANDS = getTag("always_kills_armor_stands");
|
||||
/**
|
||||
* Vanilla tag representing damage types which can break armor stands.
|
||||
*/
|
||||
public static final Tag<DamageType> CAN_BREAK_ARMOR_STAND = getTag("can_break_armor_stand");
|
||||
/**
|
||||
* Vanilla tag representing damage types which bypass wolf armor.
|
||||
*/
|
||||
public static final Tag<DamageType> BYPASSES_WOLF_ARMOR = getTag("bypasses_wolf_armor");
|
||||
/**
|
||||
* Vanilla tag representing damage types which are from player attacks.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_PLAYER_ATTACK = getTag("is_player_attack");
|
||||
/**
|
||||
* Vanilla tag representing damage types which originate from hot blocks.
|
||||
*/
|
||||
public static final Tag<DamageType> BURN_FROM_STEPPING = getTag("burn_from_stepping");
|
||||
/**
|
||||
* Vanilla tag representing damage types which cause entities to panic.
|
||||
*/
|
||||
public static final Tag<DamageType> PANIC_CAUSES = getTag("panic_causes");
|
||||
/**
|
||||
* Vanilla tag representing environmental damage types which cause entities
|
||||
* to panic.
|
||||
*/
|
||||
public static final Tag<DamageType> PANIC_ENVIRONMENTAL_CAUSES = getTag("panic_environmental_causes");
|
||||
/**
|
||||
* Vanilla tag representing damage types which originate from mace smashes.
|
||||
*/
|
||||
public static final Tag<DamageType> IS_MACE_SMASH = getTag("mace_smash");
|
||||
/**
|
||||
* Internal use only.
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public static final String REGISTRY_DAMAGE_TYPES = "damage_types";
|
||||
|
||||
@NotNull
|
||||
private static Tag<DamageType> getTag(String key) {
|
||||
return Objects.requireNonNull(Bukkit.getTag(REGISTRY_DAMAGE_TYPES, NamespacedKey.minecraft(key), DamageType.class));
|
||||
}
|
||||
|
||||
private DamageTypeTags() {
|
||||
}
|
||||
}
|
7
paper-api/src/main/java/org/bukkit/tag/package-info.java
Normal file
7
paper-api/src/main/java/org/bukkit/tag/package-info.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* {@link org.bukkit.Tag Tag}-related API.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
package org.bukkit.tag;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
Loading…
Add table
Reference in a new issue