Skip to content

Commit

Permalink
Fix DefaultStackStringifyHandler not using short for item id (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune authored Oct 15, 2023
1 parent 744b2ff commit 1647e87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ addon.local.gradle
addon.local.gradle.kts
addon.late.local.gradle
addon.late.local.gradle.kts
layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ItemStack convertNBTToItemStack(NBTTagCompound nbtTag) {
final String strId = nbtTag.getString("strId");

nbtTag = (NBTTagCompound) nbtTag.copy();
nbtTag.setInteger("id", GameData.getItemRegistry().getId(strId)); // getObject
nbtTag.setShort("id", (short) GameData.getItemRegistry().getId(strId)); // getObject

final ItemStack stack = ItemStack.loadItemStackFromNBT(nbtTag);

Expand Down

0 comments on commit 1647e87

Please sign in to comment.