3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/patches/api/0431-Experimental-annotations-change.patch

228 Zeilen
12 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Sat, 9 Dec 2023 11:47:53 -0800
Subject: [PATCH] Experimental annotations change
diff --git a/src/main/java/org/bukkit/FeatureFlag.java b/src/main/java/org/bukkit/FeatureFlag.java
2024-06-13 17:45:43 +02:00
index 7522c611b5214dd09867c434d5f7cf161f5c04ca..026b1832bcd163ab89668c991bf002e608e36aef 100644
--- a/src/main/java/org/bukkit/FeatureFlag.java
+++ b/src/main/java/org/bukkit/FeatureFlag.java
Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 69fa4695 Add some missing deprecation annotations f850da2e Update Maven plugins/versions 8d8400db Use regular compiler seeing as ECJ doesn't support Java 21 JRE c29e1688 Revert "BUILDTOOLS-676: Downgrade Maven compiler version" 07bce714 SPIGOT-7355: More field renames and fixes 6a8ea764 Fix bad merge in penultimate commit 50a7920c Fix imports in previous commit 83640dd1 PR-995: Add required feature to MinecraftExperimental for easy lookups fc1f96cf BUILDTOOLS-676: Downgrade Maven compiler version CraftBukkit Changes: 90f1059ba Fix item placement 661afb43c SPIGOT-7633: Clearer error message for missing particle data 807b465b3 SPIGOT-7634: Armadillo updates infrequently 590cf09a8 Fix unit tests always seeing Mojang server as unavailable 7c7ac5eb2 SPIGOT-7636: Fix clearing ItemMeta 4a72905cf SPIGOT-7635: Fix Player#transfer and cookie methods ebb50e136 Fix incorrect Vault implementation b33fed8b7 Update Maven plugins/versions 6f00f0608 SPIGOT-7632: Control middle clicking chest does not copy contents db821f405 Use regular compiler seeing as ECJ doesn't support Java 21 JRE 8a2976737 Revert "BUILDTOOLS-676: Downgrade Maven compiler version" 0297f87bb SPIGOT-7355: More field renames and fixes 2d03bdf6a SPIGOT-7629: Fix loading banner patterns e77951fac Fix equality of deserialized display names c66f3e4fd SPIGOT-7631: Fix deserialisation of BlockStateMeta 9c2c7be8d SPIGOT-7630: Fix crash saving unticked leashed entities 8c1e7c841 PR-1384: Disable certain PlayerProfile tests, if Mojang's services or internet are not available ced93d572 SPIGOT-7626: sendSignChange() has no effect c77362cae SPIGOT-7625: ItemStack with lore cannot be serialized in 1.20.5 ff2004387 SPIGOT-7620: Fix server crash when hoppers transfer items to double chests 8b4abeb03 BUILDTOOLS-676: Downgrade Maven compiler version
2024-04-25 23:21:18 +02:00
@@ -13,6 +13,7 @@ public interface FeatureFlag extends Keyed {
public static final FeatureFlag VANILLA = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("vanilla"));
+ @ApiStatus.Experimental // Paper - add missing annotation
public static final FeatureFlag BUNDLE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("bundle"));
/**
2024-06-13 17:45:43 +02:00
@@ -23,6 +24,7 @@ public interface FeatureFlag extends Keyed {
Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 69fa4695 Add some missing deprecation annotations f850da2e Update Maven plugins/versions 8d8400db Use regular compiler seeing as ECJ doesn't support Java 21 JRE c29e1688 Revert "BUILDTOOLS-676: Downgrade Maven compiler version" 07bce714 SPIGOT-7355: More field renames and fixes 6a8ea764 Fix bad merge in penultimate commit 50a7920c Fix imports in previous commit 83640dd1 PR-995: Add required feature to MinecraftExperimental for easy lookups fc1f96cf BUILDTOOLS-676: Downgrade Maven compiler version CraftBukkit Changes: 90f1059ba Fix item placement 661afb43c SPIGOT-7633: Clearer error message for missing particle data 807b465b3 SPIGOT-7634: Armadillo updates infrequently 590cf09a8 Fix unit tests always seeing Mojang server as unavailable 7c7ac5eb2 SPIGOT-7636: Fix clearing ItemMeta 4a72905cf SPIGOT-7635: Fix Player#transfer and cookie methods ebb50e136 Fix incorrect Vault implementation b33fed8b7 Update Maven plugins/versions 6f00f0608 SPIGOT-7632: Control middle clicking chest does not copy contents db821f405 Use regular compiler seeing as ECJ doesn't support Java 21 JRE 8a2976737 Revert "BUILDTOOLS-676: Downgrade Maven compiler version" 0297f87bb SPIGOT-7355: More field renames and fixes 2d03bdf6a SPIGOT-7629: Fix loading banner patterns e77951fac Fix equality of deserialized display names c66f3e4fd SPIGOT-7631: Fix deserialisation of BlockStateMeta 9c2c7be8d SPIGOT-7630: Fix crash saving unticked leashed entities 8c1e7c841 PR-1384: Disable certain PlayerProfile tests, if Mojang's services or internet are not available ced93d572 SPIGOT-7626: sendSignChange() has no effect c77362cae SPIGOT-7625: ItemStack with lore cannot be serialized in 1.20.5 ff2004387 SPIGOT-7620: Fix server crash when hoppers transfer items to double chests 8b4abeb03 BUILDTOOLS-676: Downgrade Maven compiler version
2024-04-25 23:21:18 +02:00
@Deprecated
public static final FeatureFlag UPDATE_1_20 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_20"));
+ @ApiStatus.Experimental // Paper - add missing annotation
public static final FeatureFlag TRADE_REBALANCE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("trade_rebalance"));
2024-06-13 17:45:43 +02:00
/**
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
2024-06-14 13:07:50 +02:00
index c4f067598a40b0381bc9e601a3809e2683c10407..54704da43cf9c429f3914f0580246dde99aa93c0 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
2024-06-13 17:45:43 +02:00
@@ -2497,6 +2497,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
EGG(21603, 16),
COMPASS(24139),
RECOVERY_COMPASS(12710),
2024-06-14 13:07:50 +02:00
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
+ @ApiStatus.Experimental // Paper - add missing annotation
BUNDLE(16835, 1),
FISHING_ROD(4167, 1, 64),
CLOCK(14980),
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
2024-06-13 17:45:43 +02:00
index b2ff1da3386223a544ab5fc363a90c66c8869242..8c7b50906fc5b84c5570408f357410810bbfbded 100644
--- a/src/main/java/org/bukkit/Sound.java
+++ b/src/main/java/org/bukkit/Sound.java
2024-06-13 17:45:43 +02:00
@@ -1506,8 +1506,14 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
2024-04-27 22:30:15 +02:00
ITEM_BUCKET_FILL_LAVA("item.bucket.fill_lava"),
ITEM_BUCKET_FILL_POWDER_SNOW("item.bucket.fill_powder_snow"),
ITEM_BUCKET_FILL_TADPOLE("item.bucket.fill_tadpole"),
2024-06-13 17:45:43 +02:00
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
2024-04-27 22:30:15 +02:00
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_BUNDLE_DROP_CONTENTS("item.bundle.drop_contents"),
2024-06-13 17:45:43 +02:00
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
2024-04-27 22:30:15 +02:00
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_BUNDLE_INSERT("item.bundle.insert"),
2024-06-13 17:45:43 +02:00
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
2024-04-27 22:30:15 +02:00
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
ITEM_CROP_PLANT("item.crop.plant"),
diff --git a/src/main/java/org/bukkit/block/Crafter.java b/src/main/java/org/bukkit/block/Crafter.java
index 8d2dd78fc588a6817dfede8040b9909a7d5bde67..f737a2aae3f57a1bfe4cf68ea66f603da4eebd47 100644
--- a/src/main/java/org/bukkit/block/Crafter.java
+++ b/src/main/java/org/bukkit/block/Crafter.java
@@ -6,7 +6,6 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a captured state of a crafter.
*/
-@ApiStatus.Experimental
public interface Crafter extends Container, com.destroystokyo.paper.loottable.LootableBlockInventory { // Paper - LootTable API
/**
diff --git a/src/main/java/org/bukkit/block/TrialSpawner.java b/src/main/java/org/bukkit/block/TrialSpawner.java
index 901fea45682ee6be3de3986322509d39f65c7bf6..1c1a91658892941f54934037319ca8f93d764198 100644
--- a/src/main/java/org/bukkit/block/TrialSpawner.java
+++ b/src/main/java/org/bukkit/block/TrialSpawner.java
@@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a captured state of a trial spawner.
*/
-@ApiStatus.Experimental
public interface TrialSpawner extends TileState {
}
diff --git a/src/main/java/org/bukkit/block/Vault.java b/src/main/java/org/bukkit/block/Vault.java
index f0c5d27f6f1ff56ffe4b88dfdce8d0b7f06d19e1..375f41fe4aebdbf140497b5ba1e54e1c72f0cdfc 100644
--- a/src/main/java/org/bukkit/block/Vault.java
+++ b/src/main/java/org/bukkit/block/Vault.java
@@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a captured state of a trial spawner.
*/
-@ApiStatus.Experimental
public interface Vault extends TileState {
}
diff --git a/src/main/java/org/bukkit/entity/AbstractWindCharge.java b/src/main/java/org/bukkit/entity/AbstractWindCharge.java
index 60fbacee263e55f91ac977f020e390d46024723a..ecff691c3a0878659fb051926ef769ce1e339c48 100644
--- a/src/main/java/org/bukkit/entity/AbstractWindCharge.java
+++ b/src/main/java/org/bukkit/entity/AbstractWindCharge.java
@@ -5,7 +5,6 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a Wind Charge.
*/
-@ApiStatus.Experimental
public interface AbstractWindCharge extends Fireball {
/**
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c08d32868 100644
--- a/src/main/java/org/bukkit/entity/Bogged.java
+++ b/src/main/java/org/bukkit/entity/Bogged.java
@@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a Bogged Skeleton.
*/
-@ApiStatus.Experimental
public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API
}
diff --git a/src/main/java/org/bukkit/entity/Breeze.java b/src/main/java/org/bukkit/entity/Breeze.java
index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644
--- a/src/main/java/org/bukkit/entity/Breeze.java
+++ b/src/main/java/org/bukkit/entity/Breeze.java
@@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a Breeze. Whoosh!
*/
-@ApiStatus.Experimental
public interface Breeze extends Monster {
}
diff --git a/src/main/java/org/bukkit/entity/BreezeWindCharge.java b/src/main/java/org/bukkit/entity/BreezeWindCharge.java
index 06ca3dc4b0b69cbaefa96464dce484cea93e0717..748e58eb93c7882e15d9cbdd56d11bb14808698b 100644
--- a/src/main/java/org/bukkit/entity/BreezeWindCharge.java
+++ b/src/main/java/org/bukkit/entity/BreezeWindCharge.java
@@ -5,7 +5,6 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a Wind Charge.
*/
-@ApiStatus.Experimental
public interface BreezeWindCharge extends AbstractWindCharge {
}
diff --git a/src/main/java/org/bukkit/entity/OminousItemSpawner.java b/src/main/java/org/bukkit/entity/OminousItemSpawner.java
index 4aa07d4edb2c81d0ae7999b30ad53ff8bb884ec7..dbd4da4c63b6b1b21c3e638ac4d2c9fdd6716a8e 100644
--- a/src/main/java/org/bukkit/entity/OminousItemSpawner.java
+++ b/src/main/java/org/bukkit/entity/OminousItemSpawner.java
@@ -7,7 +7,6 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents an ominous item spawner.
*/
-@ApiStatus.Experimental
public interface OminousItemSpawner extends Entity {
/**
diff --git a/src/main/java/org/bukkit/entity/WindCharge.java b/src/main/java/org/bukkit/entity/WindCharge.java
index 4adc91ba3dff00ab44303778e9d4499f7808ad00..beb62426490a361af793fb530106d8547a83ae03 100644
--- a/src/main/java/org/bukkit/entity/WindCharge.java
+++ b/src/main/java/org/bukkit/entity/WindCharge.java
@@ -5,7 +5,6 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a Wind Charge.
*/
-@ApiStatus.Experimental
public interface WindCharge extends AbstractWindCharge {
}
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index fbdbd2f4da5e09d4b111ddcf72e2d7dd59046bd7..126d60a4d0b3b140b922fb24aa425e805892ad32 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -146,7 +146,6 @@ public enum InventoryType {
/**
* A crafter inventory, with 9 CRAFTING slots.
*/
- @ApiStatus.Experimental
CRAFTER(9, "Crafter"),
/**
* The new smithing inventory, with 3 CRAFTING slots and 1 RESULT slot.
diff --git a/src/main/java/org/bukkit/inventory/CrafterInventory.java b/src/main/java/org/bukkit/inventory/CrafterInventory.java
index bb1fb5e0518c6a62ef8b206733ee51d831f1f85b..49d0a37bbeb0b8fa9207164c74245ef05485467c 100644
--- a/src/main/java/org/bukkit/inventory/CrafterInventory.java
+++ b/src/main/java/org/bukkit/inventory/CrafterInventory.java
@@ -5,5 +5,4 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Interface to the inventory of a Crafter.
*/
-@ApiStatus.Experimental
public interface CrafterInventory extends Inventory { }
diff --git a/src/main/java/org/bukkit/inventory/meta/BundleMeta.java b/src/main/java/org/bukkit/inventory/meta/BundleMeta.java
index e404cd1e2ba44e4c2d09524bc7cf730d8ffbdabd..cea0ebf50876dd32ab7fba6025b30f297d0a69c4 100644
--- a/src/main/java/org/bukkit/inventory/meta/BundleMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/BundleMeta.java
@@ -6,6 +6,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+@org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
@ApiStatus.Experimental
public interface BundleMeta extends ItemMeta {
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index 82993302cb3cf62ad4a94a0ebaa7711cc4d8e550..bd37310d27e73bfe65d680594f3a9be8577a72a0 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -309,12 +309,26 @@ public final class MapCursor {
BANNER_RED(24, "banner_red"),
BANNER_BLACK(25, "banner_black"),
RED_X(26, "red_x"),
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
VILLAGE_DESERT(27, "village_desert"),
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
VILLAGE_PLAINS(28, "village_plains"),
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
VILLAGE_SAVANNA(29, "village_savanna"),
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
VILLAGE_SNOWY(30, "village_snowy"),
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
VILLAGE_TAIGA(31, "village_taiga"),
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
JUNGLE_TEMPLE(32, "jungle_temple"),
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
SWAMP_HUT(33, "swamp_hut"),
TRIAL_CHAMBERS(34, "trial_chambers")
;