Readd shear methods from bukkit Shearable (#11715)

* Re-add shear methods from bukkit Shearable

* Add back
This commit is contained in:
Kobe ⑧ 2024-12-08 14:05:17 -08:00
parent 5cd1518c9a
commit cc10499354
3 changed files with 54 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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