From 7454ac76edafab7c36f6538ed126344af7396679 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 1 Jan 2022 09:58:01 +1100 Subject: [PATCH] #278: Add API to check and set if horses are grazing hay By: Matthew --- .../main/java/org/bukkit/entity/AbstractHorse.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/AbstractHorse.java b/paper-api/src/main/java/org/bukkit/entity/AbstractHorse.java index 2bbf1d074b..0d88dce997 100644 --- a/paper-api/src/main/java/org/bukkit/entity/AbstractHorse.java +++ b/paper-api/src/main/java/org/bukkit/entity/AbstractHorse.java @@ -102,6 +102,20 @@ public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable { */ public void setJumpStrength(double strength); + /** + * Gets whether the horse is currently grazing hay. + * + * @return true if eating hay + */ + boolean isEatingHaystack(); + + /** + * Sets whether the horse is grazing hay. + * + * @param eatingHaystack new hay grazing status + */ + void setEatingHaystack(boolean eatingHaystack); + @NotNull @Override public AbstractHorseInventory getInventory();