3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-07-31 09:38:06 +02:00

Quietly handle unmappable Java items

If vanilla can handle them, so can we.
Dieser Commit ist enthalten in:
Camotoy 2021-03-02 19:10:17 -05:00
Ursprung 93726f5818
Commit 7e773c9970
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -125,8 +125,12 @@ public abstract class ItemTranslator {
}
ItemEntry bedrockItem = ItemRegistry.getItem(stack);
if (bedrockItem == null) {
session.getConnector().getLogger().debug("No matching ItemEntry for " + stack);
return ItemData.AIR;
}
com.github.steveice10.opennbt.tag.builtin.CompoundTag nbt = stack.getNbt() != null ? stack.getNbt().clone() : null;
CompoundTag nbt = stack.getNbt() != null ? stack.getNbt().clone() : null;
// This is a fallback for maps with no nbt
if (nbt == null && bedrockItem.getJavaIdentifier().equals("minecraft:filled_map")) {