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
This commit is contained in:
md_5 2024-06-10 14:06:38 +10:00
parent 3b6093b280
commit ab59e847ca
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

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));
}