Skip to content

Commit

Permalink
Remove empty item tags
Browse files Browse the repository at this point in the history
Fixes #752
  • Loading branch information
kennytv committed May 21, 2024
1 parent a9ed655 commit d7f550f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,13 @@ private static int colorId(final String color) {
if (item == null) return null;

super.handleItemToClient(connection, item);
return vvProtocol.getItemRewriter().toOldItem(connection, item, DATA_CONVERTER);

final Item oldItem = vvProtocol.getItemRewriter().toOldItem(connection, item, DATA_CONVERTER);
if (oldItem.tag() != null && oldItem.tag().isEmpty()) {
// Improve item equality checks by removing empty tags
oldItem.setTag(null);
}
return oldItem;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ public void registerPackets() {
do {
slot = wrapper.read(Types.BYTE);
if (slot == 6) {
//TODO
// Body to... something else? the actual inventory slot is still broken for llamas
// Incoming click also needs to be fixed
//TODO Body to... something else?
slot = 2;
}

Expand Down

0 comments on commit d7f550f

Please sign in to comment.