From cc10499354504996c0b47238a22d6553ed9ed1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kobe=20=E2=91=A7?= <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 8 Dec 2024 14:05:17 -0800 Subject: [PATCH] Readd shear methods from bukkit Shearable (#11715) * Re-add shear methods from bukkit Shearable * Add back --- patches/api/Add-Shearable-API.patch | 8 +++- .../api/Experimental-annotations-change.patch | 3 +- patches/api/Missing-Entity-API.patch | 46 +++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/patches/api/Add-Shearable-API.patch b/patches/api/Add-Shearable-API.patch index e0594680bc..07610ab778 100644 --- a/patches/api/Add-Shearable-API.patch +++ b/patches/api/Add-Shearable-API.patch @@ -64,7 +64,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @ApiStatus.Experimental -public interface Bogged extends AbstractSkeleton, Shearable { +public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API - } + + /** + * Gets whether the bogged is in its sheared state. diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/MushroomCow.java @@ -123,7 +125,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 */ -public interface Sheep extends Animals, Colorable, Shearable { +public interface Sheep extends Animals, Colorable, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API - } + + /** + * Gets whether the sheep is in its sheared state. diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Snowman.java diff --git a/patches/api/Experimental-annotations-change.patch b/patches/api/Experimental-annotations-change.patch index 78236fe45c..0eea899666 100644 --- a/patches/api/Experimental-annotations-change.patch +++ b/patches/api/Experimental-annotations-change.patch @@ -97,7 +97,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 */ -@ApiStatus.Experimental public interface Bogged extends AbstractSkeleton, Shearable, 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Breeze.java diff --git a/patches/api/Missing-Entity-API.patch b/patches/api/Missing-Entity-API.patch index 43997f3d29..69b6e2c65f 100644 --- a/patches/api/Missing-Entity-API.patch +++ b/patches/api/Missing-Entity-API.patch @@ -257,6 +257,29 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + int getTicksSincePollination(); + // Paper end } +diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/entity/Bogged.java ++++ b/src/main/java/org/bukkit/entity/Bogged.java +@@ -0,0 +0,0 @@ import org.jetbrains.annotations.ApiStatus; + */ + @ApiStatus.Experimental + public interface Bogged extends AbstractSkeleton, Shearable { ++ ++ /** ++ * Gets whether the bogged is in its sheared state. ++ * ++ * @return Whether the bogged is sheared. ++ */ ++ boolean isSheared(); ++ ++ /** ++ * Sets whether the bogged is in its sheared state. ++ * ++ * @param flag Whether to shear the bogged ++ */ ++ void setSheared(boolean flag); + } diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Cat.java @@ -1107,6 +1130,29 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** * Get the variant of this salmon. +diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/entity/Sheep.java ++++ b/src/main/java/org/bukkit/entity/Sheep.java +@@ -0,0 +0,0 @@ import org.bukkit.material.Colorable; + * Represents a Sheep. + */ + public interface Sheep extends Animals, Colorable, Shearable { ++ ++ /** ++ * Gets whether the sheep is in its sheared state. ++ * ++ * @return Whether the sheep is sheared. ++ */ ++ boolean isSheared(); ++ ++ /** ++ * Sets whether the sheep is in its sheared state. ++ * ++ * @param flag Whether to shear the sheep ++ */ ++ void setSheared(boolean flag); + } diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/TNTPrimed.java