Commits

md_5 authored 50fbc3f1903
SPIGOT-4576: Fix attributes in itemstack internal data being lost
No tags

src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java

Modified
104 104 void applyToItem(NBTTagCompound tag) {
105 105 super.applyToItem(tag);
106 106
107 107 if (blockEntityTag != null) {
108 108 tag.set(BLOCK_ENTITY_TAG.NBT, blockEntityTag);
109 109 }
110 110 }
111 111
112 112 @Override
113 113 void deserializeInternal(NBTTagCompound tag, Object context) {
114 + super.deserializeInternal(tag, context);
115 +
114 116 if (tag.hasKeyOfType(BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
115 117 blockEntityTag = tag.getCompound(BLOCK_ENTITY_TAG.NBT);
116 118 }
117 119 }
118 120
119 121 @Override
120 122 void serializeInternal(final Map<String, NBTBase> internalTags) {
121 123 if (blockEntityTag != null) {
122 124 internalTags.put(BLOCK_ENTITY_TAG.NBT, blockEntityTag);
123 125 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut