Make spawn egg colours visible (#10158)
Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
This commit is contained in:
parent
4643b0d959
commit
b333831b70
2 changed files with 54 additions and 0 deletions
28
patches/api/0458-Add-api-for-spawn-egg-texture-colors.patch
Normal file
28
patches/api/0458-Add-api-for-spawn-egg-texture-colors.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
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 a4b38f284d4fea7df7f9df9bf44e4f68fefaf20f..923d8655a84e26960d35d8dc6e4ebc0b10c295d5 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -260,4 +260,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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue