aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0323-Entity-powdered-snow-API.patch
blob: 648ddec205a6799c39a8236163e9412a51a30797 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
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 18fa592f9159a5377eeac8325c0b8e16f74be7b8..5b49ac1e3f1f03675f9aa13acd8061adb6ad5cc3 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -973,5 +973,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.