From 33f49c215c1d5b604229f1173007374fef4bebc0 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 24 Oct 2021 20:58:43 -0700 Subject: [PATCH] Entity powdered snow API == AT == public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime --- .../java/org/bukkit/craftbukkit/entity/CraftEntity.java | 7 +++++++ .../java/org/bukkit/craftbukkit/entity/CraftSkeleton.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index b13c947d2c..442b5f13e9 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1095,6 +1095,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } // Paper end - raw entity serialization API + // Paper start - entity powdered snow API + @Override + public boolean isInPowderedSnow() { + return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed. + } + // Paper end - entity powdered snow API + // Paper start - missing entity api @Override public boolean isInvisible() { // Paper - moved up from LivingEntity diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java index a0ea54181d..6f98da9be6 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java @@ -45,4 +45,11 @@ public class CraftSkeleton extends CraftAbstractSkeleton implements Skeleton { public SkeletonType getSkeletonType() { return SkeletonType.NORMAL; } + + // Paper start + @Override + public int inPowderedSnowTime() { + return getHandle().inPowderSnowTime; + } + // Paper end }