From e5c2af7f5ec3ef902623eba4ad50769ab797cd2a Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 11 Jan 2024 19:58:23 +0100 Subject: [PATCH] Add api for spawn egg texture colors --- .../bukkit/craftbukkit/util/CraftMagicNumbers.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java index 066d8f0592..44abd5742f 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -637,6 +637,18 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end + // Paper start - spawn egg color visibility + @Override + public org.bukkit.Color getSpawnEggLayerColor(final EntityType entityType, final int layer) { + final net.minecraft.world.entity.EntityType nmsType = org.bukkit.craftbukkit.entity.CraftEntityType.bukkitToMinecraft(entityType); + final net.minecraft.world.item.SpawnEggItem eggItem = net.minecraft.world.item.SpawnEggItem.byId(nmsType); + if (eggItem != null) { + throw new UnsupportedOperationException("Not yet implemented"); + } + return eggItem == null ? null : org.bukkit.Color.fromRGB(1); // TODO + } + // Paper end - spawn egg color visibility + /** * This helper class represents the different NBT Tags. *