aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKobe ⑧ <[email protected]>2024-12-08 14:05:17 -0800
committerGitHub <[email protected]>2024-12-08 17:05:17 -0500
commit15b2aa1d30a24f07671671cf82fe09fdce1f3b03 (patch)
tree9e4076b8113c64dc5ff74ccd9c3792a7e20a4b76
parent07ef2bbab97ec883bdad515ba4db1bff65dfcc81 (diff)
downloadPaper-15b2aa1d30a24f07671671cf82fe09fdce1f3b03.tar.gz
Paper-15b2aa1d30a24f07671671cf82fe09fdce1f3b03.zip
Readd shear methods from bukkit Shearable (#11715)
* Re-add shear methods from bukkit Shearable * Add back
-rw-r--r--patches/api/0287-Missing-Entity-API.patch46
-rw-r--r--patches/api/0389-Add-Shearable-API.patch16
-rw-r--r--patches/api/0427-Experimental-annotations-change.patch7
3 files changed, 60 insertions, 9 deletions
diff --git a/patches/api/0287-Missing-Entity-API.patch b/patches/api/0287-Missing-Entity-API.patch
index 573742d40d..9a69c042f9 100644
--- a/patches/api/0287-Missing-Entity-API.patch
+++ b/patches/api/0287-Missing-Entity-API.patch
@@ -257,6 +257,29 @@ index adb20a9abba33c32d553f620fa82b27dff64ab5f..1f6702b0de00b87dbed7f6d93e911655
+ 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 8b75a505a55a96a5795ac31a2d37307add12cd9e..0e5aaf54df0a5d0995147a905daef52442b070c5 100644
+--- a/src/main/java/org/bukkit/entity/Bogged.java
++++ b/src/main/java/org/bukkit/entity/Bogged.java
+@@ -7,4 +7,18 @@ 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 104b9c8a28ddbab8f47dbf3a0ac06bec35d7c003..5101553bb71d60fee7ac234f7ef2863781dd7742 100644
--- a/src/main/java/org/bukkit/entity/Cat.java
@@ -1107,6 +1130,29 @@ index 407aa5de170a3f0160c197a2b228f2e3b3269387..d8a2d44fe50a9ab24d8916aad270dfba
/**
* 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 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..9ed473e5e993ef2d9558fe18bbcea7dad9b42994 100644
+--- a/src/main/java/org/bukkit/entity/Sheep.java
++++ b/src/main/java/org/bukkit/entity/Sheep.java
+@@ -6,4 +6,18 @@ 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 0813bd913c8fdb2001963ce3e82c07c2af105418..87e717c9ea61b0cbf536bc62fa829ddcfae5ad8c 100644
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
diff --git a/patches/api/0389-Add-Shearable-API.patch b/patches/api/0389-Add-Shearable-API.patch
index 8dd853b0fb..29875e12d9 100644
--- a/patches/api/0389-Add-Shearable-API.patch
+++ b/patches/api/0389-Add-Shearable-API.patch
@@ -55,16 +55,18 @@ index 0000000000000000000000000000000000000000..3991f2aa530c588f52e1f596d3b03743
+ boolean readyToBeSheared();
+}
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
-index 8b75a505a55a96a5795ac31a2d37307add12cd9e..6296a6f3f3e794677fd3a626376f357c740ec356 100644
+index 0e5aaf54df0a5d0995147a905daef52442b070c5..6093b1dad8ad48708267a83bf4c1ad20467b3cf9 100644
--- a/src/main/java/org/bukkit/entity/Bogged.java
+++ b/src/main/java/org/bukkit/entity/Bogged.java
-@@ -6,5 +6,5 @@ import org.jetbrains.annotations.ApiStatus;
+@@ -6,7 +6,7 @@ import org.jetbrains.annotations.ApiStatus;
* Represents a Bogged Skeleton.
*/
@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 cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644
--- a/src/main/java/org/bukkit/entity/MushroomCow.java
@@ -114,16 +116,18 @@ index 0215d20f81bfbef080f86ce46147a38f71310f65..9967c8a52ddd2c7e10db49a3f1667313
void setSheared(boolean flag);
}
diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java
-index 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..01a0e5b1bb18d7a28d68329c2e2ab78a8df45f8e 100644
+index 9ed473e5e993ef2d9558fe18bbcea7dad9b42994..f67f478945a7ba99bf72601678a153553526799a 100644
--- a/src/main/java/org/bukkit/entity/Sheep.java
+++ b/src/main/java/org/bukkit/entity/Sheep.java
-@@ -5,5 +5,5 @@ import org.bukkit.material.Colorable;
+@@ -5,7 +5,7 @@ import org.bukkit.material.Colorable;
/**
* Represents a Sheep.
*/
-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 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644
--- a/src/main/java/org/bukkit/entity/Snowman.java
diff --git a/patches/api/0427-Experimental-annotations-change.patch b/patches/api/0427-Experimental-annotations-change.patch
index 8570aa9c75..52cbc8f45a 100644
--- a/patches/api/0427-Experimental-annotations-change.patch
+++ b/patches/api/0427-Experimental-annotations-change.patch
@@ -88,16 +88,17 @@ index 60fbacee263e55f91ac977f020e390d46024723a..ecff691c3a0878659fb051926ef769ce
/**
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
-index 6296a6f3f3e794677fd3a626376f357c740ec356..7d993f8bd18ec1d3260d12f0ff8078a86ee4867d 100644
+index 6093b1dad8ad48708267a83bf4c1ad20467b3cf9..c84ddf808e2062dae7f68d574f05fbbc05273144 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;
+@@ -5,7 +5,6 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Represents a Bogged Skeleton.
*/
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 a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644
--- a/src/main/java/org/bukkit/entity/Breeze.java