Fix spawn eggs with no entity creating invalid stacks and disconnect creative clients

Example: /give @s minecraft:cat_spawn_egg[minecraft:max_stack_size=1,minecraft:max_damage=100,minecraft:damage=10] 1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2024-06-10 14:06:38 +10:00
parent b365899587
commit cd2a1a6d7e

View File

@ -151,10 +151,6 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
void applyToItem(CraftMetaItem.Applicator tag) {
super.applyToItem(tag);
if (!isSpawnEggEmpty() && entityTag == null) {
entityTag = new NBTTagCompound();
}
if (entityTag != null) {
tag.put(ENTITY_TAG, CustomData.of(entityTag));
}