diff --git a/paper-api-generator/src/main/java/io/papermc/generator/types/goal/MobGoalNames.java b/paper-api-generator/src/main/java/io/papermc/generator/types/goal/MobGoalNames.java index cc7a416166..37506e3f84 100644 --- a/paper-api-generator/src/main/java/io/papermc/generator/types/goal/MobGoalNames.java +++ b/paper-api-generator/src/main/java/io/papermc/generator/types/goal/MobGoalNames.java @@ -232,6 +232,7 @@ public class MobGoalNames { bukkitMap.put(net.minecraft.world.entity.monster.warden.Warden.class, org.bukkit.entity.Warden.class); bukkitMap.put(net.minecraft.world.entity.animal.allay.Allay.class, org.bukkit.entity.Allay.class); bukkitMap.put(net.minecraft.world.entity.animal.sniffer.Sniffer.class, org.bukkit.entity.Sniffer.class); + bukkitMap.put(net.minecraft.world.entity.monster.breeze.Breeze.class, org.bukkit.entity.Breeze.class); // } diff --git a/patches/api/Add-missing-block-data-mins-and-maxes.patch b/patches/api/Add-missing-block-data-mins-and-maxes.patch index 61f8b978f1..a7f6a6c275 100644 --- a/patches/api/Add-missing-block-data-mins-and-maxes.patch +++ b/patches/api/Add-missing-block-data-mins-and-maxes.patch @@ -65,3 +65,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + int getMinimumDistance(); + // Paper end } +diff --git a/src/main/java/org/bukkit/block/data/type/PinkPetals.java b/src/main/java/org/bukkit/block/data/type/PinkPetals.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/block/data/type/PinkPetals.java ++++ b/src/main/java/org/bukkit/block/data/type/PinkPetals.java +@@ -0,0 +0,0 @@ public interface PinkPetals extends Directional { + */ + void setFlowerAmount(int flower_amount); + ++ // Paper start ++ /** ++ * Gets the minimum allowed value of the 'flower_amount' property. ++ * ++ * @return the minimum 'flower_amount' value ++ */ ++ int getMinimumFlowerAmount(); ++ // Paper end ++ + /** + * Gets the maximum allowed value of the 'flower_amount' property. + * diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index 0e5267e96e..3aef8679bc 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -964,6 +964,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // @Deprecated // Paper - is stable API void setBackgroundColor(@Nullable Color color); + /** +diff --git a/src/main/java/org/bukkit/entity/memory/MemoryKey.java b/src/main/java/org/bukkit/entity/memory/MemoryKey.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/entity/memory/MemoryKey.java ++++ b/src/main/java/org/bukkit/entity/memory/MemoryKey.java +@@ -0,0 +0,0 @@ public final class MemoryKey implements Keyed { + public static final MemoryKey LIKED_NOTEBLOCK_POSITION = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock"), Location.class); + public static final MemoryKey LIKED_NOTEBLOCK_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock_cooldown_ticks"), Integer.class); + public static final MemoryKey ITEM_PICKUP_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("item_pickup_cooldown_ticks"), Integer.class); ++ /** ++ * @deprecated this constant uses the wrong generic type, the sniffer now stores different positions ++ * from possibly different worlds. Use the relevant methods in {@link org.bukkit.entity.Sniffer} directly ++ * for now. ++ */ ++ @Deprecated // Paper + public static final MemoryKey SNIFFER_EXPLORED_POSITIONS = new MemoryKey<>(NamespacedKey.minecraft("sniffer_explored_positions"), Location.class); + /** diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/api/Suspicious-Effect-Entry-API.patch b/patches/api/Suspicious-Effect-Entry-API.patch index a5413e860d..e54332a4d4 100644 --- a/patches/api/Suspicious-Effect-Entry-API.patch +++ b/patches/api/Suspicious-Effect-Entry-API.patch @@ -21,6 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ +package io.papermc.paper.potion; + ++import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; @@ -31,24 +32,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +public sealed interface SuspiciousEffectEntry permits SuspiciousEffectEntryImpl { + + /** -+ * Gets the effect type. ++ * Gets the effect type. + * -+ * @return type -+ */ ++ * @return effect type ++ */ + @NotNull PotionEffectType effect(); + + /** -+ * Gets the duration for this effect instance. -+ * -+ * @return duration (in ticks) -+ */ ++ * Gets the duration for this effect instance. ++ * ++ * @return duration (in ticks) or {@link PotionEffect#INFINITE_DURATION} ++ */ + int duration(); + + /** + * Creates a new instance of SuspiciousEffectEntry. + * + * @param effectType effect type -+ * @param duration duration (in ticks) ++ * @param duration duration (in ticks) or {@link PotionEffect#INFINITE_DURATION} + * @return new instance of an entry + */ + @Contract(value = "_, _ -> new", pure = true) diff --git a/patches/api/add-missing-Experimental-annotations.patch b/patches/api/add-missing-Experimental-annotations.patch index 33244de038..2b56a74d02 100644 --- a/patches/api/add-missing-Experimental-annotations.patch +++ b/patches/api/add-missing-Experimental-annotations.patch @@ -233,6 +233,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 WAXED_OXIDIZED_COPPER_TRAPDOOR(21450, TrapDoor.class), /** * BlockData: {@link Gate} +@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla + EGG(21603, 16), + COMPASS(24139), + RECOVERY_COMPASS(12710), ++ @MinecraftExperimental // Paper - add missing annotation ++ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation + BUNDLE(16835, 1), + FISHING_ROD(4167, 1, 64), + CLOCK(14980), @@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla * BlockData: {@link Crafter} */ diff --git a/patches/server/Add-missing-block-data-mins-and-maxes.patch b/patches/server/Add-missing-block-data-mins-and-maxes.patch index 3f2ee7cca3..6aa2f01730 100644 --- a/patches/server/Add-missing-block-data-mins-and-maxes.patch +++ b/patches/server/Add-missing-block-data-mins-and-maxes.patch @@ -150,3 +150,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end } +diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java +@@ -0,0 +0,0 @@ public final class CraftPinkPetals extends org.bukkit.craftbukkit.block.data.Cra + this.set(CraftPinkPetals.FLOWER_AMOUNT, flower_amount); + } + ++ // Paper start ++ @Override ++ public int getMinimumFlowerAmount() { ++ return getMin(CraftPinkPetals.FLOWER_AMOUNT); ++ } ++ // Paper end ++ + @Override + public int getMaximumFlowerAmount() { + return getMax(CraftPinkPetals.FLOWER_AMOUNT); diff --git a/patches/server/Allow-changing-bed-s-occupied-property.patch b/patches/server/Allow-changing-bed-s-occupied-property.patch index 30d0af2232..518eb3ebe7 100644 --- a/patches/server/Allow-changing-bed-s-occupied-property.patch +++ b/patches/server/Allow-changing-bed-s-occupied-property.patch @@ -4,22 +4,6 @@ Date: Wed, 12 Oct 2022 00:36:55 +0300 Subject: [PATCH] Allow changing bed's 'occupied' property -diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java -@@ -0,0 +0,0 @@ public abstract class CraftBed extends CraftBlockData implements Bed { - public boolean isOccupied() { - return this.get(CraftBed.OCCUPIED); - } -+ -+ // Paper start -+ @Override -+ public void setOccupied(boolean occupied) { -+ set(CraftBed.OCCUPIED, occupied); -+ } -+ // Paper end - } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java