Expand Panda API (#7061)
This commit is contained in:
parent
99cf01f993
commit
6d67504ab5
3 changed files with 201 additions and 0 deletions
|
@ -175,3 +175,120 @@ index 498e182846b81d50b3a594254e8b341fb23e8763..3826363a1954afcddaadec7f96ac1830
|
|||
+ public boolean isFaceplanted();
|
||||
+ // Paper end - Add more fox behavior API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Panda.java b/src/main/java/org/bukkit/entity/Panda.java
|
||||
index a6a7429ed2e1eefb2b12b7480ed74fcc3963a864..9d065625be5931d970d7f34e1225fae1af960314 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Panda.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Panda.java
|
||||
@@ -63,4 +63,112 @@ public interface Panda extends Animals {
|
||||
return recessive;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Paper start - Panda API
|
||||
+ /**
|
||||
+ * Sets the sneeze progress in this animation.
|
||||
+ * This value counts up only if {@link Panda#isSneezing()} is true
|
||||
+ *
|
||||
+ * @param ticks sneeze progress
|
||||
+ */
|
||||
+ void setSneezeTicks(int ticks);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the current sneeze progress, or how many ticks this panda will sneeze for.
|
||||
+ *
|
||||
+ * @return sneeze progress
|
||||
+ */
|
||||
+ int getSneezeTicks();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if the panda is sneezing, which causes the sneeze counter to count.
|
||||
+ * <p>
|
||||
+ * When false, this will automatically set the sneeze ticks to 0.
|
||||
+ *
|
||||
+ * @param sneeze if the panda is sneezing or not
|
||||
+ */
|
||||
+ void setSneezing(boolean sneeze);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the panda is sneezing
|
||||
+ *
|
||||
+ * @return is sneezing
|
||||
+ */
|
||||
+ boolean isSneezing();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the eating ticks for this panda.
|
||||
+ * <p>
|
||||
+ *
|
||||
+ * This starts counting up as long as it is greater than 0.
|
||||
+ *
|
||||
+ * @param ticks eating ticks
|
||||
+ */
|
||||
+ void setEatingTicks(int ticks);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the current eating progress, or how many ticks this panda has been eating for.
|
||||
+ *
|
||||
+ * @return eating progress
|
||||
+ */
|
||||
+ int getEatingTicks();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the number of ticks this panda will be unhappy for.
|
||||
+ * <p>
|
||||
+ * This value counts down.
|
||||
+ *
|
||||
+ * @param ticks unhappy ticks
|
||||
+ */
|
||||
+ void setUnhappyTicks(int ticks);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets how many ticks this panda will be unhappy for.
|
||||
+ *
|
||||
+ * @return unhappy ticks
|
||||
+ */
|
||||
+ int getUnhappyTicks();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if this panda is currently rolling.
|
||||
+ *
|
||||
+ * @param rolling should roll
|
||||
+ */
|
||||
+ void setRolling(boolean rolling);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if this panda is currently rolling on the ground.
|
||||
+ *
|
||||
+ * @return is rolling
|
||||
+ */
|
||||
+ boolean isRolling();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if this panda is currently on its back.
|
||||
+ *
|
||||
+ * @param onBack is on its back
|
||||
+ */
|
||||
+ void setIsOnBack(boolean onBack);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if this panda is currently on its back.
|
||||
+ *
|
||||
+ * @return is on back
|
||||
+ */
|
||||
+ boolean isOnBack();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if this panda is currently sitting.
|
||||
+ *
|
||||
+ * @param sitting is currently sitting
|
||||
+ */
|
||||
+ void setIsSitting(boolean sitting);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if this panda is sitting.
|
||||
+ *
|
||||
+ * @return is sitting
|
||||
+ */
|
||||
+ boolean isSitting();
|
||||
+ // Paper end - Panda API
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue