3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/patches/api/0331-Entity-powdered-snow-API.patch
Jake Potrebic 96d5e6ca48
Code Generation for TypedKeys (#9233)
Currently includes generated key holder classes for types
used in the Registry Modification API
2023-11-22 20:56:28 -08:00

45 Zeilen
1.7 KiB
Diff

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 765777b10f5984b0fbdf22ef884e79745d06b4ff..edfce041e0cdfe9d33c385dfa1875017d43def80 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -877,5 +877,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 01d838a60d056bf4b4a8ef9d0ac18c6f91f412e6..c61eba5f400d146a8643542048904e353df94f4b 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.