mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-3605: Spawn eggs not saving internal data
By: md_5 <git@md-5.net>
This commit is contained in:
parent
01186b718b
commit
009d5ad78b
1 changed files with 8 additions and 0 deletions
|
@ -6,6 +6,7 @@ import java.util.Map;
|
|||
import net.minecraft.server.DataConverterTypes;
|
||||
import net.minecraft.server.MinecraftKey;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.NBTBase;
|
||||
import net.minecraft.server.NBTTagCompound;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
|
@ -66,6 +67,13 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
void serializeInternal(Map<String, NBTBase> internalTags) {
|
||||
if (entityTag != null) {
|
||||
internalTags.put(ENTITY_TAG.NBT, entityTag);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
void applyToItem(NBTTagCompound tag) {
|
||||
super.applyToItem(tag);
|
||||
|
|
Loading…
Reference in a new issue