mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Luis <luisc99@icloud.com>
|
|
Date: Thu, 11 Jan 2024 19:58:17 +0100
|
|
Subject: [PATCH] Add api for spawn egg texture colors
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
|
index f261bd5971003e542e4806c1a989add8e0143466..02d34db5f44ed63c4635077eb2b3cb98ac94b7b2 100644
|
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
|
@@ -252,4 +252,17 @@ public interface UnsafeValues {
|
|
// Paper end - namespaced key biome methods
|
|
|
|
String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic); // Paper - fix custom stats criteria creation
|
|
+
|
|
+ // Paper start - spawn egg color visibility
|
|
+ /**
|
|
+ * Obtains the underlying color informating for a spawn egg of a given
|
|
+ * entity type, or null if the entity passed does not have a spawn egg.
|
|
+ * Spawn eggs have two colors - the background layer (0), and the
|
|
+ * foreground layer (1)
|
|
+ * @param entityType The entity type to get the color for
|
|
+ * @param layer The texture layer to get a color for
|
|
+ * @return The color of the layer for the entity's spawn egg
|
|
+ */
|
|
+ @Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer);
|
|
+ // Paper end - spawn egg color visibility
|
|
}
|