mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Make Panda implement Sittable (#7414)
This commit is contained in:
parent
0dc4f76558
commit
1ea50caf00
2 changed files with 24 additions and 2 deletions
|
@ -179,6 +179,15 @@ diff --git a/src/main/java/org/bukkit/entity/Panda.java b/src/main/java/org/bukk
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Panda.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Panda.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Panda entity.
|
||||
*/
|
||||
-public interface Panda extends Animals {
|
||||
+public interface Panda extends Animals, Sittable { // Paper
|
||||
|
||||
/**
|
||||
* Gets this Panda's main gene.
|
||||
@@ -0,0 +0,0 @@ public interface Panda extends Animals {
|
||||
return recessive;
|
||||
}
|
||||
|
@ -281,14 +290,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * Sets if this panda is currently sitting.
|
||||
+ *
|
||||
+ * @param sitting is currently sitting
|
||||
+ * @deprecated use {@link #setSitting(boolean)}
|
||||
+ */
|
||||
+ void setIsSitting(boolean sitting);
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ default void setIsSitting(boolean sitting) {
|
||||
+ this.setSitting(sitting);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if this panda is currently sitting.
|
||||
+ *
|
||||
+ * @param sitting is currently sitting
|
||||
+ */
|
||||
+ @Override
|
||||
+ void setSitting(boolean sitting);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if this panda is sitting.
|
||||
+ *
|
||||
+ * @return is sitting
|
||||
+ */
|
||||
+ @Override
|
||||
+ boolean isSitting();
|
||||
+ // Paper end - Panda API
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setIsSitting(boolean sitting) {
|
||||
+ public void setSitting(boolean sitting) {
|
||||
+ this.getHandle().sit(sitting);
|
||||
+ }
|
||||
+ // Paper end - Panda API
|
||||
|
|
Loading…
Reference in a new issue