mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-18 12:48:53 +01:00
da9d110d5b
This patch does not appear to be doing anything useful, and may hide errors. Currently, the save logic does not run through this path either so it did not do anything. Additionally, properly implement support for handling RegionFileSizeException in Moonrise.
26 lines
1.3 KiB
Diff
26 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:23 +0100
|
|
Subject: [PATCH] Add api for spawn egg texture colors
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
index 789f98d0a6bbe240714ae965dfa1312439ce09cf..0d530bcefc0ceb00a60a70d454ec96d24de8c7e5 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
@@ -637,6 +637,15 @@ 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);
|
|
+ return eggItem == null ? null : org.bukkit.Color.fromRGB(eggItem.getColor(layer));
|
|
+ }
|
|
+ // Paper end - spawn egg color visibility
|
|
+
|
|
/**
|
|
* This helper class represents the different NBT Tags.
|
|
* <p>
|