Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Implement more block mappings
Dieser Commit ist enthalten in:
Ursprung
ab6bd51334
Commit
03bf12ee65
@ -67,7 +67,6 @@ public class JavaChunkDataTranslator extends PacketTranslator<ServerChunkDataPac
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
GeyserLogger.DEFAULT.info("Sent chunk packet!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ public class Remapper {
|
||||
BedrockItem bedrockItem = bedrockItemEntry.getValue();
|
||||
String identifier = bedrockItem.getIdentifier();
|
||||
|
||||
// Colorable block remapping
|
||||
for (ColoredBlock coloredBlock : ColoredBlock.values()) {
|
||||
if (!getBedrockIdentifier(coloredBlock.name()).equalsIgnoreCase(bedrockItem.getIdentifier().replace(MINECRAFT, "")))
|
||||
continue;
|
||||
@ -48,6 +49,7 @@ public class Remapper {
|
||||
}
|
||||
}
|
||||
|
||||
// Wood remapping
|
||||
for (WoodBlock woodBlock : WoodBlock.values()) {
|
||||
if (!getBedrockIdentifier(woodBlock.name()).equalsIgnoreCase(bedrockItem.getIdentifier().replace(MINECRAFT, "")))
|
||||
continue;
|
||||
@ -66,6 +68,7 @@ public class Remapper {
|
||||
}
|
||||
}
|
||||
|
||||
// Stone remapping
|
||||
if (bedrockItem.getIdentifier().replace(MINECRAFT, "").equalsIgnoreCase("stone") && !isTool(bedrockItem.getIdentifier())) {
|
||||
for (StoneType stoneType : StoneType.values()) {
|
||||
if (stoneType.getId() != bedrockItem.getData())
|
||||
@ -76,6 +79,23 @@ public class Remapper {
|
||||
}
|
||||
}
|
||||
|
||||
// Grass remapping
|
||||
if (bedrockItem.getIdentifier().replace(MINECRAFT, "").equalsIgnoreCase("grass")) {
|
||||
identifier = MINECRAFT + "grass_block";
|
||||
}
|
||||
|
||||
if (bedrockItem.getIdentifier().replace(MINECRAFT, "").equalsIgnoreCase("tallgrass")) {
|
||||
identifier = MINECRAFT + "grass";
|
||||
}
|
||||
|
||||
// Dirt remapping
|
||||
if (bedrockItem.getIdentifier().replace(MINECRAFT, "").equalsIgnoreCase("dirt")) {
|
||||
if (bedrockItem.getData() == 0)
|
||||
identifier = MINECRAFT + "dirt";
|
||||
else
|
||||
identifier = MINECRAFT + "coarse_dirt";
|
||||
}
|
||||
|
||||
for (Map.Entry<String, JavaItem> javaItemEntry : javaItems.entrySet()) {
|
||||
if (identifier.equalsIgnoreCase(javaItemEntry.getKey())) {
|
||||
bedrockToJava.put(bedrockItemEntry.getValue(), javaItemEntry.getValue());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren