mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Add Horse Animation API (#5599)
This commit is contained in:
@@ -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java
|
||||
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
|
Reference in New Issue
Block a user