-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
Doesn't matter as it can be seen it in Source of CraftMetaItem.java - CraftBukkit - SpigotMC Stash
-
1.20.5
-
Yes
See the following code within CraftMetaItem#applyToItem:
if (!persistentDataContainer.isEmpty()) { NBTTagCompound bukkitCustomCompound = new NBTTagCompound(); Map<String, NBTBase> rawPublicMap = persistentDataContainer.getRaw(); for (Map.Entry<String, NBTBase> nbtBaseEntry : rawPublicMap.entrySet()) { bukkitCustomCompound.put(nbtBaseEntry.getKey(), nbtBaseEntry.getValue()); } if (customTag == null) { customTag = new NBTTagCompound(); } customTag.put(BUKKIT_CUSTOM_TAG.BUKKIT, bukkitCustomCompound); } if (customTag != null) { itemTag.put(CUSTOM_DATA, CustomData.of(customTag)); } }
As you can see the customTag is only being updated in case there is any entry, meaning that it does not get updated if the last entry within the PDC gets removed. The proper solution would be to remove the
BUKKIT_CUSTOM_TAG.BUKKIT
in case the PDC is empty.