Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed Jul 17, 2024
1 parent 669a76c commit 406eae2
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ public class CampfireBlockEntityTranslator extends BlockEntityTranslator {
public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) {
List<NbtMap> items = javaNbt.getList("Items", NbtType.COMPOUND);
if (items != null) {
int i = 1;
for (NbtMap itemTag : items) {
bedrockNbt.put("Item" + i, getItem(session, itemTag));
i++;
int slot = itemTag.getByte("Slot") + 1;
bedrockNbt.put("Item" + slot, getItem(session, itemTag));
}
}
}
Expand All @@ -55,8 +54,7 @@ protected NbtMap getItem(GeyserSession session, NbtMap tag) {
if (mapping == null) {
mapping = ItemMapping.AIR;
}
NbtMapBuilder tagBuilder = BedrockItemBuilder.createItemNbt(mapping, tag.getByte("Count"), mapping.getBedrockData());
tagBuilder.put("tag", NbtMap.builder().build()); // I don't think this is necessary... - Camo, 1.20.5/1.20.80
NbtMapBuilder tagBuilder = BedrockItemBuilder.createItemNbt(mapping, tag.getInt("count"), mapping.getBedrockData());
return tagBuilder.build();
}
}

0 comments on commit 406eae2

Please sign in to comment.