mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Fix API compile issues (#9269)
This commit is contained in:
parent
9ffb4e1b63
commit
e165710bb5
@ -1,275 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
||||||
Date: Thu, 8 Dec 2022 17:31:21 -0800
|
|
||||||
Subject: [PATCH] Actually mark mc experimental API as such
|
|
||||||
|
|
||||||
upstream has inconsistent and incomplete
|
|
||||||
minecraft experimental annotations
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Orientable}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
STRIPPED_BAMBOO_BLOCK(14799, Orientable.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Orientable}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Fence}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_FENCE(17207, Fence.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Fence}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Switch}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_BUTTON(21810, Switch.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Switch}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Powerable}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_PRESSURE_PLATE(26740, Powerable.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Powerable}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Door}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_DOOR(19971, Door.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Door}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link TrapDoor}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_TRAPDOOR(9174, TrapDoor.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link TrapDoor}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Gate}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_FENCE_GATE(14290, Gate.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Gate}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
DARK_OAK_CHEST_BOAT(8733, 1),
|
|
||||||
MANGROVE_BOAT(20792, 1),
|
|
||||||
MANGROVE_CHEST_BOAT(18572, 1),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_RAFT(25901, 1),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_CHEST_RAFT(20056, 1),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link StructureBlock}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Sign}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_SIGN(26139, 16, Sign.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link Sign}
|
|
||||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
|
||||||
/**
|
|
||||||
* BlockData: {@link WallSign}
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BAMBOO_WALL_SIGN(18857, 16, WallSign.class),
|
|
||||||
/**
|
|
||||||
* BlockData: {@link WallHangingSign}
|
|
||||||
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/Sound.java
|
|
||||||
+++ b/src/main/java/org/bukkit/Sound.java
|
|
||||||
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
|
|
||||||
BLOCK_BAMBOO_SAPLING_HIT("block.bamboo_sapling.hit"),
|
|
||||||
BLOCK_BAMBOO_SAPLING_PLACE("block.bamboo_sapling.place"),
|
|
||||||
BLOCK_BAMBOO_STEP("block.bamboo.step"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_BREAK("block.bamboo_wood.break"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_BUTTON_CLICK_OFF("block.bamboo_wood_button.click_off"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_BUTTON_CLICK_ON("block.bamboo_wood_button.click_on"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_DOOR_CLOSE("block.bamboo_wood_door.close"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_DOOR_OPEN("block.bamboo_wood_door.open"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_FALL("block.bamboo_wood.fall"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_FENCE_GATE_CLOSE("block.bamboo_wood_fence_gate.close"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_FENCE_GATE_OPEN("block.bamboo_wood_fence_gate.open"),
|
|
||||||
BLOCK_BAMBOO_WOOD_HANGING_SIGN_BREAK("block.bamboo_wood_hanging_sign.break"),
|
|
||||||
BLOCK_BAMBOO_WOOD_HANGING_SIGN_FALL("block.bamboo_wood_hanging_sign.fall"),
|
|
||||||
BLOCK_BAMBOO_WOOD_HANGING_SIGN_HIT("block.bamboo_wood_hanging_sign.hit"),
|
|
||||||
BLOCK_BAMBOO_WOOD_HANGING_SIGN_PLACE("block.bamboo_wood_hanging_sign.place"),
|
|
||||||
BLOCK_BAMBOO_WOOD_HANGING_SIGN_STEP("block.bamboo_wood_hanging_sign.step"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_HIT("block.bamboo_wood.hit"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_PLACE("block.bamboo_wood.place"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_PRESSURE_PLATE_CLICK_OFF("block.bamboo_wood_pressure_plate.click_off"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_PRESSURE_PLATE_CLICK_ON("block.bamboo_wood_pressure_plate.click_on"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_STEP("block.bamboo_wood.step"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_TRAPDOOR_CLOSE("block.bamboo_wood_trapdoor.close"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_BAMBOO_WOOD_TRAPDOOR_OPEN("block.bamboo_wood_trapdoor.open"),
|
|
||||||
BLOCK_BARREL_CLOSE("block.barrel.close"),
|
|
||||||
BLOCK_BARREL_OPEN("block.barrel.open"),
|
|
||||||
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
|
|
||||||
BLOCK_HANGING_ROOTS_HIT("block.hanging_roots.hit"),
|
|
||||||
BLOCK_HANGING_ROOTS_PLACE("block.hanging_roots.place"),
|
|
||||||
BLOCK_HANGING_ROOTS_STEP("block.hanging_roots.step"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_HANGING_SIGN_BREAK("block.hanging_sign.break"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_HANGING_SIGN_FALL("block.hanging_sign.fall"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_HANGING_SIGN_HIT("block.hanging_sign.hit"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_HANGING_SIGN_PLACE("block.hanging_sign.place"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_HANGING_SIGN_STEP("block.hanging_sign.step"),
|
|
||||||
BLOCK_HONEY_BLOCK_BREAK("block.honey_block.break"),
|
|
||||||
BLOCK_HONEY_BLOCK_FALL("block.honey_block.fall"),
|
|
||||||
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
|
|
||||||
BLOCK_NOTE_BLOCK_GUITAR("block.note_block.guitar"),
|
|
||||||
BLOCK_NOTE_BLOCK_HARP("block.note_block.harp"),
|
|
||||||
BLOCK_NOTE_BLOCK_HAT("block.note_block.hat"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_NOTE_BLOCK_IMITATE_CREEPER("block.note_block.imitate.creeper"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_NOTE_BLOCK_IMITATE_ENDER_DRAGON("block.note_block.imitate.ender_dragon"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_NOTE_BLOCK_IMITATE_PIGLIN("block.note_block.imitate.piglin"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_NOTE_BLOCK_IMITATE_SKELETON("block.note_block.imitate.skeleton"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_NOTE_BLOCK_IMITATE_WITHER_SKELETON("block.note_block.imitate.wither_skeleton"),
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
BLOCK_NOTE_BLOCK_IMITATE_ZOMBIE("block.note_block.imitate.zombie"),
|
|
||||||
BLOCK_NOTE_BLOCK_IRON_XYLOPHONE("block.note_block.iron_xylophone"),
|
|
||||||
BLOCK_NOTE_BLOCK_PLING("block.note_block.pling"),
|
|
||||||
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/Tag.java
|
|
||||||
+++ b/src/main/java/org/bukkit/Tag.java
|
|
||||||
@@ -0,0 +0,0 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|
||||||
/**
|
|
||||||
* Vanilla block tag representing all bamboo blocks.
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
Tag<Material> BAMBOO_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bamboo_blocks"), Material.class);
|
|
||||||
/**
|
|
||||||
* Vanilla block tag representing all banner blocks.
|
|
||||||
@@ -0,0 +0,0 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|
||||||
/**
|
|
||||||
* Vanilla item tag representing all books that may be placed on bookshelves.
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
Tag<Material> ITEMS_BOOKSHELF_BOOKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("bookshelf_books"), Material.class);
|
|
||||||
/**
|
|
||||||
* Vanilla item tag representing all items that may be placed in beacons.
|
|
||||||
@@ -0,0 +0,0 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|
||||||
/**
|
|
||||||
* Vanilla item tag representing all hanging signs.
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @ApiStatus.Experimental // Paper
|
|
||||||
Tag<Material> ITEMS_HANGING_SIGNS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("hanging_signs"), Material.class);
|
|
||||||
/**
|
|
||||||
* Vanilla item tag representing all items which will ignite creepers when
|
|
||||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
||||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
||||||
@@ -0,0 +0,0 @@ public enum InventoryType {
|
|
||||||
/**
|
|
||||||
* Pseudo chiseled bookshelf inventory, with 6 slots of undefined type.
|
|
||||||
*/
|
|
||||||
+ @MinecraftExperimental // Paper
|
|
||||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
|
||||||
CHISELED_BOOKSHELF(6, "Chiseled Bookshelf", false),
|
|
||||||
/**
|
|
||||||
* Pseudo jukebox inventory with 1 slot of undefined type.
|
|
||||||
@@ -0,0 +0,0 @@ public enum InventoryType {
|
|
||||||
* @apiNote draft, experimental 1.20 API
|
|
||||||
*/
|
|
||||||
@MinecraftExperimental
|
|
||||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
|
||||||
SMITHING_NEW(4, "Upgrade Gear"),
|
|
||||||
;
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
|
||||||
+++ b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
|
||||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
|
||||||
/**
|
|
||||||
* Represents a smithing transform recipe.
|
|
||||||
*/
|
|
||||||
+@org.bukkit.MinecraftExperimental // Paper
|
|
||||||
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
|
||||||
public class SmithingTransformRecipe extends SmithingRecipe {
|
|
||||||
|
|
||||||
private final RecipeChoice template;
|
|
@ -429,7 +429,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ public static final MaterialSetTag SKULLS = new MaterialSetTag(keyFor("skulls"))
|
+ public static final MaterialSetTag SKULLS = new MaterialSetTag(keyFor("skulls"))
|
||||||
+ .endsWith("_HEAD")
|
+ .endsWith("_HEAD")
|
||||||
+ .endsWith("_SKULL")
|
+ .endsWith("_SKULL")
|
||||||
+ .not(Material.POTTERY_SHARD_SKULL)
|
|
||||||
+ .not(Material.PISTON_HEAD)
|
+ .not(Material.PISTON_HEAD)
|
||||||
+ .ensureSize("SKULLS", 14).lock();
|
+ .ensureSize("SKULLS", 14).lock();
|
||||||
+
|
+
|
||||||
|
@ -159,6 +159,23 @@ diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/R
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
|
@@ -0,0 +0,0 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
|
*
|
||||||
|
* @see TrimMaterial
|
||||||
|
*/
|
||||||
|
- @ApiStatus.Experimental
|
||||||
|
+ //@ApiStatus.Experimental // Paper
|
||||||
|
Registry<TrimMaterial> TRIM_MATERIAL = Bukkit.getRegistry(TrimMaterial.class);
|
||||||
|
/**
|
||||||
|
* Trim patterns.
|
||||||
|
*
|
||||||
|
* @see TrimPattern
|
||||||
|
*/
|
||||||
|
- @ApiStatus.Experimental
|
||||||
|
+ //@ApiStatus.Experimental // Paper
|
||||||
|
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||||
|
/**
|
||||||
|
* Villager profession.
|
||||||
@@ -0,0 +0,0 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -0,0 +0,0 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
*
|
*
|
||||||
* @param input non-null input
|
* @param input non-null input
|
||||||
|
Loading…
Reference in New Issue
Block a user