From dd15ee83b2cdd49d40c00d16f675e0e84c959129 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 24 Oct 2021 20:58:52 -0700 Subject: [PATCH] Entity powdered snow API --- paper-api/src/main/java/org/bukkit/entity/Entity.java | 7 +++++++ .../src/main/java/org/bukkit/entity/Skeleton.java | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index 464668496f..97b8ac9ae8 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -973,5 +973,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent * @return Whether the entity was successfully spawned. */ public boolean spawnAt(@NotNull Location location, @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason); + + /** + * Check if entity is inside powdered snow. + * + * @return true if in powdered snow. + */ + boolean isInPowderedSnow(); // Paper end } diff --git a/paper-api/src/main/java/org/bukkit/entity/Skeleton.java b/paper-api/src/main/java/org/bukkit/entity/Skeleton.java index 0944d92030..ce04c03ba5 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Skeleton.java +++ b/paper-api/src/main/java/org/bukkit/entity/Skeleton.java @@ -41,6 +41,16 @@ public interface Skeleton extends AbstractSkeleton { */ void setConversionTime(int time); + // Paper start + /** + * Gets the time the skeleton + * has been inside powdered snow. + * + * @return time in ticks + */ + int inPowderedSnowTime(); + // Paper end + /** * A legacy enum that defines the different variances of skeleton-like * entities on the server.