3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-24 23:30:22 +01:00
Dieser Commit ist enthalten in:
Camotoy 2024-07-17 14:21:41 -04:00
Ursprung 669a76c628
Commit 406eae2a91
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -42,10 +42,9 @@ public class CampfireBlockEntityTranslator extends BlockEntityTranslator {
public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) {
List<NbtMap> items = javaNbt.getList("Items", NbtType.COMPOUND); List<NbtMap> items = javaNbt.getList("Items", NbtType.COMPOUND);
if (items != null) { if (items != null) {
int i = 1;
for (NbtMap itemTag : items) { for (NbtMap itemTag : items) {
bedrockNbt.put("Item" + i, getItem(session, itemTag)); int slot = itemTag.getByte("Slot") + 1;
i++; bedrockNbt.put("Item" + slot, getItem(session, itemTag));
} }
} }
} }
@ -55,8 +54,7 @@ public class CampfireBlockEntityTranslator extends BlockEntityTranslator {
if (mapping == null) { if (mapping == null) {
mapping = ItemMapping.AIR; mapping = ItemMapping.AIR;
} }
NbtMapBuilder tagBuilder = BedrockItemBuilder.createItemNbt(mapping, tag.getByte("Count"), mapping.getBedrockData()); NbtMapBuilder tagBuilder = BedrockItemBuilder.createItemNbt(mapping, tag.getInt("count"), mapping.getBedrockData());
tagBuilder.put("tag", NbtMap.builder().build()); // I don't think this is necessary... - Camo, 1.20.5/1.20.80
return tagBuilder.build(); return tagBuilder.build();
} }
} }