work on some API stuff

This commit is contained in:
Jake Potrebic 2024-04-23 16:26:24 -07:00
parent d527aa0f5b
commit 8c0153f78d
2 changed files with 262 additions and 1 deletions

View File

@ -729,6 +729,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Nullable
public static PistonMoveReaction getById(int id) {
return byId.get(id);
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -0,0 +0,0 @@ public abstract class Enchantment implements Keyed, Translatable {
* @deprecated enchantment groupings are now managed by tags, not categories
*/
@NotNull
- @Deprecated
+ @Deprecated(forRemoval = true, since = "1.20.5") @org.jetbrains.annotations.Contract("-> fail") // Paper
public abstract EnchantmentTarget getItemTarget();
/**
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Enderman.java
@ -824,6 +837,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @Deprecated // Paper
public void setSwimming(boolean swimming);
/**
@@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @deprecated entity groupings are now managed by tags, not categories
*/
@NotNull
- @Deprecated
+ @Deprecated(forRemoval = true, since = "1.20.5") @org.jetbrains.annotations.Contract("-> fail") // Paper
public EntityCategory getCategory();
/**
diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644

View File

@ -99,6 +99,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
CHISELED_TUFF_BRICKS(8601),
DRIPSTONE_BLOCK(26227),
/**
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link Waterlogged}
*/
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
HEAVY_CORE(15788, Waterlogged.class),
AMETHYST_BLOCK(18919),
BUDDING_AMETHYST(13963),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
WEATHERED_COPPER(19699),
OXIDIZED_COPPER(19490),
@ -261,6 +269,50 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
BREEZE_SPAWN_EGG(7580),
CAT_SPAWN_EGG(29583),
CAMEL_SPAWN_EGG(14760),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
EXPERIENCE_BOTTLE(12858),
FIRE_CHARGE(4842),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
WIND_CHARGE(23928),
WRITABLE_BOOK(13393, 1),
WRITTEN_BOOK(24164, 16),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
MACE(4771, 1, 250),
ITEM_FRAME(27318),
GLOW_ITEM_FRAME(26473),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
RAISER_ARMOR_TRIM_SMITHING_TEMPLATE(29116),
HOST_ARMOR_TRIM_SMITHING_TEMPLATE(12165),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
FLOW_ARMOR_TRIM_SMITHING_TEMPLATE(29175),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BOLT_ARMOR_TRIM_SMITHING_TEMPLATE(9698),
ANGLER_POTTERY_SHERD(9952),
ARCHER_POTTERY_SHERD(21629),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
DANGER_POTTERY_SHERD(30506),
EXPLORER_POTTERY_SHERD(5124),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
FLOW_POTTERY_SHERD(4896),
FRIEND_POTTERY_SHERD(18221),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
GUSTER_POTTERY_SHERD(28193),
HEART_POTTERY_SHERD(17607),
HEARTBREAK_POTTERY_SHERD(21108),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
PLENTY_POTTERY_SHERD(28236),
PRIZE_POTTERY_SHERD(4341),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
SCRAPE_POTTERY_SHERD(30034),
SHEAF_POTTERY_SHERD(23652),
SHELTER_POTTERY_SHERD(28390),
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link Waterlogged}
*/
@ -367,7 +419,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_KEY(12725),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
OMINOUS_TRIAL_KEY(4986),
/**
* BlockData: {@link Vault}
*/
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
VAULT(6288, Vault.class),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
OMINOUS_BOTTLE(26321),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BREEZE_ROD(14281),
/**
* BlockData: {@link Levelled}
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Particle.java
@ -391,7 +458,34 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_SPAWNER_DETECTION("trial_spawner_detection"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_SPAWNER_DETECTION_OMINOUS("trial_spawner_detection_ominous"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
VAULT_CONNECTION("vault_connection"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
INFESTED("infested"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_COBWEB("item_cobweb"),
/**
* Uses {@link BlockData} as DataType
*/
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
DUST_PILLAR("dust_pillar", BlockData.class),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
OMINOUS_SPAWNING("ominous_spawning"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
RAID_OMEN("raid_omen"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_OMEN("trial_omen"),
/**
* Uses {@link BlockData} as DataType
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
@ -453,6 +547,26 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
BLOCK_COPPER_TRAPDOOR_OPEN("block.copper_trapdoor.open"),
BLOCK_CORAL_BLOCK_BREAK("block.coral_block.break"),
BLOCK_CORAL_BLOCK_FALL("block.coral_block.fall"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
BLOCK_HANGING_SIGN_STEP("block.hanging_sign.step"),
BLOCK_HANGING_SIGN_WAXED_INTERACT_FAIL("block.hanging_sign.waxed_interact_fail"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_HEAVY_CORE_BREAK("block.heavy_core.break"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_HEAVY_CORE_FALL("block.heavy_core.fall"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_HEAVY_CORE_HIT("block.heavy_core.hit"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_HEAVY_CORE_PLACE("block.heavy_core.place"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_HEAVY_CORE_STEP("block.heavy_core.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_POLISHED_DEEPSLATE_PLACE("block.polished_deepslate.place"),
BLOCK_POLISHED_DEEPSLATE_STEP("block.polished_deepslate.step"),
@ -540,6 +654,49 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
BLOCK_TUFF_BRICKS_STEP("block.tuff_bricks.step"),
BLOCK_TUFF_FALL("block.tuff.fall"),
BLOCK_TUFF_HIT("block.tuff.hit"),
BLOCK_TUFF_PLACE("block.tuff.place"),
BLOCK_TUFF_STEP("block.tuff.step"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_ACTIVATE("block.vault.activate"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_AMBIENT("block.vault.ambient"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_BREAK("block.vault.break"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_CLOSE_SHUTTER("block.vault.close_shutter"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_DEACTIVATE("block.vault.deactivate"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_EJECT_ITEM("block.vault.eject_item"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_FALL("block.vault.fall"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_HIT("block.vault.hit"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_INSERT_ITEM("block.vault.insert_item"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_INSERT_ITEM_FAIL("block.vault.insert_item_fail"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_OPEN_SHUTTER("block.vault.open_shutter"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_PLACE("block.vault.place"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
BLOCK_VAULT_STEP("block.vault.step"),
BLOCK_VINE_BREAK("block.vine.break"),
BLOCK_VINE_FALL("block.vine.fall"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
ENTITY_BOAT_PADDLE_LAND("entity.boat.paddle_land"),
ENTITY_BOAT_PADDLE_WATER("entity.boat.paddle_water"),
@ -565,6 +722,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_BREEZE_DEATH("entity.breeze.death"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_BREEZE_DEFLECT("entity.breeze.deflect"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
@ -591,15 +749,49 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_BREEZE_SLIDE("entity.breeze.slide"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_BREEZE_WHIRL("entity.breeze.whirl"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_BREEZE_WIND_BURST("entity.breeze.wind_burst"),
ENTITY_CAMEL_AMBIENT("entity.camel.ambient"),
ENTITY_CAMEL_DASH("entity.camel.dash"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
ENTITY_PARROT_HURT("entity.parrot.hurt"),
ENTITY_PARROT_IMITATE_BLAZE("entity.parrot.imitate.blaze"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_PARROT_IMITATE_BOGGED("entity.parrot.imitate.bogged"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_PARROT_IMITATE_BREEZE("entity.parrot.imitate.breeze"),
ENTITY_PARROT_IMITATE_CREEPER("entity.parrot.imitate.creeper"),
ENTITY_PARROT_IMITATE_DROWNED("entity.parrot.imitate.drowned"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
ENTITY_WARDEN_STEP("entity.warden.step"),
ENTITY_WARDEN_TENDRIL_CLICKS("entity.warden.tendril_clicks"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_WIND_CHARGE_THROW("entity.wind_charge.throw"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ENTITY_WIND_CHARGE_WIND_BURST("entity.wind_charge.wind_burst"),
ENTITY_WITCH_AMBIENT("entity.witch.ambient"),
ENTITY_WITCH_CELEBRATE("entity.witch.celebrate"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
ENTITY_ZOMBIFIED_PIGLIN_DEATH("entity.zombified_piglin.death"),
ENTITY_ZOMBIFIED_PIGLIN_HURT("entity.zombified_piglin.hurt"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
EVENT_MOB_EFFECT_BAD_OMEN("event.mob_effect.bad_omen"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
EVENT_MOB_EFFECT_RAID_OMEN("event.mob_effect.raid_omen"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
EVENT_MOB_EFFECT_TRIAL_OMEN("event.mob_effect.trial_omen"),
EVENT_RAID_HORN("event.raid.horn"),
INTENTIONALLY_EMPTY("intentionally_empty"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
ITEM_BUCKET_FILL_POWDER_SNOW("item.bucket.fill_powder_snow"),
ITEM_BUCKET_FILL_TADPOLE("item.bucket.fill_tadpole"),
@ -614,6 +806,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
ITEM_CROP_PLANT("item.crop.plant"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
ITEM_TRIDENT_THROW("item.trident.throw"),
ITEM_TRIDENT_THUNDER("item.trident.thunder"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_WOLF_ARMOR_BREAK("item.wolf_armor.break"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_WOLF_ARMOR_CRACK("item.wolf_armor.crack"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_WOLF_ARMOR_DAMAGE("item.wolf_armor.damage"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_WOLF_ARMOR_REPAIR("item.wolf_armor.repair"),
MUSIC_CREATIVE("music.creative"),
MUSIC_CREDITS("music.credits"),
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
@ -716,4 +925,34 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_CHAMBER_CONSUMABLES("spawners/trial_chamber/consumables"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
OMINOUS_TRIAL_CHAMBER_KEY("spawners/ominous/trial_chamber/key"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
OMINOUS_TRIAL_CHAMBER_CONSUMABLES("spawners/ominous/trial_chamber/consumables"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_CHAMBER_ITEMS_TO_DROP_WHEN_OMINOUS("spawners/trial_chamber/items_to_drop_when_ominous"),
// Shearing
SHEARING_BOGGED("shearing/bogged"),
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/potion/PotionType.java
+++ b/src/main/java/org/bukkit/potion/PotionType.java
@@ -0,0 +0,0 @@ public enum PotionType implements Keyed {
SLOW_FALLING("slow_falling"),
LONG_SLOW_FALLING("long_slow_falling"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
WIND_CHARGED("wind_charged"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
WEAVING("weaving"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
OOZING("oozing"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
INFESTED("infested"),
;