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 984e6fa489e6b3d833d5f83dd739a6ff8a3ec5f0..f05d8107368e639adf60f3e5d944c65300087a3c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1381,5 +1381,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 }