Skip to content

Commit

Permalink
fix: items deserializing with an empty NBT tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Mar 5, 2024
1 parent 371132d commit dc277e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]

### Fixed
- Fixed items in disks deserializing with an empty NBT tag.
- Fixed placing fluids in the pattern grid disconnecting the client.

## [1.13.0-beta.2] - 2024-02-16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public static ItemStack deserializeStackFromNbt(CompoundTag tag) {
return AttachmentInternals.reconstructItemStack(
BuiltInRegistries.ITEM.get(new ResourceLocation(tag.getString(NBT_ITEM_ID))),
tag.getInt(NBT_ITEM_QUANTITY),
tag.getCompound(NBT_ITEM_NBT)
tag.contains(NBT_ITEM_NBT) ? tag.getCompound(NBT_ITEM_NBT) : null
);
}
}

0 comments on commit dc277e2

Please sign in to comment.