Paper/patches/api/0450-Add-api-for-spawn-egg-texture-colors.patch
Riley Park f17519338b
Expose server build information (#10729)
* Expose server build information

* squash patches

* final tweaks

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2024-05-15 17:06:59 -07:00

29 lines
1.3 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 289346bcd0ef42cfaf2afc270eeb7525e520ce80..ffb22192e08b9d47ac2667efa0d62a548f14d46b 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -259,4 +259,17 @@ public interface UnsafeValues {
String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic);
// Paper end
+
+ // 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
}