2021-12-22 04:52:54 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
Date: Sun, 24 Oct 2021 20:58:43 -0700
|
|
|
|
Subject: [PATCH] Entity powdered snow API
|
|
|
|
|
2022-11-20 00:53:20 +01:00
|
|
|
== AT ==
|
|
|
|
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
|
2021-12-22 04:52:54 +01:00
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
2023-06-08 10:08:08 +02:00
|
|
|
index 4628f436e054ab79daa11b3921f66acfc0faa325..50b40994fa4ad13941b1dfd16eec8edeeb0bf399 100644
|
2021-12-22 04:52:54 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
2023-03-14 21:55:49 +01:00
|
|
|
@@ -1377,5 +1377,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
2021-12-22 04:52:54 +01:00
|
|
|
entity.setRot(location.getYaw(), location.getPitch());
|
|
|
|
return !entity.valid && entity.level.addFreshEntity(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 90f34d75f99f31f5c98c499df209979a03e23191..1737857424c5da885c46f39502cafd2a670d3be7 100644
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
|
|
@@ -51,4 +51,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
|
|
|
|
}
|