PaperMC/patches/api/Mark-experimental-api-as-such.patch
2022-12-09 01:13:22 -08:00

456 lines
20 KiB
Diff

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] Mark experimental api as such
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, net.kyori.adventure.translation.Translata
ACACIA_PLANKS(31312),
DARK_OAK_PLANKS(20869),
MANGROVE_PLANKS(7078),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_PLANKS(8520),
CRIMSON_PLANKS(18812),
WARPED_PLANKS(16045),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_MOSAIC(10715),
/**
* BlockData: {@link Sapling}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Orientable}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_BLOCK(20770, Orientable.class),
/**
* BlockData: {@link Orientable}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Orientable}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
STRIPPED_BAMBOO_BLOCK(14799, Orientable.class),
/**
* BlockData: {@link Orientable}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Slab}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_SLAB(17798, Slab.class),
/**
* BlockData: {@link Slab}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_MOSAIC_SLAB(22118, Slab.class),
/**
* BlockData: {@link Slab}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link ChiseledBookshelf}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
CHISELED_BOOKSHELF(8099, ChiseledBookshelf.class),
MOSSY_COBBLESTONE(21900),
OBSIDIAN(32723),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Fence}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_FENCE(17207, Fence.class),
/**
* BlockData: {@link Fence}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Stairs}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_STAIRS(25674, Stairs.class),
/**
* BlockData: {@link Stairs}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_MOSAIC_STAIRS(20977, Stairs.class),
/**
* BlockData: {@link Stairs}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Switch}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_BUTTON(21810, Switch.class),
/**
* BlockData: {@link Switch}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Powerable}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_PRESSURE_PLATE(26740, Powerable.class),
/**
* BlockData: {@link Powerable}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Door}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_DOOR(19971, Door.class),
/**
* BlockData: {@link Door}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link TrapDoor}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_TRAPDOOR(9174, TrapDoor.class),
/**
* BlockData: {@link TrapDoor}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Gate}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_FENCE_GATE(14290, Gate.class),
/**
* BlockData: {@link Gate}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
DARK_OAK_CHEST_BOAT(8733, 1),
MANGROVE_BOAT(20792, 1),
MANGROVE_CHEST_BOAT(18572, 1),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_RAFT(25901, 1),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_CHEST_RAFT(20056, 1),
/**
* BlockData: {@link StructureBlock}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Sign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_SIGN(26139, 16, Sign.class),
/**
* BlockData: {@link Sign}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
OAK_HANGING_SIGN(20116, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
SPRUCE_HANGING_SIGN(24371, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BIRCH_HANGING_SIGN(17938, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
JUNGLE_HANGING_SIGN(27671, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
ACACIA_HANGING_SIGN(30257, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
DARK_OAK_HANGING_SIGN(23360, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
MANGROVE_HANGING_SIGN(25106, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_HANGING_SIGN(4726, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
CRIMSON_HANGING_SIGN(20696, 16, HangingSign.class),
/**
* BlockData: {@link HangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
WARPED_HANGING_SIGN(8195, 16, HangingSign.class),
BUCKET(15215, 16),
WATER_BUCKET(8802, 1),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
EGG(21603, 16),
COMPASS(24139),
RECOVERY_COMPASS(12710),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BUNDLE(16835, 1),
FISHING_ROD(4167, 1, 64),
CLOCK(14980),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
BEE_SPAWN_EGG(22924),
BLAZE_SPAWN_EGG(4759),
CAT_SPAWN_EGG(29583),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
CAMEL_SPAWN_EGG(14760),
CAVE_SPIDER_SPAWN_EGG(23341),
CHICKEN_SPAWN_EGG(5462),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Rotatable}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
PIGLIN_HEAD(5512, Rotatable.class),
NETHER_STAR(12469),
PUMPKIN_PIE(28725),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link WallSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_WALL_SIGN(18857, 16, WallSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
OAK_WALL_HANGING_SIGN(15637, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
SPRUCE_WALL_HANGING_SIGN(18833, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BIRCH_WALL_HANGING_SIGN(15937, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
ACACIA_WALL_HANGING_SIGN(22477, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
JUNGLE_WALL_HANGING_SIGN(16691, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
DARK_OAK_WALL_HANGING_SIGN(14296, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
MANGROVE_WALL_HANGING_SIGN(16974, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
CRIMSON_WALL_HANGING_SIGN(28982, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
WARPED_WALL_HANGING_SIGN(20605, WallHangingSign.class),
/**
* BlockData: {@link WallHangingSign}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO_WALL_HANGING_SIGN(6669, WallHangingSign.class),
/**
* BlockData: {@link RedstoneWallTorch}
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
/**
* BlockData: {@link Directional}
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
PIGLIN_WALL_HEAD(4446, Directional.class),
/**
* BlockData: {@link Directional}
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.
*/
+ @org.jetbrains.annotations.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 block tag representing all ceiling signs.
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
Tag<Material> CEILING_HANGING_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("ceiling_hanging_signs"), Material.class);
/**
* Vanilla block tag representing all wall hanging signs.
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
Tag<Material> WALL_HANGING_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wall_hanging_signs"), Material.class);
/**
* Vanilla block tag representing all hanging signs.
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
Tag<Material> ALL_HANGING_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("all_hanging_signs"), Material.class);
/**
* Vanilla block tag representing all signs, regardless of type.
@@ -0,0 +0,0 @@ public interface Tag<T extends Keyed> extends Keyed {
/**
* Vanilla item tag representing all books that may be placed on bookshelves.
*/
+ @org.jetbrains.annotations.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.
*/
+ @org.jetbrains.annotations.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/block/ChiseledBookshelf.java b/src/main/java/org/bukkit/block/ChiseledBookshelf.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/ChiseledBookshelf.java
+++ b/src/main/java/org/bukkit/block/ChiseledBookshelf.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a captured state of a chiseled bookshelf.
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface ChiseledBookshelf extends TileState, BlockInventoryHolder {
/**
diff --git a/src/main/java/org/bukkit/block/HangingSign.java b/src/main/java/org/bukkit/block/HangingSign.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/HangingSign.java
+++ b/src/main/java/org/bukkit/block/HangingSign.java
@@ -0,0 +0,0 @@ package org.bukkit.block;
/**
* Represents a captured state of a hanging sign.
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface HangingSign extends Sign {
}
diff --git a/src/main/java/org/bukkit/block/data/type/ChiseledBookshelf.java b/src/main/java/org/bukkit/block/data/type/ChiseledBookshelf.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/data/type/ChiseledBookshelf.java
+++ b/src/main/java/org/bukkit/block/data/type/ChiseledBookshelf.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
* <br>
* Block may have 0, 1... {@link #getMaximumOccupiedSlots()}-1 occupied slots.
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface ChiseledBookshelf extends Directional {
/**
diff --git a/src/main/java/org/bukkit/block/data/type/HangingSign.java b/src/main/java/org/bukkit/block/data/type/HangingSign.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/data/type/HangingSign.java
+++ b/src/main/java/org/bukkit/block/data/type/HangingSign.java
@@ -0,0 +0,0 @@ import org.bukkit.block.data.Attachable;
import org.bukkit.block.data.Rotatable;
import org.bukkit.block.data.Waterlogged;
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface HangingSign extends Attachable, Rotatable, Waterlogged {
}
diff --git a/src/main/java/org/bukkit/block/data/type/WallHangingSign.java b/src/main/java/org/bukkit/block/data/type/WallHangingSign.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/data/type/WallHangingSign.java
+++ b/src/main/java/org/bukkit/block/data/type/WallHangingSign.java
@@ -0,0 +0,0 @@ package org.bukkit.block.data.type;
import org.bukkit.block.data.Directional;
import org.bukkit.block.data.Waterlogged;
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface WallHangingSign extends Directional, Waterlogged {
}
diff --git a/src/main/java/org/bukkit/entity/Boat.java b/src/main/java/org/bukkit/entity/Boat.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Boat.java
+++ b/src/main/java/org/bukkit/entity/Boat.java
@@ -0,0 +0,0 @@ public interface Boat extends Vehicle {
ACACIA(Material.ACACIA_PLANKS),
DARK_OAK(Material.DARK_OAK_PLANKS),
MANGROVE(Material.MANGROVE_PLANKS),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
BAMBOO(Material.BAMBOO_PLANKS),
;
diff --git a/src/main/java/org/bukkit/entity/Camel.java b/src/main/java/org/bukkit/entity/Camel.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Camel.java
+++ b/src/main/java/org/bukkit/entity/Camel.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
/**
* Represents a Camel.
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface Camel extends AbstractHorse, Sittable {
/**
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/src/main/java/org/bukkit/entity/EntityType.java
@@ -0,0 +0,0 @@ public enum EntityType implements Keyed, net.kyori.adventure.translation.Transla
FROG("frog", Frog.class, -1),
TADPOLE("tadpole", Tadpole.class, -1),
WARDEN("warden", Warden.class, -1),
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
CAMEL("camel", Camel.class, -1),
/**
* A fishing line and bobber.
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.
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
CHISELED_BOOKSHELF(6, "Chiseled Bookshelf"),
;
diff --git a/src/main/java/org/bukkit/inventory/ChiseledBookshelfInventory.java b/src/main/java/org/bukkit/inventory/ChiseledBookshelfInventory.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/ChiseledBookshelfInventory.java
+++ b/src/main/java/org/bukkit/inventory/ChiseledBookshelfInventory.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
/**
* Interface to the inventory of a chiseled bookshelf.
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface ChiseledBookshelfInventory extends Inventory {
@Nullable
diff --git a/src/main/java/org/bukkit/inventory/meta/BundleMeta.java b/src/main/java/org/bukkit/inventory/meta/BundleMeta.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/meta/BundleMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/BundleMeta.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public interface BundleMeta extends ItemMeta {
/**