diff options
author | md_5 <git@md-5.net> | 2017-10-09 18:32:45 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-10-09 18:32:45 +1100 |
commit | 9ab758c7b608854ec658450227c2a17e51845de5 (patch) | |
tree | 0d2332be1ea9a0b21bf7dbeffeffb3190600d0a0 /src/main/java/org | |
parent | 6733aa5635dfaeed4d8d20cb6a64280d4de1b33c (diff) | |
download | craftbukkit-9ab758c7b608854ec658450227c2a17e51845de5.tar craftbukkit-9ab758c7b608854ec658450227c2a17e51845de5.tar.gz craftbukkit-9ab758c7b608854ec658450227c2a17e51845de5.tar.lz craftbukkit-9ab758c7b608854ec658450227c2a17e51845de5.tar.xz craftbukkit-9ab758c7b608854ec658450227c2a17e51845de5.zip |
SPIGOT-3605: Spawn eggs not saving internal data
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java index 782a781e..2f438eb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -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; @@ -67,6 +68,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); |