Fix potential mutability issue with CraftMetaItem copy constructor

This commit is contained in:
md_5 2024-06-15 07:03:03 +10:00
parent 9958854527
commit a7e576186d
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -320,7 +320,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
this.damage = meta.damage; this.damage = meta.damage;
this.maxDamage = meta.maxDamage; this.maxDamage = meta.maxDamage;
this.unhandledTags = meta.unhandledTags; this.unhandledTags.copy(meta.unhandledTags.build());
this.removedTags.addAll(meta.removedTags); this.removedTags.addAll(meta.removedTags);
this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw());