Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 00:23:03 +01:00
Quietly handle unmappable Java items
If vanilla can handle them, so can we.
Dieser Commit ist enthalten in:
Ursprung
93726f5818
Commit
7e773c9970
@ -125,8 +125,12 @@ public abstract class ItemTranslator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ItemEntry bedrockItem = ItemRegistry.getItem(stack);
|
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
|
// This is a fallback for maps with no nbt
|
||||||
if (nbt == null && bedrockItem.getJavaIdentifier().equals("minecraft:filled_map")) {
|
if (nbt == null && bedrockItem.getJavaIdentifier().equals("minecraft:filled_map")) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren