Add Horse Animation API (#5599)
This commit is contained in:
parent
bb397ba74c
commit
f47aeafe00
3 changed files with 132 additions and 2 deletions
|
@ -4,6 +4,65 @@ Date: Fri, 28 May 2021 21:06:59 -0400
|
|||
Subject: [PATCH] Missing Entity Behavior API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java
|
||||
index 2bbf1d074b7d46e176f2589db7abe5e3ef47871c..e023ed37963177e35bfe78105768ca6b2af6c2a1 100644
|
||||
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java
|
||||
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
|
||||
@@ -105,4 +105,54 @@ public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable {
|
||||
@NotNull
|
||||
@Override
|
||||
public AbstractHorseInventory getInventory();
|
||||
+
|
||||
+ // Paper start - Horse API
|
||||
+ /**
|
||||
+ * Gets if a horse is in their eating grass animation.
|
||||
+ *
|
||||
+ * @return eating grass animation is active
|
||||
+ */
|
||||
+ public boolean isEatingGrass();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if a horse is in their eating grass animation.
|
||||
+ *
|
||||
+ * <p>When true, the horse will lower its neck.</p>
|
||||
+ *
|
||||
+ * @param eating eating grass animation is active
|
||||
+ */
|
||||
+ public void setEatingGrass(boolean eating);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if a horse is in their rearing animation.
|
||||
+ *
|
||||
+ * @return rearing animation is active
|
||||
+ */
|
||||
+ public boolean isRearing();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if a horse is in their rearing animation.
|
||||
+ *
|
||||
+ * <p>When true, the horse will stand on its hind legs.</p>
|
||||
+ *
|
||||
+ * @param rearing rearing animation is active
|
||||
+ */
|
||||
+ public void setRearing(boolean rearing);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if a horse is in their eating animation.
|
||||
+ *
|
||||
+ * @return eating animation is active
|
||||
+ */
|
||||
+ public boolean isEating();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if a horse is in their eating animation.
|
||||
+ *
|
||||
+ * <p>When true, the horse will bob its head.</p>
|
||||
+ *
|
||||
+ * @param eating eating animation is active
|
||||
+ */
|
||||
+ public void setEating(boolean eating);
|
||||
+ // Paper end - Horse API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index c2a566b864c82ffb094b7334d9e6e25a1bfc87d1..c340fecb61bac66baf0f44189d21bc85289b1269 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue