From 0000000000000000000000000000000000000000 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 3d9ee3a7305b0575387e719ac4062c4a355d63e8..853561c0b3507808c70f4274812407d1ffb37504 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1397,5 +1397,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { this.entity.setRot(location.getYaw(), location.getPitch()); return !this.entity.valid && this.entity.level().addFreshEntity(this.entity, reason); } + + @Override + public boolean isInPowderedSnow() { + return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed. + } // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java index 956ddd955e6f9b2f02ef05b0e95150c9c90c3107..16e6325a944c1eb21dd5a3835aa8a00d238e7b5d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java +++ b/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 }