aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0323-Entity-powdered-snow-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0323-Entity-powdered-snow-API.patch')
-rw-r--r--patches/api/0323-Entity-powdered-snow-API.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/api/0323-Entity-powdered-snow-API.patch b/patches/api/0323-Entity-powdered-snow-API.patch
new file mode 100644
index 0000000000..b00af3e946
--- /dev/null
+++ b/patches/api/0323-Entity-powdered-snow-API.patch
@@ -0,0 +1,44 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Sun, 24 Oct 2021 20:58:52 -0700
+Subject: [PATCH] Entity powdered snow API
+
+
+diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
+index 461a48f8aa049e9b9e13acca3d54978212d9688c..1cfeb862f6a036cfd68b60cdc2364834f353f4b4 100644
+--- a/src/main/java/org/bukkit/entity/Entity.java
++++ b/src/main/java/org/bukkit/entity/Entity.java
+@@ -969,5 +969,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/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
+index e0ccc090a0be507ced4d5669491311e410f60a67..472a71ca8dad0d49f0723e5fdf58bf00a55190f2 100644
+--- a/src/main/java/org/bukkit/entity/Skeleton.java
++++ b/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.