Add api for spawn egg texture colors

This commit is contained in:
Luis 2024-01-11 19:58:23 +01:00
parent 0b0012faf2
commit e5c2af7f5e

View file

@ -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.
* <p>