mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 22:43:14 +01:00
Update to Minecraft 1.19.4
By: md_5 <git@md-5.net>
This commit is contained in:
parent
86d3c9caa7
commit
b76cbe36c5
32 changed files with 1379 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.19.3-R0.1-SNAPSHOT</version>
|
||||
<version>1.19.4-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Bukkit</name>
|
||||
|
@ -45,6 +45,13 @@
|
|||
<version>2.10</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- bundled with Minecraft, should be kept in sync -->
|
||||
<dependency>
|
||||
<groupId>org.joml</groupId>
|
||||
<artifactId>joml</artifactId>
|
||||
<version>1.10.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
|
|
|
@ -45,9 +45,11 @@ public final class GameEvent implements Keyed {
|
|||
@Deprecated
|
||||
public static final GameEvent ENTITY_DAMAGED = getEvent("entity_damage");
|
||||
public static final GameEvent ENTITY_DIE = getEvent("entity_die");
|
||||
public static final GameEvent ENTITY_DISMOUNT = getEvent("entity_dismount");
|
||||
@Deprecated
|
||||
public static final GameEvent ENTITY_DYING = getEvent("entity_die");
|
||||
public static final GameEvent ENTITY_INTERACT = getEvent("entity_interact");
|
||||
public static final GameEvent ENTITY_MOUNT = getEvent("entity_mount");
|
||||
@Deprecated
|
||||
public static final GameEvent ENTITY_KILLED = getEvent("entity_die");
|
||||
public static final GameEvent ENTITY_PLACE = getEvent("entity_place");
|
||||
|
|
|
@ -202,6 +202,10 @@ public final class GameRule<T> {
|
|||
* end portal effects will propagate across the entire server.
|
||||
*/
|
||||
public static final GameRule<Boolean> GLOBAL_SOUND_EVENTS = new GameRule<>("globalSoundEvents", Boolean.class);
|
||||
/**
|
||||
* Whether vines will spread.
|
||||
*/
|
||||
public static final GameRule<Boolean> DO_VINES_SPREAD = new GameRule<>("doVinesSpread", Boolean.class);
|
||||
|
||||
// Numerical rules
|
||||
/**
|
||||
|
@ -235,6 +239,11 @@ public final class GameRule<T> {
|
|||
*/
|
||||
public static final GameRule<Integer> MAX_COMMAND_CHAIN_LENGTH = new GameRule<>("maxCommandChainLength", Integer.class);
|
||||
|
||||
/**
|
||||
* Determines the maximum number of blocks which a command can modify.
|
||||
*/
|
||||
public static final GameRule<Integer> COMMAND_MODIFICATION_BLOCK_LIMIT = new GameRule<>("commandModificationBlockLimit", Integer.class);
|
||||
|
||||
/**
|
||||
* The percentage of online players which must be sleeping for the night to
|
||||
* advance.
|
||||
|
|
|
@ -46,6 +46,7 @@ import org.bukkit.block.data.type.CommandBlock;
|
|||
import org.bukkit.block.data.type.Comparator;
|
||||
import org.bukkit.block.data.type.CoralWallFan;
|
||||
import org.bukkit.block.data.type.DaylightDetector;
|
||||
import org.bukkit.block.data.type.DecoratedPot;
|
||||
import org.bukkit.block.data.type.Dispenser;
|
||||
import org.bukkit.block.data.type.Door;
|
||||
import org.bukkit.block.data.type.Dripleaf;
|
||||
|
@ -72,6 +73,7 @@ import org.bukkit.block.data.type.LightningRod;
|
|||
import org.bukkit.block.data.type.MangrovePropagule;
|
||||
import org.bukkit.block.data.type.NoteBlock;
|
||||
import org.bukkit.block.data.type.Observer;
|
||||
import org.bukkit.block.data.type.PinkPetals;
|
||||
import org.bukkit.block.data.type.Piston;
|
||||
import org.bukkit.block.data.type.PistonHead;
|
||||
import org.bukkit.block.data.type.PointedDripstone;
|
||||
|
@ -93,6 +95,7 @@ import org.bukkit.block.data.type.SmallDripleaf;
|
|||
import org.bukkit.block.data.type.Snow;
|
||||
import org.bukkit.block.data.type.Stairs;
|
||||
import org.bukkit.block.data.type.StructureBlock;
|
||||
import org.bukkit.block.data.type.SuspiciousSand;
|
||||
import org.bukkit.block.data.type.Switch;
|
||||
import org.bukkit.block.data.type.TNT;
|
||||
import org.bukkit.block.data.type.TechnicalPiston;
|
||||
|
@ -151,6 +154,7 @@ public enum Material implements Keyed, Translatable {
|
|||
BIRCH_PLANKS(29322),
|
||||
JUNGLE_PLANKS(26445),
|
||||
ACACIA_PLANKS(31312),
|
||||
CHERRY_PLANKS(8354),
|
||||
DARK_OAK_PLANKS(20869),
|
||||
MANGROVE_PLANKS(7078),
|
||||
BAMBOO_PLANKS(8520),
|
||||
|
@ -177,6 +181,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Sapling}
|
||||
*/
|
||||
ACACIA_SAPLING(20806, Sapling.class),
|
||||
/**
|
||||
* BlockData: {@link Sapling}
|
||||
*/
|
||||
CHERRY_SAPLING(25204, Sapling.class),
|
||||
/**
|
||||
* BlockData: {@link Sapling}
|
||||
*/
|
||||
|
@ -187,6 +195,10 @@ public enum Material implements Keyed, Translatable {
|
|||
MANGROVE_PROPAGULE(18688, MangrovePropagule.class),
|
||||
BEDROCK(23130),
|
||||
SAND(11542),
|
||||
/**
|
||||
* BlockData: {@link SuspiciousSand}
|
||||
*/
|
||||
SUSPICIOUS_SAND(18410, SuspiciousSand.class),
|
||||
RED_SAND(16279),
|
||||
GRAVEL(7804),
|
||||
COAL_ORE(30965),
|
||||
|
@ -324,6 +336,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
ACACIA_LOG(8385, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
CHERRY_LOG(20847, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -372,6 +388,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
STRIPPED_ACACIA_LOG(18167, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
STRIPPED_CHERRY_LOG(18061, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -408,6 +428,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
STRIPPED_ACACIA_WOOD(27193, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
STRIPPED_CHERRY_WOOD(19647, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -448,6 +472,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
ACACIA_WOOD(9541, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
CHERRY_WOOD(9826, Orientable.class),
|
||||
/**
|
||||
* BlockData: {@link Orientable}
|
||||
*/
|
||||
|
@ -484,6 +512,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
ACACIA_LEAVES(16606, Leaves.class),
|
||||
/**
|
||||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
CHERRY_LEAVES(20856, Leaves.class),
|
||||
/**
|
||||
* BlockData: {@link Leaves}
|
||||
*/
|
||||
|
@ -548,6 +580,7 @@ public enum Material implements Keyed, Translatable {
|
|||
CORNFLOWER(15405),
|
||||
LILY_OF_THE_VALLEY(7185),
|
||||
WITHER_ROSE(8619),
|
||||
TORCHFLOWER(4501),
|
||||
SPORE_BLOSSOM(20627),
|
||||
BROWN_MUSHROOM(9665),
|
||||
RED_MUSHROOM(19728),
|
||||
|
@ -573,6 +606,10 @@ public enum Material implements Keyed, Translatable {
|
|||
*/
|
||||
KELP(21916, Ageable.class),
|
||||
MOSS_CARPET(8221),
|
||||
/**
|
||||
* BlockData: {@link PinkPetals}
|
||||
*/
|
||||
PINK_PETALS(10420, PinkPetals.class),
|
||||
MOSS_BLOCK(9175),
|
||||
/**
|
||||
* BlockData: {@link Waterlogged}
|
||||
|
@ -610,6 +647,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Slab}
|
||||
*/
|
||||
ACACIA_SLAB(23730, Slab.class),
|
||||
/**
|
||||
* BlockData: {@link Slab}
|
||||
*/
|
||||
CHERRY_SLAB(16673, Slab.class),
|
||||
/**
|
||||
* BlockData: {@link Slab}
|
||||
*/
|
||||
|
@ -712,6 +753,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link ChiseledBookshelf}
|
||||
*/
|
||||
CHISELED_BOOKSHELF(8099, ChiseledBookshelf.class),
|
||||
/**
|
||||
* BlockData: {@link DecoratedPot}
|
||||
*/
|
||||
DECORATED_POT(8720, 1, DecoratedPot.class),
|
||||
MOSSY_COBBLESTONE(21900),
|
||||
OBSIDIAN(32723),
|
||||
TORCH(6063),
|
||||
|
@ -793,6 +838,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Fence}
|
||||
*/
|
||||
ACACIA_FENCE(4569, Fence.class),
|
||||
/**
|
||||
* BlockData: {@link Fence}
|
||||
*/
|
||||
CHERRY_FENCE(32047, Fence.class),
|
||||
/**
|
||||
* BlockData: {@link Fence}
|
||||
*/
|
||||
|
@ -969,6 +1018,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
ACACIA_STAIRS(17453, Stairs.class),
|
||||
/**
|
||||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
CHERRY_STAIRS(18380, Stairs.class),
|
||||
/**
|
||||
* BlockData: {@link Stairs}
|
||||
*/
|
||||
|
@ -1816,6 +1869,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Switch}
|
||||
*/
|
||||
ACACIA_BUTTON(13993, Switch.class),
|
||||
/**
|
||||
* BlockData: {@link Switch}
|
||||
*/
|
||||
CHERRY_BUTTON(9058, Switch.class),
|
||||
/**
|
||||
* BlockData: {@link Switch}
|
||||
*/
|
||||
|
@ -1872,6 +1929,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
ACACIA_PRESSURE_PLATE(17586, Powerable.class),
|
||||
/**
|
||||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
CHERRY_PRESSURE_PLATE(8651, Powerable.class),
|
||||
/**
|
||||
* BlockData: {@link Powerable}
|
||||
*/
|
||||
|
@ -1916,6 +1977,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Door}
|
||||
*/
|
||||
ACACIA_DOOR(23797, Door.class),
|
||||
/**
|
||||
* BlockData: {@link Door}
|
||||
*/
|
||||
CHERRY_DOOR(12684, Door.class),
|
||||
/**
|
||||
* BlockData: {@link Door}
|
||||
*/
|
||||
|
@ -1960,6 +2025,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
ACACIA_TRAPDOOR(18343, TrapDoor.class),
|
||||
/**
|
||||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
CHERRY_TRAPDOOR(6293, TrapDoor.class),
|
||||
/**
|
||||
* BlockData: {@link TrapDoor}
|
||||
*/
|
||||
|
@ -2000,6 +2069,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Gate}
|
||||
*/
|
||||
ACACIA_FENCE_GATE(14145, Gate.class),
|
||||
/**
|
||||
* BlockData: {@link Gate}
|
||||
*/
|
||||
CHERRY_FENCE_GATE(28222, Gate.class),
|
||||
/**
|
||||
* BlockData: {@link Gate}
|
||||
*/
|
||||
|
@ -2055,6 +2128,8 @@ public enum Material implements Keyed, Translatable {
|
|||
JUNGLE_CHEST_BOAT(20133, 1),
|
||||
ACACIA_BOAT(27326, 1),
|
||||
ACACIA_CHEST_BOAT(28455, 1),
|
||||
CHERRY_BOAT(13628, 1),
|
||||
CHERRY_CHEST_BOAT(7165, 1),
|
||||
DARK_OAK_BOAT(28618, 1),
|
||||
DARK_OAK_CHEST_BOAT(8733, 1),
|
||||
MANGROVE_BOAT(20792, 1),
|
||||
|
@ -2182,6 +2257,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Sign}
|
||||
*/
|
||||
ACACIA_SIGN(29808, 16, Sign.class),
|
||||
/**
|
||||
* BlockData: {@link Sign}
|
||||
*/
|
||||
CHERRY_SIGN(16520, 16, Sign.class),
|
||||
/**
|
||||
* BlockData: {@link Sign}
|
||||
*/
|
||||
|
@ -2222,6 +2301,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
ACACIA_HANGING_SIGN(30257, 16, HangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
CHERRY_HANGING_SIGN(5088, 16, HangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link HangingSign}
|
||||
*/
|
||||
|
@ -2451,6 +2534,7 @@ public enum Material implements Keyed, Translatable {
|
|||
SKELETON_SPAWN_EGG(15261),
|
||||
SKELETON_HORSE_SPAWN_EGG(21356),
|
||||
SLIME_SPAWN_EGG(17196),
|
||||
SNIFFER_SPAWN_EGG(27473),
|
||||
SNOW_GOLEM_SPAWN_EGG(24732),
|
||||
SPIDER_SPAWN_EGG(14984),
|
||||
SQUID_SPAWN_EGG(10682),
|
||||
|
@ -2605,6 +2689,7 @@ public enum Material implements Keyed, Translatable {
|
|||
END_CRYSTAL(19090),
|
||||
CHORUS_FRUIT(7652),
|
||||
POPPED_CHORUS_FRUIT(27844),
|
||||
TORCHFLOWER_SEEDS(18153),
|
||||
BEETROOT(23305),
|
||||
BEETROOT_SEEDS(21282),
|
||||
BEETROOT_SOUP(16036, 1),
|
||||
|
@ -2851,6 +2936,23 @@ public enum Material implements Keyed, Translatable {
|
|||
PEARLESCENT_FROGLIGHT(21441, Orientable.class),
|
||||
FROGSPAWN(8350),
|
||||
ECHO_SHARD(12529),
|
||||
BRUSH(30569, 1, 64),
|
||||
NETHERITE_UPGRADE_SMITHING_TEMPLATE(7615),
|
||||
SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE(16124),
|
||||
DUNE_ARMOR_TRIM_SMITHING_TEMPLATE(30925),
|
||||
COAST_ARMOR_TRIM_SMITHING_TEMPLATE(25501),
|
||||
WILD_ARMOR_TRIM_SMITHING_TEMPLATE(5870),
|
||||
WARD_ARMOR_TRIM_SMITHING_TEMPLATE(24534),
|
||||
EYE_ARMOR_TRIM_SMITHING_TEMPLATE(14663),
|
||||
VEX_ARMOR_TRIM_SMITHING_TEMPLATE(25818),
|
||||
TIDE_ARMOR_TRIM_SMITHING_TEMPLATE(20420),
|
||||
SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE(14386),
|
||||
RIB_ARMOR_TRIM_SMITHING_TEMPLATE(6010),
|
||||
SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE(29143),
|
||||
POTTERY_SHARD_ARCHER(26154),
|
||||
POTTERY_SHARD_PRIZE(31677),
|
||||
POTTERY_SHARD_ARMS_UP(29222),
|
||||
POTTERY_SHARD_SKULL(14619),
|
||||
/**
|
||||
* BlockData: {@link Levelled}
|
||||
*/
|
||||
|
@ -2900,6 +3002,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
ACACIA_WALL_SIGN(20316, 16, WallSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
CHERRY_WALL_SIGN(20188, 16, WallSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallSign}
|
||||
*/
|
||||
|
@ -2932,6 +3038,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
ACACIA_WALL_HANGING_SIGN(22477, WallHangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
CHERRY_WALL_HANGING_SIGN(10953, WallHangingSign.class),
|
||||
/**
|
||||
* BlockData: {@link WallHangingSign}
|
||||
*/
|
||||
|
@ -3002,11 +3112,13 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Tripwire}
|
||||
*/
|
||||
TRIPWIRE(8810, Tripwire.class),
|
||||
POTTED_TORCHFLOWER(21278),
|
||||
POTTED_OAK_SAPLING(11905),
|
||||
POTTED_SPRUCE_SAPLING(29498),
|
||||
POTTED_BIRCH_SAPLING(32484),
|
||||
POTTED_JUNGLE_SAPLING(7525),
|
||||
POTTED_ACACIA_SAPLING(14096),
|
||||
POTTED_CHERRY_SAPLING(30785),
|
||||
POTTED_DARK_OAK_SAPLING(6486),
|
||||
POTTED_MANGROVE_PROPAGULE(22003),
|
||||
POTTED_FERN(23315),
|
||||
|
@ -3127,6 +3239,10 @@ public enum Material implements Keyed, Translatable {
|
|||
* BlockData: {@link Directional}
|
||||
*/
|
||||
BLACK_WALL_BANNER(4919, Directional.class),
|
||||
/**
|
||||
* BlockData: {@link Ageable}
|
||||
*/
|
||||
TORCHFLOWER_CROP(28460, Ageable.class),
|
||||
/**
|
||||
* BlockData: {@link Ageable}
|
||||
*/
|
||||
|
@ -4567,6 +4683,23 @@ public enum Material implements Keyed, Translatable {
|
|||
case CAVE_VINES_PLANT:
|
||||
case CHAIN:
|
||||
case CHAIN_COMMAND_BLOCK:
|
||||
case CHERRY_BUTTON:
|
||||
case CHERRY_DOOR:
|
||||
case CHERRY_FENCE:
|
||||
case CHERRY_FENCE_GATE:
|
||||
case CHERRY_HANGING_SIGN:
|
||||
case CHERRY_LEAVES:
|
||||
case CHERRY_LOG:
|
||||
case CHERRY_PLANKS:
|
||||
case CHERRY_PRESSURE_PLATE:
|
||||
case CHERRY_SAPLING:
|
||||
case CHERRY_SIGN:
|
||||
case CHERRY_SLAB:
|
||||
case CHERRY_STAIRS:
|
||||
case CHERRY_TRAPDOOR:
|
||||
case CHERRY_WALL_HANGING_SIGN:
|
||||
case CHERRY_WALL_SIGN:
|
||||
case CHERRY_WOOD:
|
||||
case CHEST:
|
||||
case CHIPPED_ANVIL:
|
||||
case CHISELED_BOOKSHELF:
|
||||
|
@ -4692,6 +4825,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case DEAD_TUBE_CORAL_BLOCK:
|
||||
case DEAD_TUBE_CORAL_FAN:
|
||||
case DEAD_TUBE_CORAL_WALL_FAN:
|
||||
case DECORATED_POT:
|
||||
case DEEPSLATE:
|
||||
case DEEPSLATE_BRICKS:
|
||||
case DEEPSLATE_BRICK_SLAB:
|
||||
|
@ -5028,6 +5162,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case PINK_CONCRETE:
|
||||
case PINK_CONCRETE_POWDER:
|
||||
case PINK_GLAZED_TERRACOTTA:
|
||||
case PINK_PETALS:
|
||||
case PINK_SHULKER_BOX:
|
||||
case PINK_STAINED_GLASS:
|
||||
case PINK_STAINED_GLASS_PANE:
|
||||
|
@ -5076,6 +5211,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case POTTED_BLUE_ORCHID:
|
||||
case POTTED_BROWN_MUSHROOM:
|
||||
case POTTED_CACTUS:
|
||||
case POTTED_CHERRY_SAPLING:
|
||||
case POTTED_CORNFLOWER:
|
||||
case POTTED_CRIMSON_FUNGUS:
|
||||
case POTTED_CRIMSON_ROOTS:
|
||||
|
@ -5095,6 +5231,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case POTTED_RED_MUSHROOM:
|
||||
case POTTED_RED_TULIP:
|
||||
case POTTED_SPRUCE_SAPLING:
|
||||
case POTTED_TORCHFLOWER:
|
||||
case POTTED_WARPED_FUNGUS:
|
||||
case POTTED_WARPED_ROOTS:
|
||||
case POTTED_WHITE_TULIP:
|
||||
|
@ -5256,6 +5393,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_BAMBOO_BLOCK:
|
||||
case STRIPPED_BIRCH_LOG:
|
||||
case STRIPPED_BIRCH_WOOD:
|
||||
case STRIPPED_CHERRY_LOG:
|
||||
case STRIPPED_CHERRY_WOOD:
|
||||
case STRIPPED_CRIMSON_HYPHAE:
|
||||
case STRIPPED_CRIMSON_STEM:
|
||||
case STRIPPED_DARK_OAK_LOG:
|
||||
|
@ -5274,6 +5413,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRUCTURE_VOID:
|
||||
case SUGAR_CANE:
|
||||
case SUNFLOWER:
|
||||
case SUSPICIOUS_SAND:
|
||||
case SWEET_BERRY_BUSH:
|
||||
case TALL_GRASS:
|
||||
case TALL_SEAGRASS:
|
||||
|
@ -5282,6 +5422,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case TINTED_GLASS:
|
||||
case TNT:
|
||||
case TORCH:
|
||||
case TORCHFLOWER:
|
||||
case TORCHFLOWER_CROP:
|
||||
case TRAPPED_CHEST:
|
||||
case TRIPWIRE:
|
||||
case TRIPWIRE_HOOK:
|
||||
|
@ -5726,6 +5868,21 @@ public enum Material implements Keyed, Translatable {
|
|||
case CAULDRON:
|
||||
case CHAIN:
|
||||
case CHAIN_COMMAND_BLOCK:
|
||||
case CHERRY_DOOR:
|
||||
case CHERRY_FENCE:
|
||||
case CHERRY_FENCE_GATE:
|
||||
case CHERRY_HANGING_SIGN:
|
||||
case CHERRY_LEAVES:
|
||||
case CHERRY_LOG:
|
||||
case CHERRY_PLANKS:
|
||||
case CHERRY_PRESSURE_PLATE:
|
||||
case CHERRY_SIGN:
|
||||
case CHERRY_SLAB:
|
||||
case CHERRY_STAIRS:
|
||||
case CHERRY_TRAPDOOR:
|
||||
case CHERRY_WALL_HANGING_SIGN:
|
||||
case CHERRY_WALL_SIGN:
|
||||
case CHERRY_WOOD:
|
||||
case CHEST:
|
||||
case CHIPPED_ANVIL:
|
||||
case CHISELED_BOOKSHELF:
|
||||
|
@ -5834,6 +5991,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case DEAD_TUBE_CORAL_BLOCK:
|
||||
case DEAD_TUBE_CORAL_FAN:
|
||||
case DEAD_TUBE_CORAL_WALL_FAN:
|
||||
case DECORATED_POT:
|
||||
case DEEPSLATE:
|
||||
case DEEPSLATE_BRICKS:
|
||||
case DEEPSLATE_BRICK_SLAB:
|
||||
|
@ -6269,6 +6427,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_BAMBOO_BLOCK:
|
||||
case STRIPPED_BIRCH_LOG:
|
||||
case STRIPPED_BIRCH_WOOD:
|
||||
case STRIPPED_CHERRY_LOG:
|
||||
case STRIPPED_CHERRY_WOOD:
|
||||
case STRIPPED_CRIMSON_HYPHAE:
|
||||
case STRIPPED_CRIMSON_STEM:
|
||||
case STRIPPED_DARK_OAK_LOG:
|
||||
|
@ -6284,6 +6444,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_WARPED_HYPHAE:
|
||||
case STRIPPED_WARPED_STEM:
|
||||
case STRUCTURE_BLOCK:
|
||||
case SUSPICIOUS_SAND:
|
||||
case TARGET:
|
||||
case TERRACOTTA:
|
||||
case TINTED_GLASS:
|
||||
|
@ -6862,6 +7023,21 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_WOOL:
|
||||
case CAMPFIRE:
|
||||
case CARTOGRAPHY_TABLE:
|
||||
case CHERRY_DOOR:
|
||||
case CHERRY_FENCE:
|
||||
case CHERRY_FENCE_GATE:
|
||||
case CHERRY_HANGING_SIGN:
|
||||
case CHERRY_LEAVES:
|
||||
case CHERRY_LOG:
|
||||
case CHERRY_PLANKS:
|
||||
case CHERRY_PRESSURE_PLATE:
|
||||
case CHERRY_SIGN:
|
||||
case CHERRY_SLAB:
|
||||
case CHERRY_STAIRS:
|
||||
case CHERRY_TRAPDOOR:
|
||||
case CHERRY_WALL_HANGING_SIGN:
|
||||
case CHERRY_WALL_SIGN:
|
||||
case CHERRY_WOOD:
|
||||
case CHEST:
|
||||
case CHISELED_BOOKSHELF:
|
||||
case COMPOSTER:
|
||||
|
@ -7024,6 +7200,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_BAMBOO_BLOCK:
|
||||
case STRIPPED_BIRCH_LOG:
|
||||
case STRIPPED_BIRCH_WOOD:
|
||||
case STRIPPED_CHERRY_LOG:
|
||||
case STRIPPED_CHERRY_WOOD:
|
||||
case STRIPPED_DARK_OAK_LOG:
|
||||
case STRIPPED_DARK_OAK_WOOD:
|
||||
case STRIPPED_JUNGLE_LOG:
|
||||
|
@ -7169,6 +7347,14 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_WOOL:
|
||||
case CAVE_VINES:
|
||||
case CAVE_VINES_PLANT:
|
||||
case CHERRY_FENCE:
|
||||
case CHERRY_FENCE_GATE:
|
||||
case CHERRY_LEAVES:
|
||||
case CHERRY_LOG:
|
||||
case CHERRY_PLANKS:
|
||||
case CHERRY_SLAB:
|
||||
case CHERRY_STAIRS:
|
||||
case CHERRY_WOOD:
|
||||
case COAL_BLOCK:
|
||||
case COMPOSTER:
|
||||
case CORNFLOWER:
|
||||
|
@ -7239,6 +7425,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case OXEYE_DAISY:
|
||||
case PEONY:
|
||||
case PINK_CARPET:
|
||||
case PINK_PETALS:
|
||||
case PINK_TULIP:
|
||||
case PINK_WOOL:
|
||||
case POPPY:
|
||||
|
@ -7264,6 +7451,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_BAMBOO_BLOCK:
|
||||
case STRIPPED_BIRCH_LOG:
|
||||
case STRIPPED_BIRCH_WOOD:
|
||||
case STRIPPED_CHERRY_LOG:
|
||||
case STRIPPED_CHERRY_WOOD:
|
||||
case STRIPPED_DARK_OAK_LOG:
|
||||
case STRIPPED_DARK_OAK_WOOD:
|
||||
case STRIPPED_JUNGLE_LOG:
|
||||
|
@ -7692,6 +7881,9 @@ public enum Material implements Keyed, Translatable {
|
|||
case CARTOGRAPHY_TABLE:
|
||||
case CARVED_PUMPKIN:
|
||||
case CHAIN_COMMAND_BLOCK:
|
||||
case CHERRY_LOG:
|
||||
case CHERRY_PLANKS:
|
||||
case CHERRY_WOOD:
|
||||
case CHISELED_BOOKSHELF:
|
||||
case CHISELED_DEEPSLATE:
|
||||
case CHISELED_NETHER_BRICKS:
|
||||
|
@ -7943,6 +8135,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_BAMBOO_BLOCK:
|
||||
case STRIPPED_BIRCH_LOG:
|
||||
case STRIPPED_BIRCH_WOOD:
|
||||
case STRIPPED_CHERRY_LOG:
|
||||
case STRIPPED_CHERRY_WOOD:
|
||||
case STRIPPED_CRIMSON_HYPHAE:
|
||||
case STRIPPED_CRIMSON_STEM:
|
||||
case STRIPPED_DARK_OAK_LOG:
|
||||
|
@ -7958,6 +8152,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_WARPED_HYPHAE:
|
||||
case STRIPPED_WARPED_STEM:
|
||||
case STRUCTURE_BLOCK:
|
||||
case SUSPICIOUS_SAND:
|
||||
case TARGET:
|
||||
case TERRACOTTA:
|
||||
case TUBE_CORAL_BLOCK:
|
||||
|
@ -8174,6 +8369,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case CAVE_AIR:
|
||||
case CAVE_VINES:
|
||||
case CAVE_VINES_PLANT:
|
||||
case CHERRY_WALL_HANGING_SIGN:
|
||||
case CHERRY_WALL_SIGN:
|
||||
case COCOA:
|
||||
case CREEPER_WALL_HEAD:
|
||||
case CRIMSON_WALL_HANGING_SIGN:
|
||||
|
@ -8235,6 +8432,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case POTTED_BLUE_ORCHID:
|
||||
case POTTED_BROWN_MUSHROOM:
|
||||
case POTTED_CACTUS:
|
||||
case POTTED_CHERRY_SAPLING:
|
||||
case POTTED_CORNFLOWER:
|
||||
case POTTED_CRIMSON_FUNGUS:
|
||||
case POTTED_CRIMSON_ROOTS:
|
||||
|
@ -8254,6 +8452,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case POTTED_RED_MUSHROOM:
|
||||
case POTTED_RED_TULIP:
|
||||
case POTTED_SPRUCE_SAPLING:
|
||||
case POTTED_TORCHFLOWER:
|
||||
case POTTED_WARPED_FUNGUS:
|
||||
case POTTED_WARPED_ROOTS:
|
||||
case POTTED_WHITE_TULIP:
|
||||
|
@ -8274,6 +8473,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case SPRUCE_WALL_SIGN:
|
||||
case SWEET_BERRY_BUSH:
|
||||
case TALL_SEAGRASS:
|
||||
case TORCHFLOWER_CROP:
|
||||
case TRIPWIRE:
|
||||
case TUBE_CORAL_WALL_FAN:
|
||||
case TWISTING_VINES_PLANT:
|
||||
|
@ -8432,6 +8632,16 @@ public enum Material implements Keyed, Translatable {
|
|||
case CAVE_VINES:
|
||||
case CAVE_VINES_PLANT:
|
||||
case CHAIN_COMMAND_BLOCK:
|
||||
case CHERRY_BUTTON:
|
||||
case CHERRY_DOOR:
|
||||
case CHERRY_FENCE:
|
||||
case CHERRY_FENCE_GATE:
|
||||
case CHERRY_HANGING_SIGN:
|
||||
case CHERRY_SIGN:
|
||||
case CHERRY_STAIRS:
|
||||
case CHERRY_TRAPDOOR:
|
||||
case CHERRY_WALL_HANGING_SIGN:
|
||||
case CHERRY_WALL_SIGN:
|
||||
case CHEST:
|
||||
case CHIPPED_ANVIL:
|
||||
case CHISELED_BOOKSHELF:
|
||||
|
@ -8581,6 +8791,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case POTTED_BLUE_ORCHID:
|
||||
case POTTED_BROWN_MUSHROOM:
|
||||
case POTTED_CACTUS:
|
||||
case POTTED_CHERRY_SAPLING:
|
||||
case POTTED_CORNFLOWER:
|
||||
case POTTED_CRIMSON_FUNGUS:
|
||||
case POTTED_CRIMSON_ROOTS:
|
||||
|
@ -8600,6 +8811,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case POTTED_RED_MUSHROOM:
|
||||
case POTTED_RED_TULIP:
|
||||
case POTTED_SPRUCE_SAPLING:
|
||||
case POTTED_TORCHFLOWER:
|
||||
case POTTED_WARPED_FUNGUS:
|
||||
case POTTED_WARPED_ROOTS:
|
||||
case POTTED_WHITE_TULIP:
|
||||
|
@ -8755,6 +8967,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case BLUE_BED:
|
||||
case BROWN_BED:
|
||||
case BROWN_MUSHROOM_BLOCK:
|
||||
case CHERRY_LEAVES:
|
||||
case COCOA:
|
||||
case CYAN_BED:
|
||||
case DARK_OAK_LEAVES:
|
||||
|
@ -8785,6 +8998,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case YELLOW_BED:
|
||||
return 0.2F;
|
||||
case POWDER_SNOW:
|
||||
case SUSPICIOUS_SAND:
|
||||
return 0.25F;
|
||||
case BEE_NEST:
|
||||
case BLACK_STAINED_GLASS:
|
||||
|
@ -8852,6 +9066,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_CONCRETE_POWDER:
|
||||
case CAKE:
|
||||
case CANDLE_CAKE:
|
||||
case CHERRY_BUTTON:
|
||||
case CHERRY_PRESSURE_PLATE:
|
||||
case COARSE_DIRT:
|
||||
case CRIMSON_BUTTON:
|
||||
case CRIMSON_PRESSURE_PLATE:
|
||||
|
@ -8998,6 +9214,10 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_BANNER:
|
||||
case BROWN_WALL_BANNER:
|
||||
case CARVED_PUMPKIN:
|
||||
case CHERRY_HANGING_SIGN:
|
||||
case CHERRY_SIGN:
|
||||
case CHERRY_WALL_HANGING_SIGN:
|
||||
case CHERRY_WALL_SIGN:
|
||||
case CREEPER_HEAD:
|
||||
case CREEPER_WALL_HEAD:
|
||||
case CRIMSON_HANGING_SIGN:
|
||||
|
@ -9249,6 +9469,13 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_SHULKER_BOX:
|
||||
case CAMPFIRE:
|
||||
case CAULDRON:
|
||||
case CHERRY_FENCE:
|
||||
case CHERRY_FENCE_GATE:
|
||||
case CHERRY_LOG:
|
||||
case CHERRY_PLANKS:
|
||||
case CHERRY_SLAB:
|
||||
case CHERRY_STAIRS:
|
||||
case CHERRY_WOOD:
|
||||
case CHISELED_NETHER_BRICKS:
|
||||
case COBBLESTONE:
|
||||
case COBBLESTONE_SLAB:
|
||||
|
@ -9357,6 +9584,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_BAMBOO_BLOCK:
|
||||
case STRIPPED_BIRCH_LOG:
|
||||
case STRIPPED_BIRCH_WOOD:
|
||||
case STRIPPED_CHERRY_LOG:
|
||||
case STRIPPED_CHERRY_WOOD:
|
||||
case STRIPPED_CRIMSON_HYPHAE:
|
||||
case STRIPPED_CRIMSON_STEM:
|
||||
case STRIPPED_DARK_OAK_LOG:
|
||||
|
@ -9401,6 +9630,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case BEACON:
|
||||
case BIRCH_DOOR:
|
||||
case BIRCH_TRAPDOOR:
|
||||
case CHERRY_DOOR:
|
||||
case CHERRY_TRAPDOOR:
|
||||
case COAL_ORE:
|
||||
case CONDUIT:
|
||||
case COPPER_BLOCK:
|
||||
|
@ -9612,6 +9843,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case BLUE_BED:
|
||||
case BROWN_BED:
|
||||
case BROWN_MUSHROOM_BLOCK:
|
||||
case CHERRY_LEAVES:
|
||||
case CYAN_BED:
|
||||
case DARK_OAK_LEAVES:
|
||||
case DAYLIGHT_DETECTOR:
|
||||
|
@ -9641,6 +9873,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case YELLOW_BED:
|
||||
return 0.2F;
|
||||
case POWDER_SNOW:
|
||||
case SUSPICIOUS_SAND:
|
||||
return 0.25F;
|
||||
case BEE_NEST:
|
||||
case BLACK_STAINED_GLASS:
|
||||
|
@ -9708,6 +9941,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_CONCRETE_POWDER:
|
||||
case CAKE:
|
||||
case CANDLE_CAKE:
|
||||
case CHERRY_BUTTON:
|
||||
case CHERRY_PRESSURE_PLATE:
|
||||
case COARSE_DIRT:
|
||||
case CRIMSON_BUTTON:
|
||||
case CRIMSON_PRESSURE_PLATE:
|
||||
|
@ -9855,6 +10090,10 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_BANNER:
|
||||
case BROWN_WALL_BANNER:
|
||||
case CARVED_PUMPKIN:
|
||||
case CHERRY_HANGING_SIGN:
|
||||
case CHERRY_SIGN:
|
||||
case CHERRY_WALL_HANGING_SIGN:
|
||||
case CHERRY_WALL_SIGN:
|
||||
case CREEPER_HEAD:
|
||||
case CREEPER_WALL_HEAD:
|
||||
case CRIMSON_HANGING_SIGN:
|
||||
|
@ -9989,6 +10228,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case BROWN_SHULKER_BOX:
|
||||
case CAMPFIRE:
|
||||
case CAULDRON:
|
||||
case CHERRY_LOG:
|
||||
case CHERRY_WOOD:
|
||||
case CRIMSON_HYPHAE:
|
||||
case CRIMSON_STEM:
|
||||
case CYAN_SHULKER_BOX:
|
||||
|
@ -10021,6 +10262,8 @@ public enum Material implements Keyed, Translatable {
|
|||
case STRIPPED_BAMBOO_BLOCK:
|
||||
case STRIPPED_BIRCH_LOG:
|
||||
case STRIPPED_BIRCH_WOOD:
|
||||
case STRIPPED_CHERRY_LOG:
|
||||
case STRIPPED_CHERRY_WOOD:
|
||||
case STRIPPED_CRIMSON_HYPHAE:
|
||||
case STRIPPED_CRIMSON_STEM:
|
||||
case STRIPPED_DARK_OAK_LOG:
|
||||
|
@ -10079,6 +10322,13 @@ public enum Material implements Keyed, Translatable {
|
|||
case BIRCH_SLAB:
|
||||
case BIRCH_STAIRS:
|
||||
case BIRCH_TRAPDOOR:
|
||||
case CHERRY_DOOR:
|
||||
case CHERRY_FENCE:
|
||||
case CHERRY_FENCE_GATE:
|
||||
case CHERRY_PLANKS:
|
||||
case CHERRY_SLAB:
|
||||
case CHERRY_STAIRS:
|
||||
case CHERRY_TRAPDOOR:
|
||||
case COAL_ORE:
|
||||
case COCOA:
|
||||
case CONDUIT:
|
||||
|
@ -10497,6 +10747,7 @@ public enum Material implements Keyed, Translatable {
|
|||
case DRAGON_HEAD:
|
||||
case GOLDEN_HELMET:
|
||||
case IRON_HELMET:
|
||||
case JACK_O_LANTERN:
|
||||
case LEATHER_HELMET:
|
||||
case NETHERITE_HELMET:
|
||||
case PLAYER_HEAD:
|
||||
|
|
|
@ -123,6 +123,9 @@ public enum Particle {
|
|||
SCULK_CHARGE(Float.class),
|
||||
SCULK_CHARGE_POP,
|
||||
SHRIEK(Integer.class),
|
||||
DRIPPING_CHERRY_LEAVES,
|
||||
FALLING_CHERRY_LEAVES,
|
||||
LANDING_CHERRY_LEAVES,
|
||||
/**
|
||||
* Uses {@link BlockData} as DataType
|
||||
*/
|
||||
|
|
|
@ -158,6 +158,36 @@ public enum Sound implements Keyed {
|
|||
BLOCK_CHAIN_HIT("block.chain.hit"),
|
||||
BLOCK_CHAIN_PLACE("block.chain.place"),
|
||||
BLOCK_CHAIN_STEP("block.chain.step"),
|
||||
BLOCK_CHERRY_LEAVES_BREAK("block.cherry_leaves.break"),
|
||||
BLOCK_CHERRY_LEAVES_FALL("block.cherry_leaves.fall"),
|
||||
BLOCK_CHERRY_LEAVES_HIT("block.cherry_leaves.hit"),
|
||||
BLOCK_CHERRY_LEAVES_PLACE("block.cherry_leaves.place"),
|
||||
BLOCK_CHERRY_LEAVES_STEP("block.cherry_leaves.step"),
|
||||
BLOCK_CHERRY_SAPLING_BREAK("block.cherry_sapling.break"),
|
||||
BLOCK_CHERRY_SAPLING_FALL("block.cherry_sapling.fall"),
|
||||
BLOCK_CHERRY_SAPLING_HIT("block.cherry_sapling.hit"),
|
||||
BLOCK_CHERRY_SAPLING_PLACE("block.cherry_sapling.place"),
|
||||
BLOCK_CHERRY_SAPLING_STEP("block.cherry_sapling.step"),
|
||||
BLOCK_CHERRY_WOOD_BREAK("block.cherry_wood.break"),
|
||||
BLOCK_CHERRY_WOOD_BUTTON_CLICK_OFF("block.cherry_wood_button.click_off"),
|
||||
BLOCK_CHERRY_WOOD_BUTTON_CLICK_ON("block.cherry_wood_button.click_on"),
|
||||
BLOCK_CHERRY_WOOD_DOOR_CLOSE("block.cherry_wood_door.close"),
|
||||
BLOCK_CHERRY_WOOD_DOOR_OPEN("block.cherry_wood_door.open"),
|
||||
BLOCK_CHERRY_WOOD_FALL("block.cherry_wood.fall"),
|
||||
BLOCK_CHERRY_WOOD_FENCE_GATE_CLOSE("block.cherry_wood_fence_gate.close"),
|
||||
BLOCK_CHERRY_WOOD_FENCE_GATE_OPEN("block.cherry_wood_fence_gate.open"),
|
||||
BLOCK_CHERRY_WOOD_HANGING_SIGN_BREAK("block.cherry_wood_hanging_sign.break"),
|
||||
BLOCK_CHERRY_WOOD_HANGING_SIGN_FALL("block.cherry_wood_hanging_sign.fall"),
|
||||
BLOCK_CHERRY_WOOD_HANGING_SIGN_HIT("block.cherry_wood_hanging_sign.hit"),
|
||||
BLOCK_CHERRY_WOOD_HANGING_SIGN_PLACE("block.cherry_wood_hanging_sign.place"),
|
||||
BLOCK_CHERRY_WOOD_HANGING_SIGN_STEP("block.cherry_wood_hanging_sign.step"),
|
||||
BLOCK_CHERRY_WOOD_HIT("block.cherry_wood.hit"),
|
||||
BLOCK_CHERRY_WOOD_PLACE("block.cherry_wood.place"),
|
||||
BLOCK_CHERRY_WOOD_PRESSURE_PLATE_CLICK_OFF("block.cherry_wood_pressure_plate.click_off"),
|
||||
BLOCK_CHERRY_WOOD_PRESSURE_PLATE_CLICK_ON("block.cherry_wood_pressure_plate.click_on"),
|
||||
BLOCK_CHERRY_WOOD_STEP("block.cherry_wood.step"),
|
||||
BLOCK_CHERRY_WOOD_TRAPDOOR_CLOSE("block.cherry_wood_trapdoor.close"),
|
||||
BLOCK_CHERRY_WOOD_TRAPDOOR_OPEN("block.cherry_wood_trapdoor.open"),
|
||||
BLOCK_CHEST_CLOSE("block.chest.close"),
|
||||
BLOCK_CHEST_LOCKED("block.chest.locked"),
|
||||
BLOCK_CHEST_OPEN("block.chest.open"),
|
||||
|
@ -193,6 +223,12 @@ public enum Sound implements Keyed {
|
|||
BLOCK_CORAL_BLOCK_PLACE("block.coral_block.place"),
|
||||
BLOCK_CORAL_BLOCK_STEP("block.coral_block.step"),
|
||||
BLOCK_CROP_BREAK("block.crop.break"),
|
||||
BLOCK_DECORATED_POT_BREAK("block.decorated_pot.break"),
|
||||
BLOCK_DECORATED_POT_FALL("block.decorated_pot.fall"),
|
||||
BLOCK_DECORATED_POT_HIT("block.decorated_pot.hit"),
|
||||
BLOCK_DECORATED_POT_PLACE("block.decorated_pot.place"),
|
||||
BLOCK_DECORATED_POT_SHATTER("block.decorated_pot.shatter"),
|
||||
BLOCK_DECORATED_POT_STEP("block.decorated_pot.step"),
|
||||
BLOCK_DEEPSLATE_BREAK("block.deepslate.break"),
|
||||
BLOCK_DEEPSLATE_BRICKS_BREAK("block.deepslate_bricks.break"),
|
||||
BLOCK_DEEPSLATE_BRICKS_FALL("block.deepslate_bricks.fall"),
|
||||
|
@ -434,6 +470,11 @@ 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_PINK_PETALS_BREAK("block.pink_petals.break"),
|
||||
BLOCK_PINK_PETALS_FALL("block.pink_petals.fall"),
|
||||
BLOCK_PINK_PETALS_HIT("block.pink_petals.hit"),
|
||||
BLOCK_PINK_PETALS_PLACE("block.pink_petals.place"),
|
||||
BLOCK_PINK_PETALS_STEP("block.pink_petals.step"),
|
||||
BLOCK_PISTON_CONTRACT("block.piston.contract"),
|
||||
BLOCK_PISTON_EXTEND("block.piston.extend"),
|
||||
BLOCK_POINTED_DRIPSTONE_BREAK("block.pointed_dripstone.break"),
|
||||
|
@ -571,6 +612,11 @@ public enum Sound implements Keyed {
|
|||
BLOCK_STONE_PRESSURE_PLATE_CLICK_OFF("block.stone_pressure_plate.click_off"),
|
||||
BLOCK_STONE_PRESSURE_PLATE_CLICK_ON("block.stone_pressure_plate.click_on"),
|
||||
BLOCK_STONE_STEP("block.stone.step"),
|
||||
BLOCK_SUSPICIOUS_SAND_BREAK("block.suspicious_sand.break"),
|
||||
BLOCK_SUSPICIOUS_SAND_FALL("block.suspicious_sand.fall"),
|
||||
BLOCK_SUSPICIOUS_SAND_HIT("block.suspicious_sand.hit"),
|
||||
BLOCK_SUSPICIOUS_SAND_PLACE("block.suspicious_sand.place"),
|
||||
BLOCK_SUSPICIOUS_SAND_STEP("block.suspicious_sand.step"),
|
||||
BLOCK_SWEET_BERRY_BUSH_BREAK("block.sweet_berry_bush.break"),
|
||||
BLOCK_SWEET_BERRY_BUSH_PICK_BERRIES("block.sweet_berry_bush.pick_berries"),
|
||||
BLOCK_SWEET_BERRY_BUSH_PLACE("block.sweet_berry_bush.place"),
|
||||
|
@ -1113,6 +1159,18 @@ public enum Sound implements Keyed {
|
|||
ENTITY_SLIME_JUMP_SMALL("entity.slime.jump_small"),
|
||||
ENTITY_SLIME_SQUISH("entity.slime.squish"),
|
||||
ENTITY_SLIME_SQUISH_SMALL("entity.slime.squish_small"),
|
||||
ENTITY_SNIFFER_DEATH("entity.sniffer.death"),
|
||||
ENTITY_SNIFFER_DIGGING("entity.sniffer.digging"),
|
||||
ENTITY_SNIFFER_DIGGING_STOP("entity.sniffer.digging_stop"),
|
||||
ENTITY_SNIFFER_DROP_SEED("entity.sniffer.drop_seed"),
|
||||
ENTITY_SNIFFER_EAT("entity.sniffer.eat"),
|
||||
ENTITY_SNIFFER_HAPPY("entity.sniffer.happy"),
|
||||
ENTITY_SNIFFER_HURT("entity.sniffer.hurt"),
|
||||
ENTITY_SNIFFER_IDLE("entity.sniffer.idle"),
|
||||
ENTITY_SNIFFER_SCENTING("entity.sniffer.scenting"),
|
||||
ENTITY_SNIFFER_SEARCHING("entity.sniffer.searching"),
|
||||
ENTITY_SNIFFER_SNIFFING("entity.sniffer.sniffing"),
|
||||
ENTITY_SNIFFER_STEP("entity.sniffer.step"),
|
||||
ENTITY_SNOWBALL_THROW("entity.snowball.throw"),
|
||||
ENTITY_SNOW_GOLEM_AMBIENT("entity.snow_golem.ambient"),
|
||||
ENTITY_SNOW_GOLEM_DEATH("entity.snow_golem.death"),
|
||||
|
@ -1276,6 +1334,7 @@ public enum Sound implements Keyed {
|
|||
ENTITY_ZOMBIFIED_PIGLIN_DEATH("entity.zombified_piglin.death"),
|
||||
ENTITY_ZOMBIFIED_PIGLIN_HURT("entity.zombified_piglin.hurt"),
|
||||
EVENT_RAID_HORN("event.raid.horn"),
|
||||
INTENTIONALLY_EMPTY("intentionally_empty"),
|
||||
ITEM_ARMOR_EQUIP_CHAIN("item.armor.equip_chain"),
|
||||
ITEM_ARMOR_EQUIP_DIAMOND("item.armor.equip_diamond"),
|
||||
ITEM_ARMOR_EQUIP_ELYTRA("item.armor.equip_elytra"),
|
||||
|
@ -1294,6 +1353,8 @@ public enum Sound implements Keyed {
|
|||
ITEM_BOTTLE_EMPTY("item.bottle.empty"),
|
||||
ITEM_BOTTLE_FILL("item.bottle.fill"),
|
||||
ITEM_BOTTLE_FILL_DRAGONBREATH("item.bottle.fill_dragonbreath"),
|
||||
ITEM_BRUSH_BRUSHING("item.brush.brushing"),
|
||||
ITEM_BRUSH_BRUSH_SAND_COMPLETED("item.brush.brush_sand_completed"),
|
||||
ITEM_BUCKET_EMPTY("item.bucket.empty"),
|
||||
ITEM_BUCKET_EMPTY_AXOLOTL("item.bucket.empty_axolotl"),
|
||||
ITEM_BUCKET_EMPTY_FISH("item.bucket.empty_fish"),
|
||||
|
@ -1379,6 +1440,7 @@ public enum Sound implements Keyed {
|
|||
MUSIC_NETHER_NETHER_WASTES("music.nether.nether_wastes"),
|
||||
MUSIC_NETHER_SOUL_SAND_VALLEY("music.nether.soul_sand_valley"),
|
||||
MUSIC_NETHER_WARPED_FOREST("music.nether.warped_forest"),
|
||||
MUSIC_OVERWORLD_CHERRY_GROVE("music.overworld.cherry_grove"),
|
||||
MUSIC_OVERWORLD_DEEP_DARK("music.overworld.deep_dark"),
|
||||
MUSIC_OVERWORLD_DRIPSTONE_CAVES("music.overworld.dripstone_caves"),
|
||||
MUSIC_OVERWORLD_FROZEN_PEAKS("music.overworld.frozen_peaks"),
|
||||
|
|
|
@ -115,6 +115,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla block tag representing all acacia log and bark variants.
|
||||
*/
|
||||
Tag<Material> ACACIA_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("acacia_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all cherry log and bark variants.
|
||||
*/
|
||||
Tag<Material> CHERRY_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cherry_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all jungle log and bark variants.
|
||||
*/
|
||||
|
@ -147,6 +151,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla block tag representing all sand blocks.
|
||||
*/
|
||||
Tag<Material> SAND = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sand"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all blocks which smelt to glass in a furnace.
|
||||
*/
|
||||
Tag<Material> SMELTS_TO_GLASS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("smelts_to_glass"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all stairs.
|
||||
*/
|
||||
|
@ -676,6 +684,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla block tag representing blocks which cannot be dismounted into.
|
||||
*/
|
||||
Tag<Material> INVALID_SPAWN_INSIDE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("invalid_spawn_inside"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing blocks which can be dug by sniffers.
|
||||
*/
|
||||
Tag<Material> SNIFFER_DIGGABLE_BLOCK = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sniffer_diggable_block"), Material.class);
|
||||
/**
|
||||
* Key for the built in item registry.
|
||||
*/
|
||||
|
@ -761,6 +773,58 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* interacted with.
|
||||
*/
|
||||
Tag<Material> ITEMS_CREEPER_IGNITERS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("creeper_igniters"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items which modify note block sounds when placed on top.
|
||||
*/
|
||||
Tag<Material> ITEMS_NOTE_BLOCK_TOP_INSTRUMENTS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("noteblock_top_instruments"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all trimmable armor items.
|
||||
*/
|
||||
Tag<Material> ITEMS_TRIMMABLE_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("trimmable_armor"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all materials which can be used for trimming armor.
|
||||
*/
|
||||
Tag<Material> ITEMS_TRIM_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("trim_materials"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all trimming templates.
|
||||
*/
|
||||
Tag<Material> ITEMS_TRIM_TEMPLATES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("trim_templates"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all food for sniffers.
|
||||
*/
|
||||
Tag<Material> ITEMS_SNIFFER_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("sniffer_food"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all decorated pot shards.
|
||||
*/
|
||||
Tag<Material> ITEMS_DECORATED_POT_SHARDS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("decorated_pot_shards"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all swords.
|
||||
*/
|
||||
Tag<Material> ITEMS_SWORDS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("swords"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all axes.
|
||||
*/
|
||||
Tag<Material> ITEMS_AXES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("axes"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all hoes.
|
||||
*/
|
||||
Tag<Material> ITEMS_HOES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("hoes"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all pickaxes.
|
||||
*/
|
||||
Tag<Material> ITEMS_PICKAXES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("pickaxes"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all shovels.
|
||||
*/
|
||||
Tag<Material> ITEMS_SHOVELS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("shovels"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all tools.
|
||||
*/
|
||||
Tag<Material> ITEMS_TOOLS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("tools"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all item which break decorated pots.
|
||||
*/
|
||||
Tag<Material> ITEMS_BREAKS_DECORATED_POTS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("breaks_decorated_pots"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all items that confer freeze immunity on
|
||||
* the wearer.
|
||||
|
@ -835,6 +899,14 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||
* Vanilla tag representing entities which can be eaten by frogs.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_FROG_FOOD = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("frog_food"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing entities which are immune from fall damage.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_FALL_DAMAGE_IMMUNE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("fall_damage_immune"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing entities which are dismounted when underwater.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_DISMOUNTS_UNDERWATER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("dismounts_underwater"), EntityType.class);
|
||||
|
||||
/**
|
||||
* Returns whether or not this tag has an entry for the specified item.
|
||||
|
|
|
@ -93,4 +93,8 @@ public enum TreeType {
|
|||
* Tall mangrove tree
|
||||
*/
|
||||
TALL_MANGROVE,
|
||||
/**
|
||||
* Cherry tree
|
||||
*/
|
||||
CHERRY,
|
||||
}
|
||||
|
|
34
paper-api/src/main/java/org/bukkit/block/DecoratedPot.java
Normal file
34
paper-api/src/main/java/org/bukkit/block/DecoratedPot.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import java.util.List;
|
||||
import org.bukkit.Material;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a decorated pot.
|
||||
*/
|
||||
public interface DecoratedPot extends TileState {
|
||||
|
||||
/**
|
||||
* Gets the shards which will be dropped when this pot is broken.
|
||||
*
|
||||
* @return shards
|
||||
*/
|
||||
@NotNull
|
||||
public List<Material> getShards();
|
||||
|
||||
/**
|
||||
* Add a shard item which will be dropped when this pot is broken.
|
||||
*
|
||||
* @param material shard item
|
||||
*/
|
||||
public void addShard(@NotNull Material material);
|
||||
|
||||
/**
|
||||
* Set the shards which will be dropped when this pot is broken.
|
||||
*
|
||||
* @param shard list of items
|
||||
*/
|
||||
public void setShards(@Nullable List<Material> shard);
|
||||
}
|
28
paper-api/src/main/java/org/bukkit/block/SuspiciousSand.java
Normal file
28
paper-api/src/main/java/org/bukkit/block/SuspiciousSand.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.loot.Lootable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of suspicious sand.
|
||||
*/
|
||||
public interface SuspiciousSand extends Lootable, TileState {
|
||||
|
||||
/**
|
||||
* Get the item which will be revealed when the sand is fully brushed away
|
||||
* and uncovered.
|
||||
*
|
||||
* @return the item
|
||||
*/
|
||||
@Nullable
|
||||
public ItemStack getItem();
|
||||
|
||||
/**
|
||||
* Sets the item which will be revealed when the sand is fully brushed away
|
||||
* and uncovered.
|
||||
*
|
||||
* @param item the item
|
||||
*/
|
||||
public void setItem(@Nullable ItemStack item);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface DecoratedPot extends Directional, Waterlogged {
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'flower_amount' represents the number of petals.
|
||||
*/
|
||||
public interface PinkPetals extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'flower_amount' property.
|
||||
*
|
||||
* @return the 'flower_amount' value
|
||||
*/
|
||||
int getFlowerAmount();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'flower_amount' property.
|
||||
*
|
||||
* @param flower_amount the new 'flower_amount' value
|
||||
*/
|
||||
void setFlowerAmount(int flower_amount);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'flower_amount' property.
|
||||
*
|
||||
* @return the maximum 'flower_amount' value
|
||||
*/
|
||||
int getMaximumFlowerAmount();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'dusted' represents how far uncovered by brush the block is.
|
||||
*/
|
||||
public interface SuspiciousSand extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'dusted' property.
|
||||
*
|
||||
* @return the 'dusted' value
|
||||
*/
|
||||
int getDusted();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'dusted' property.
|
||||
*
|
||||
* @param dusted the new 'dusted' value
|
||||
*/
|
||||
void setDusted(int dusted);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'dusted' property.
|
||||
*
|
||||
* @return the maximum 'dusted' value
|
||||
*/
|
||||
int getMaximumDusted();
|
||||
}
|
|
@ -56,16 +56,16 @@ public class YamlConfiguration extends FileConfiguration {
|
|||
private final Yaml yaml;
|
||||
|
||||
public YamlConfiguration() {
|
||||
constructor = new YamlConstructor();
|
||||
representer = new YamlRepresenter();
|
||||
representer.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
|
||||
yamlDumperOptions = new DumperOptions();
|
||||
yamlDumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
yamlLoaderOptions = new LoaderOptions();
|
||||
yamlLoaderOptions.setMaxAliasesForCollections(Integer.MAX_VALUE); // SPIGOT-5881: Not ideal, but was default pre SnakeYAML 1.26
|
||||
yamlLoaderOptions.setCodePointLimit(Integer.MAX_VALUE); // SPIGOT-7161: Not ideal, but was default pre SnakeYAML 1.32
|
||||
|
||||
constructor = new YamlConstructor(yamlLoaderOptions);
|
||||
representer = new YamlRepresenter(yamlDumperOptions);
|
||||
representer.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
|
||||
yaml = new Yaml(constructor, representer, yamlDumperOptions, yamlLoaderOptions);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Map;
|
|||
import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
import org.yaml.snakeyaml.nodes.MappingNode;
|
||||
|
@ -13,7 +14,16 @@ import org.yaml.snakeyaml.nodes.Tag;
|
|||
|
||||
public class YamlConstructor extends SafeConstructor {
|
||||
|
||||
/**
|
||||
* @deprecated options required
|
||||
*/
|
||||
@Deprecated
|
||||
public YamlConstructor() {
|
||||
this(new LoaderOptions());
|
||||
}
|
||||
|
||||
public YamlConstructor(@NotNull LoaderOptions loaderOptions) {
|
||||
super(loaderOptions);
|
||||
this.yamlConstructors.put(Tag.MAP, new ConstructCustomObject());
|
||||
}
|
||||
|
||||
|
|
|
@ -6,12 +6,22 @@ import org.bukkit.configuration.ConfigurationSection;
|
|||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
import org.yaml.snakeyaml.nodes.Node;
|
||||
import org.yaml.snakeyaml.representer.Representer;
|
||||
|
||||
public class YamlRepresenter extends Representer {
|
||||
|
||||
/**
|
||||
* @deprecated options required
|
||||
*/
|
||||
@Deprecated
|
||||
public YamlRepresenter() {
|
||||
this(new DumperOptions());
|
||||
}
|
||||
|
||||
public YamlRepresenter(@NotNull DumperOptions options) {
|
||||
super(options);
|
||||
this.multiRepresenters.put(ConfigurationSection.class, new RepresentConfigurationSection());
|
||||
this.multiRepresenters.put(ConfigurationSerializable.class, new RepresentConfigurationSerializable());
|
||||
// SPIGOT-6234: We could just switch YamlConstructor to extend Constructor rather than SafeConstructor, however there is a very small risk of issues with plugins treating config as untrusted input
|
||||
|
|
|
@ -195,7 +195,8 @@ public enum EnchantmentTarget {
|
|||
|| item.equals(Material.PIGLIN_HEAD)
|
||||
|| item.equals(Material.PLAYER_HEAD)
|
||||
|| item.equals(Material.CREEPER_HEAD)
|
||||
|| item.equals(Material.DRAGON_HEAD);
|
||||
|| item.equals(Material.DRAGON_HEAD)
|
||||
|| item.equals(Material.SHIELD);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
25
paper-api/src/main/java/org/bukkit/entity/BlockDisplay.java
Normal file
25
paper-api/src/main/java/org/bukkit/entity/BlockDisplay.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a block display entity.
|
||||
*/
|
||||
public interface BlockDisplay extends Display {
|
||||
|
||||
/**
|
||||
* Gets the displayed block.
|
||||
*
|
||||
* @return the displayed block
|
||||
*/
|
||||
@NotNull
|
||||
public BlockData getBlock();
|
||||
|
||||
/**
|
||||
* Sets the displayed block.
|
||||
*
|
||||
* @param block the new block
|
||||
*/
|
||||
public void setBlock(@NotNull BlockData block);
|
||||
}
|
|
@ -141,6 +141,7 @@ public interface Boat extends Vehicle {
|
|||
BIRCH(Material.BIRCH_PLANKS),
|
||||
JUNGLE(Material.JUNGLE_PLANKS),
|
||||
ACACIA(Material.ACACIA_PLANKS),
|
||||
CHERRY(Material.CHERRY_PLANKS),
|
||||
DARK_OAK(Material.DARK_OAK_PLANKS),
|
||||
MANGROVE(Material.MANGROVE_PLANKS),
|
||||
BAMBOO(Material.BAMBOO_PLANKS),
|
||||
|
|
267
paper-api/src/main/java/org/bukkit/entity/Display.java
Normal file
267
paper-api/src/main/java/org/bukkit/entity/Display.java
Normal file
|
@ -0,0 +1,267 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.util.Transformation;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a display entity which is designed to only have a visual function.
|
||||
*/
|
||||
public interface Display extends Entity {
|
||||
|
||||
/**
|
||||
* Gets the transformation applied to this display.
|
||||
*
|
||||
* @return the transformation
|
||||
*/
|
||||
@NotNull
|
||||
public Transformation getTransformation();
|
||||
|
||||
/**
|
||||
* Sets the transformation applied to this display
|
||||
*
|
||||
* @param transformation the new transformation
|
||||
*/
|
||||
public void setTransformation(@NotNull Transformation transformation);
|
||||
|
||||
/**
|
||||
* Gets the interpolation duration of this display.
|
||||
*
|
||||
* @return interpolation duration
|
||||
*/
|
||||
public int getInterpolationDuration();
|
||||
|
||||
/**
|
||||
* Sets the interpolation duration of this display.
|
||||
*
|
||||
* @param duration new duration
|
||||
*/
|
||||
public void setInterpolationDuration(int duration);
|
||||
|
||||
/**
|
||||
* Gets the view distance/range of this display.
|
||||
*
|
||||
* @return view range
|
||||
*/
|
||||
public float getViewRange();
|
||||
|
||||
/**
|
||||
* Sets the view distance/range of this display.
|
||||
*
|
||||
* @param range new range
|
||||
*/
|
||||
public void setViewRange(float range);
|
||||
|
||||
/**
|
||||
* Gets the shadow radius of this display.
|
||||
*
|
||||
* @return radius
|
||||
*/
|
||||
public float getShadowRadius();
|
||||
|
||||
/**
|
||||
* Sets the shadow radius of this display.
|
||||
*
|
||||
* @param radius new radius
|
||||
*/
|
||||
public void setShadowRadius(float radius);
|
||||
|
||||
/**
|
||||
* Gets the shadow strength of this display.
|
||||
*
|
||||
* @return shadow strength
|
||||
*/
|
||||
public float getShadowStrength();
|
||||
|
||||
/**
|
||||
* Sets the shadow strength of this display.
|
||||
*
|
||||
* @param strength new strength
|
||||
*/
|
||||
public void setShadowStrength(float strength);
|
||||
|
||||
/**
|
||||
* Gets the width of this display.
|
||||
*
|
||||
* @return width
|
||||
*/
|
||||
public float getDisplayWidth();
|
||||
|
||||
/**
|
||||
* Sets the width of this display.
|
||||
*
|
||||
* @param width new width
|
||||
*/
|
||||
public void setDisplayWidth(float width);
|
||||
|
||||
/**
|
||||
* Gets the height of this display.
|
||||
*
|
||||
* @return height
|
||||
*/
|
||||
public float getDisplayHeight();
|
||||
|
||||
/**
|
||||
* Sets the height if this display.
|
||||
*
|
||||
* @param height new height
|
||||
*/
|
||||
public void setDisplayHeight(float height);
|
||||
|
||||
/**
|
||||
* Gets the amount of ticks before client-side interpolation will commence.
|
||||
*
|
||||
* @return interpolation delay ticks
|
||||
*/
|
||||
public int getInterpolationDelay();
|
||||
|
||||
/**
|
||||
* Sets the amount of ticks before client-side interpolation will commence.
|
||||
*
|
||||
* @param ticks interpolation delay ticks
|
||||
*/
|
||||
public void setInterpolationDelay(int ticks);
|
||||
|
||||
/**
|
||||
* Gets the billboard setting of this entity.
|
||||
*
|
||||
* The billboard setting controls the automatic rotation of the entity to
|
||||
* face the player.
|
||||
*
|
||||
* @return billboard setting
|
||||
*/
|
||||
@NotNull
|
||||
public Billboard getBillboard();
|
||||
|
||||
/**
|
||||
* Sets the billboard setting of this entity.
|
||||
*
|
||||
* The billboard setting controls the automatic rotation of the entity to
|
||||
* face the player.
|
||||
*
|
||||
* @param billboard new setting
|
||||
*/
|
||||
@NotNull
|
||||
public void setBillboard(@NotNull Billboard billboard);
|
||||
|
||||
/**
|
||||
* Gets the scoreboard team overridden glow color of this display.
|
||||
*
|
||||
* @return glow color
|
||||
*/
|
||||
@Nullable
|
||||
public Color getGlowColorOverride();
|
||||
|
||||
/**
|
||||
* Sets the scoreboard team overridden glow color of this display.
|
||||
*
|
||||
* @param color new color
|
||||
*/
|
||||
public void setGlowColorOverride(@Nullable Color color);
|
||||
|
||||
/**
|
||||
* Gets the brightness override of the entity.
|
||||
*
|
||||
* @return brightness override, if set
|
||||
*/
|
||||
@Nullable
|
||||
public Brightness getBrightness();
|
||||
|
||||
/**
|
||||
* Sets the brightness override of the entity.
|
||||
*
|
||||
* @param brightness new brightness override
|
||||
*/
|
||||
public void setBrightness(@Nullable Brightness brightness);
|
||||
|
||||
/**
|
||||
* Describes the axes/points around which the entity can pivot.
|
||||
*/
|
||||
public enum Billboard {
|
||||
|
||||
/**
|
||||
* No rotation (default).
|
||||
*/
|
||||
FIXED,
|
||||
/**
|
||||
* Can pivot around vertical axis.
|
||||
*/
|
||||
VERTICAL,
|
||||
/**
|
||||
* Can pivot around horizontal axis.
|
||||
*/
|
||||
HORIZONTAL,
|
||||
/**
|
||||
* Can pivot around center point.
|
||||
*/
|
||||
CENTER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the brightness rendering parameters of the entity.
|
||||
*/
|
||||
public static class Brightness {
|
||||
|
||||
private final int blockLight;
|
||||
private final int skyLight;
|
||||
|
||||
public Brightness(int blockLight, int skyLight) {
|
||||
Preconditions.checkArgument(0 <= blockLight && blockLight <= 15, "Block brightness out of range: %s", blockLight);
|
||||
Preconditions.checkArgument(0 <= skyLight && skyLight <= 15, "Sky brightness out of range: %s", skyLight);
|
||||
|
||||
this.blockLight = blockLight;
|
||||
this.skyLight = skyLight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the block lighting component of this brightness.
|
||||
*
|
||||
* @return block light, between 0-15
|
||||
*/
|
||||
public int getBlockLight() {
|
||||
return this.blockLight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the sky lighting component of this brightness.
|
||||
*
|
||||
* @return sky light, between 0-15
|
||||
*/
|
||||
public int getSkyLight() {
|
||||
return this.skyLight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 47 * hash + this.blockLight;
|
||||
hash = 47 * hash + this.skyLight;
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Brightness other = (Brightness) obj;
|
||||
if (this.blockLight != other.blockLight) {
|
||||
return false;
|
||||
}
|
||||
return this.skyLight == other.skyLight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Brightness{" + "blockLight=" + this.blockLight + ", skyLight=" + this.skyLight + '}';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -279,6 +279,11 @@ public enum EntityType implements Keyed, Translatable {
|
|||
TADPOLE("tadpole", Tadpole.class, -1),
|
||||
WARDEN("warden", Warden.class, -1),
|
||||
CAMEL("camel", Camel.class, -1),
|
||||
BLOCK_DISPLAY("block_display", BlockDisplay.class, -1),
|
||||
INTERACTION("interaction", Interaction.class, -1),
|
||||
ITEM_DISPLAY("item_display", ItemDisplay.class, -1),
|
||||
SNIFFER("sniffer", Sniffer.class, -1),
|
||||
TEXT_DISPLAY("text_display", TextDisplay.class, -1),
|
||||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
|
|
92
paper-api/src/main/java/org/bukkit/entity/Interaction.java
Normal file
92
paper-api/src/main/java/org/bukkit/entity/Interaction.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents an entity designed to only record interactions.
|
||||
*/
|
||||
public interface Interaction extends Entity {
|
||||
|
||||
/**
|
||||
* Gets the width of this interaction entity.
|
||||
*
|
||||
* @return width
|
||||
*/
|
||||
public float getInteractionWidth();
|
||||
|
||||
/**
|
||||
* Sets the width of this interaction entity.
|
||||
*
|
||||
* @param width new width
|
||||
*/
|
||||
public void setInteractionWidth(float width);
|
||||
|
||||
/**
|
||||
* Gets the height of this interaction entity.
|
||||
*
|
||||
* @return height
|
||||
*/
|
||||
public float getInteractionHeight();
|
||||
|
||||
/**
|
||||
* Sets the height of this interaction entity.
|
||||
*
|
||||
* @param height new height
|
||||
*/
|
||||
public void setInteractionHeight(float height);
|
||||
|
||||
/**
|
||||
* Gets if this interaction entity should trigger a response when interacted
|
||||
* with.
|
||||
*
|
||||
* @return response setting
|
||||
*/
|
||||
public boolean isResponsive();
|
||||
|
||||
/**
|
||||
* Sets if this interaction entity should trigger a response when interacted
|
||||
* with.
|
||||
*
|
||||
* @param response new setting
|
||||
*/
|
||||
public void setResponsive(boolean response);
|
||||
|
||||
/**
|
||||
* Gets the last attack on this interaction entity.
|
||||
*
|
||||
* @return last attack data, if present
|
||||
*/
|
||||
@Nullable
|
||||
public PreviousInteraction getLastAttack();
|
||||
|
||||
/**
|
||||
* Gets the last interaction on this entity.
|
||||
*
|
||||
* @return last interaction data, if present
|
||||
*/
|
||||
@Nullable
|
||||
public PreviousInteraction getLastInteraction();
|
||||
|
||||
/**
|
||||
* Represents a previous interaction with this entity.
|
||||
*/
|
||||
public interface PreviousInteraction {
|
||||
|
||||
/**
|
||||
* Get the previous interacting player.
|
||||
*
|
||||
* @return interacting player
|
||||
*/
|
||||
@NotNull
|
||||
public OfflinePlayer getPlayer();
|
||||
|
||||
/**
|
||||
* Gets the Unix timestamp at when this interaction occurred.
|
||||
*
|
||||
* @return interaction timestamp
|
||||
*/
|
||||
public long getTimestamp();
|
||||
}
|
||||
}
|
61
paper-api/src/main/java/org/bukkit/entity/ItemDisplay.java
Normal file
61
paper-api/src/main/java/org/bukkit/entity/ItemDisplay.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents an item display entity.
|
||||
*/
|
||||
public interface ItemDisplay extends Display {
|
||||
|
||||
/**
|
||||
* Gets the displayed item stack.
|
||||
*
|
||||
* @return the displayed item stack
|
||||
*/
|
||||
@Nullable
|
||||
ItemStack getItemStack();
|
||||
|
||||
/**
|
||||
* Sets the displayed item stack.
|
||||
*
|
||||
* @param item the new item stack
|
||||
*/
|
||||
void setItemStack(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Gets the item display transform for this entity.
|
||||
*
|
||||
* Defaults to {@link ItemDisplayTransform#FIXED}.
|
||||
*
|
||||
* @return item display transform
|
||||
*/
|
||||
@NotNull
|
||||
ItemDisplayTransform getItemDisplayTransform();
|
||||
|
||||
/**
|
||||
* Sets the item display transform for this entity.
|
||||
*
|
||||
* Defaults to {@link ItemDisplayTransform#FIXED}.
|
||||
*
|
||||
* @param display new display
|
||||
*/
|
||||
void setItemDisplayTransform(@NotNull ItemDisplayTransform display);
|
||||
|
||||
/**
|
||||
* Represents the item model transform to be applied to the displayed item.
|
||||
*/
|
||||
public enum ItemDisplayTransform {
|
||||
|
||||
NONE,
|
||||
THIRDPERSON_LEFTHAND,
|
||||
THIRDPERSON_RIGHTHAND,
|
||||
FIRSTPERSON_LEFTHAND,
|
||||
FIRSTPERSON_RIGHTHAND,
|
||||
HEAD,
|
||||
GUI,
|
||||
GROUND,
|
||||
FIXED;
|
||||
}
|
||||
}
|
8
paper-api/src/main/java/org/bukkit/entity/Sniffer.java
Normal file
8
paper-api/src/main/java/org/bukkit/entity/Sniffer.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Sniffer.
|
||||
*/
|
||||
public interface Sniffer extends Animals {
|
||||
|
||||
}
|
145
paper-api/src/main/java/org/bukkit/entity/TextDisplay.java
Normal file
145
paper-api/src/main/java/org/bukkit/entity/TextDisplay.java
Normal file
|
@ -0,0 +1,145 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a text display entity.
|
||||
*/
|
||||
public interface TextDisplay extends Display {
|
||||
|
||||
/**
|
||||
* Gets the displayed text.
|
||||
*
|
||||
* @return the displayed text.
|
||||
*/
|
||||
@Nullable
|
||||
String getText();
|
||||
|
||||
/**
|
||||
* Sets the displayed text.
|
||||
*
|
||||
* @param text the new text
|
||||
*/
|
||||
void setText(@Nullable String text);
|
||||
|
||||
/**
|
||||
* Gets the maximum line width before wrapping.
|
||||
*
|
||||
* @return the line width
|
||||
*/
|
||||
int getLineWidth();
|
||||
|
||||
/**
|
||||
* Sets the maximum line width before wrapping.
|
||||
*
|
||||
* @param width new line width
|
||||
*/
|
||||
void setLineWidth(int width);
|
||||
|
||||
/**
|
||||
* Gets the text background color.
|
||||
*
|
||||
* @return the background color
|
||||
*/
|
||||
@Nullable
|
||||
Color getBackgroundColor();
|
||||
|
||||
/**
|
||||
* Sets the text background color.
|
||||
*
|
||||
* @param color new background color
|
||||
*/
|
||||
void setBackgroundColor(@Nullable Color color);
|
||||
|
||||
/**
|
||||
* Gets the text opacity.
|
||||
*
|
||||
* @return opacity or -1 if not set
|
||||
*/
|
||||
byte getTextOpacity();
|
||||
|
||||
/**
|
||||
* Sets the text opacity.
|
||||
*
|
||||
* @param opacity new opacity or -1 if default
|
||||
*/
|
||||
void setTextOpacity(byte opacity);
|
||||
|
||||
/**
|
||||
* Gets if the text is shadowed.
|
||||
*
|
||||
* @return shadow status
|
||||
*/
|
||||
boolean isShadowed();
|
||||
|
||||
/**
|
||||
* Sets if the text is shadowed.
|
||||
*
|
||||
* @param shadow if shadowed
|
||||
*/
|
||||
void setShadowed(boolean shadow);
|
||||
|
||||
/**
|
||||
* Gets if the text is see through.
|
||||
*
|
||||
* @return see through status
|
||||
*/
|
||||
boolean isSeeThrough();
|
||||
|
||||
/**
|
||||
* Sets if the text is see through.
|
||||
*
|
||||
* @param seeThrough if see through
|
||||
*/
|
||||
void setSeeThrough(boolean seeThrough);
|
||||
|
||||
/**
|
||||
* Gets if the text has its default background.
|
||||
*
|
||||
* @return default background
|
||||
*/
|
||||
boolean isDefaultBackground();
|
||||
|
||||
/**
|
||||
* Sets if the text has its default background.
|
||||
*
|
||||
* @param defaultBackground if default
|
||||
*/
|
||||
void setDefaultBackground(boolean defaultBackground);
|
||||
|
||||
/**
|
||||
* Gets the text alignment for this display.
|
||||
*
|
||||
* @return text alignment
|
||||
*/
|
||||
@NotNull
|
||||
TextAligment getAlignment();
|
||||
|
||||
/**
|
||||
* Sets the text alignment for this display.
|
||||
*
|
||||
* @param alignment new alignment
|
||||
*/
|
||||
void setAlignment(@NotNull TextAligment alignment);
|
||||
|
||||
/**
|
||||
* Represents possible text alignments for this display.
|
||||
*/
|
||||
public enum TextAligment {
|
||||
|
||||
/**
|
||||
* Center aligned text (default).
|
||||
*/
|
||||
CENTER,
|
||||
/**
|
||||
* Left aligned text.
|
||||
*/
|
||||
LEFT,
|
||||
/**
|
||||
* Right aligned text.
|
||||
*/
|
||||
RIGHT;
|
||||
}
|
||||
}
|
|
@ -69,6 +69,7 @@ public final class MemoryKey<T> implements Keyed {
|
|||
public static final MemoryKey<Location> LIKED_NOTEBLOCK_POSITION = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock"), Location.class);
|
||||
public static final MemoryKey<Integer> LIKED_NOTEBLOCK_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock_cooldown_ticks"), Integer.class);
|
||||
public static final MemoryKey<Integer> ITEM_PICKUP_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("item_pickup_cooldown_ticks"), Integer.class);
|
||||
public static final MemoryKey<Location> SNIFFER_EXPLORED_POSITIONS = new MemoryKey<>(NamespacedKey.minecraft("sniffer_explored_positions"), Location.class);
|
||||
|
||||
/**
|
||||
* Returns a {@link MemoryKey} by a {@link NamespacedKey}.
|
||||
|
|
|
@ -138,6 +138,13 @@ public enum InventoryType {
|
|||
* Pseudo chiseled bookshelf inventory, with 6 slots of undefined type.
|
||||
*/
|
||||
CHISELED_BOOKSHELF(6, "Chiseled Bookshelf"),
|
||||
/**
|
||||
* The new smithing inventory, with 3 CRAFTING slots and 1 RESULT slot.
|
||||
*
|
||||
* @deprecated draft, experimental 1.20 API
|
||||
*/
|
||||
@Deprecated
|
||||
SMITHING_NEW(4, "Upgrade Gear"),
|
||||
;
|
||||
|
||||
private final int size;
|
||||
|
|
|
@ -388,6 +388,7 @@ public abstract class InventoryView {
|
|||
}
|
||||
break;
|
||||
case LOOM:
|
||||
case SMITHING_NEW:
|
||||
if (slot == 3) {
|
||||
type = InventoryType.SlotType.RESULT;
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
package org.bukkit.inventory;
|
||||
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a smithing transform recipe.
|
||||
*/
|
||||
public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
|
||||
private final RecipeChoice template;
|
||||
|
||||
/**
|
||||
* Create a smithing recipe to produce the specified result ItemStack.
|
||||
*
|
||||
* @param key The unique recipe key
|
||||
* @param result The item you want the recipe to create.
|
||||
* @param template The template item.
|
||||
* @param base The base ingredient
|
||||
* @param addition The addition ingredient
|
||||
*/
|
||||
public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
super(key, result, base, addition);
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the template recipe item.
|
||||
*
|
||||
* @return template choice
|
||||
*/
|
||||
@NotNull
|
||||
public RecipeChoice getTemplate() {
|
||||
return template.clone();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package org.bukkit.inventory;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a smithing trim recipe.
|
||||
*/
|
||||
public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe {
|
||||
|
||||
private final RecipeChoice template;
|
||||
|
||||
/**
|
||||
* Create a smithing recipe to produce the specified result ItemStack.
|
||||
*
|
||||
* @param key The unique recipe key
|
||||
* @param template The template item.
|
||||
* @param base The base ingredient
|
||||
* @param addition The addition ingredient
|
||||
*/
|
||||
public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
super(key, new ItemStack(Material.AIR), base, addition);
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the template recipe item.
|
||||
*
|
||||
* @return template choice
|
||||
*/
|
||||
@NotNull
|
||||
public RecipeChoice getTemplate() {
|
||||
return template.clone();
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ import org.bukkit.permissions.PermissionDefault;
|
|||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.AbstractConstruct;
|
||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||
|
@ -200,7 +201,7 @@ public final class PluginDescriptionFile {
|
|||
@Override
|
||||
@NotNull
|
||||
protected Yaml initialValue() {
|
||||
return new Yaml(new SafeConstructor() {
|
||||
return new Yaml(new SafeConstructor(new LoaderOptions()) {
|
||||
{
|
||||
yamlConstructors.put(null, new AbstractConstruct() {
|
||||
@NotNull
|
||||
|
|
126
paper-api/src/main/java/org/bukkit/util/Transformation.java
Normal file
126
paper-api/src/main/java/org/bukkit/util/Transformation.java
Normal file
|
@ -0,0 +1,126 @@
|
|||
package org.bukkit.util;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.util.Objects;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.joml.AxisAngle4f;
|
||||
import org.joml.Quaternionf;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
/**
|
||||
* Represents an arbitrary affine transformation.
|
||||
*/
|
||||
public class Transformation {
|
||||
|
||||
@NotNull
|
||||
private final Vector3f translation;
|
||||
@NotNull
|
||||
private final Quaternionf leftRotation;
|
||||
@NotNull
|
||||
private final Vector3f scale;
|
||||
@NotNull
|
||||
private final Quaternionf rightRotation;
|
||||
|
||||
public Transformation(@NotNull Vector3f translation, @NotNull AxisAngle4f leftRotation, @NotNull Vector3f scale, @NotNull AxisAngle4f rightRotation) {
|
||||
Preconditions.checkArgument(translation != null, "translation cannot be null");
|
||||
Preconditions.checkArgument(leftRotation != null, "leftRotation cannot be null");
|
||||
Preconditions.checkArgument(scale != null, "scale cannot be null");
|
||||
Preconditions.checkArgument(rightRotation != null, "rightRotation cannot be null");
|
||||
|
||||
this.translation = translation;
|
||||
this.leftRotation = new Quaternionf(leftRotation);
|
||||
this.scale = scale;
|
||||
this.rightRotation = new Quaternionf(rightRotation);
|
||||
}
|
||||
|
||||
public Transformation(@NotNull Vector3f translation, @NotNull Quaternionf leftRotation, @NotNull Vector3f scale, @NotNull Quaternionf rightRotation) {
|
||||
Preconditions.checkArgument(translation != null, "translation cannot be null");
|
||||
Preconditions.checkArgument(leftRotation != null, "leftRotation cannot be null");
|
||||
Preconditions.checkArgument(scale != null, "scale cannot be null");
|
||||
Preconditions.checkArgument(rightRotation != null, "rightRotation cannot be null");
|
||||
|
||||
this.translation = translation;
|
||||
this.leftRotation = leftRotation;
|
||||
this.scale = scale;
|
||||
this.rightRotation = rightRotation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the translation component of this transformation.
|
||||
*
|
||||
* @return translation component
|
||||
*/
|
||||
@NotNull
|
||||
public Vector3f getTranslation() {
|
||||
return this.translation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the left rotation component of this transformation.
|
||||
*
|
||||
* @return left rotation component
|
||||
*/
|
||||
@NotNull
|
||||
public Quaternionf getLeftRotation() {
|
||||
return this.leftRotation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scale component of this transformation.
|
||||
*
|
||||
* @return scale component
|
||||
*/
|
||||
@NotNull
|
||||
public Vector3f getScale() {
|
||||
return this.scale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the right rotation component of this transformation.
|
||||
*
|
||||
* @return right rotation component
|
||||
*/
|
||||
@NotNull
|
||||
public Quaternionf getRightRotation() {
|
||||
return this.rightRotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 11 * hash + Objects.hashCode(this.translation);
|
||||
hash = 11 * hash + Objects.hashCode(this.leftRotation);
|
||||
hash = 11 * hash + Objects.hashCode(this.scale);
|
||||
hash = 11 * hash + Objects.hashCode(this.rightRotation);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Transformation other = (Transformation) obj;
|
||||
if (!Objects.equals(this.translation, other.translation)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.leftRotation, other.leftRotation)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.scale, other.scale)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(this.rightRotation, other.rightRotation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Transformation{" + "translation=" + this.translation + ", leftRotation=" + this.leftRotation + ", scale=" + this.scale + ", rightRotation=" + this.rightRotation + '}';
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue