Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Minor cleanup upon initial block remap
Dieser Commit ist enthalten in:
Ursprung
72589fabcd
Commit
6cb80dea28
@ -99,7 +99,7 @@ public class ItemTranslator {
|
||||
public BedrockItem getBedrockBlock(BlockState state) {
|
||||
BedrockItem bedrockItem = Remapper.BLOCK_REMAPPER.convertToBedrock(new ItemStack(state.getId()));
|
||||
if (bedrockItem == null) {
|
||||
//GeyserLogger.DEFAULT.debug("Missing mapping for java item " + state.getId());
|
||||
// GeyserLogger.DEFAULT.debug("Missing mapping for java block " + state.getId());
|
||||
return BedrockItem.AIR;
|
||||
}
|
||||
|
||||
|
@ -31,15 +31,13 @@ public class Toolbox {
|
||||
Map<String, BedrockItem> bedrockBlocks = new HashMap<>();
|
||||
Map<String, BedrockItem> bedrockItems = new HashMap<>();
|
||||
|
||||
for (Map<String, Object> e : entries) {
|
||||
BedrockItem bedrockItem = new BedrockItem((String) e.get("name"), (int) e.get("id"), (int) e.get("data"));
|
||||
bedrockBlocks.put(bedrockItem.getIdentifier(), bedrockItem);
|
||||
bedrockItems.put(bedrockItem.getIdentifier() + ":" + bedrockItem.getData(), bedrockItem);
|
||||
}
|
||||
|
||||
ByteBuf b = Unpooled.buffer();
|
||||
VarInts.writeUnsignedInt(b, entries.size());
|
||||
for (Map<String, Object> e : entries) {
|
||||
BedrockItem bedrockItem = new BedrockItem((String) e.get("name"), (int) e.get("id"), (int) e.get("data"));
|
||||
bedrockItems.put(bedrockItem.getIdentifier() + ":" + bedrockItem.getData(), bedrockItem);
|
||||
bedrockBlocks.put(bedrockItem.getIdentifier() + ":" + bedrockItem.getData(), bedrockItem);
|
||||
|
||||
GlobalBlockPalette.registerMapping((int) e.get("id") << 4 | (int) e.get("data"));
|
||||
BedrockUtils.writeString(b, (String) e.get("name"));
|
||||
b.writeShortLE((int) e.get("data"));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren