Skip to content

Commit

Permalink
Enchantement ids were not retrieved correctly during deserialization (#…
Browse files Browse the repository at this point in the history
…3906)

* the enchantment id is a String but it was got as a short

* remove getting and setting the id
  • Loading branch information
AlexandreArcil authored Nov 5, 2023
1 parent f1975c6 commit f16405e
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit f16405e

Please sign in to comment.