From f16405eaa3f6408a0c8933087f21eadaf6dbd505 Mon Sep 17 00:00:00 2001 From: CanardNocturne Date: Sun, 5 Nov 2023 17:20:12 +0100 Subject: [PATCH] Enchantement ids were not retrieved correctly during deserialization (#3906) * the enchantment id is a String but it was got as a short * remove getting and setting the id --- .../java/org/spongepowered/common/item/SpongeItemStack.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/org/spongepowered/common/item/SpongeItemStack.java b/src/main/java/org/spongepowered/common/item/SpongeItemStack.java index 8e2f0b58c30..09f89cb9756 100644 --- a/src/main/java/org/spongepowered/common/item/SpongeItemStack.java +++ b/src/main/java/org/spongepowered/common/item/SpongeItemStack.java @@ -356,10 +356,8 @@ public static void fixEnchantmentData(final ItemType itemType, final CompoundTag for (int i = 0; i < nbttaglist.size(); ++i) { final CompoundTag nbttagcompound = nbttaglist.getCompound(i); - final short id = nbttagcompound.getShort(Constants.Item.ITEM_ENCHANTMENT_ID); final short lvl = nbttagcompound.getShort(Constants.Item.ITEM_ENCHANTMENT_LEVEL); - nbttagcompound.putShort(Constants.Item.ITEM_ENCHANTMENT_ID, id); nbttagcompound.putShort(Constants.Item.ITEM_ENCHANTMENT_LEVEL, lvl); } }