mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-18 12:48:53 +01:00
Readd shear methods from bukkit Shearable (#11715)
* Re-add shear methods from bukkit Shearable * Add back
This commit is contained in:
parent
07ef2bbab9
commit
15b2aa1d30
3 changed files with 60 additions and 9 deletions
|
@ -257,6 +257,29 @@ index adb20a9abba33c32d553f620fa82b27dff64ab5f..1f6702b0de00b87dbed7f6d93e911655
|
||||||
+ int getTicksSincePollination();
|
+ int getTicksSincePollination();
|
||||||
+ // Paper end
|
+ // 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
|
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||||
index 104b9c8a28ddbab8f47dbf3a0ac06bec35d7c003..5101553bb71d60fee7ac234f7ef2863781dd7742 100644
|
index 104b9c8a28ddbab8f47dbf3a0ac06bec35d7c003..5101553bb71d60fee7ac234f7ef2863781dd7742 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||||
|
@ -1107,6 +1130,29 @@ index 407aa5de170a3f0160c197a2b228f2e3b3269387..d8a2d44fe50a9ab24d8916aad270dfba
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the variant of this salmon.
|
* 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
|
diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
|
||||||
index 0813bd913c8fdb2001963ce3e82c07c2af105418..87e717c9ea61b0cbf536bc62fa829ddcfae5ad8c 100644
|
index 0813bd913c8fdb2001963ce3e82c07c2af105418..87e717c9ea61b0cbf536bc62fa829ddcfae5ad8c 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
|
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
|
||||||
|
|
|
@ -55,16 +55,18 @@ index 0000000000000000000000000000000000000000..3991f2aa530c588f52e1f596d3b03743
|
||||||
+ boolean readyToBeSheared();
|
+ boolean readyToBeSheared();
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
|
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
|
--- a/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
+++ b/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.
|
* Represents a Bogged Skeleton.
|
||||||
*/
|
*/
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
-public interface Bogged extends AbstractSkeleton, Shearable {
|
-public interface Bogged extends AbstractSkeleton, Shearable {
|
||||||
+public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
+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
|
diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java
|
||||||
index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644
|
index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/MushroomCow.java
|
--- a/src/main/java/org/bukkit/entity/MushroomCow.java
|
||||||
|
@ -114,16 +116,18 @@ index 0215d20f81bfbef080f86ce46147a38f71310f65..9967c8a52ddd2c7e10db49a3f1667313
|
||||||
void setSheared(boolean flag);
|
void setSheared(boolean flag);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java
|
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
|
--- a/src/main/java/org/bukkit/entity/Sheep.java
|
||||||
+++ b/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.
|
* Represents a Sheep.
|
||||||
*/
|
*/
|
||||||
-public interface Sheep extends Animals, Colorable, Shearable {
|
-public interface Sheep extends Animals, Colorable, Shearable {
|
||||||
+public interface Sheep extends Animals, Colorable, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
+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
|
diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java
|
||||||
index 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644
|
index 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Snowman.java
|
--- a/src/main/java/org/bukkit/entity/Snowman.java
|
||||||
|
|
|
@ -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
|
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
|
--- a/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
+++ b/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.
|
* Represents a Bogged Skeleton.
|
||||||
*/
|
*/
|
||||||
-@ApiStatus.Experimental
|
-@ApiStatus.Experimental
|
||||||
public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
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
|
diff --git a/src/main/java/org/bukkit/entity/Breeze.java b/src/main/java/org/bukkit/entity/Breeze.java
|
||||||
index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644
|
index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Breeze.java
|
--- a/src/main/java/org/bukkit/entity/Breeze.java
|
||||||
|
|
Loading…
Reference in a new issue