forked from GeyserMC/Geyser
Implement more block mappings
This commit is contained in:
parent
ab6bd51334
commit
03bf12ee65
2 changed files with 20 additions and 1 deletions
|
@ -67,7 +67,6 @@ public class JavaChunkDataTranslator extends PacketTranslator<ServerChunkDataPac
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
GeyserLogger.DEFAULT.info("Sent chunk packet!");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class Remapper {
|
||||||
BedrockItem bedrockItem = bedrockItemEntry.getValue();
|
BedrockItem bedrockItem = bedrockItemEntry.getValue();
|
||||||
String identifier = bedrockItem.getIdentifier();
|
String identifier = bedrockItem.getIdentifier();
|
||||||
|
|
||||||
|
// Colorable block remapping
|
||||||
for (ColoredBlock coloredBlock : ColoredBlock.values()) {
|
for (ColoredBlock coloredBlock : ColoredBlock.values()) {
|
||||||
if (!getBedrockIdentifier(coloredBlock.name()).equalsIgnoreCase(bedrockItem.getIdentifier().replace(MINECRAFT, "")))
|
if (!getBedrockIdentifier(coloredBlock.name()).equalsIgnoreCase(bedrockItem.getIdentifier().replace(MINECRAFT, "")))
|
||||||
continue;
|
continue;
|
||||||
|
@ -48,6 +49,7 @@ public class Remapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wood remapping
|
||||||
for (WoodBlock woodBlock : WoodBlock.values()) {
|
for (WoodBlock woodBlock : WoodBlock.values()) {
|
||||||
if (!getBedrockIdentifier(woodBlock.name()).equalsIgnoreCase(bedrockItem.getIdentifier().replace(MINECRAFT, "")))
|
if (!getBedrockIdentifier(woodBlock.name()).equalsIgnoreCase(bedrockItem.getIdentifier().replace(MINECRAFT, "")))
|
||||||
continue;
|
continue;
|
||||||
|
@ -66,6 +68,7 @@ public class Remapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stone remapping
|
||||||
if (bedrockItem.getIdentifier().replace(MINECRAFT, "").equalsIgnoreCase("stone") && !isTool(bedrockItem.getIdentifier())) {
|
if (bedrockItem.getIdentifier().replace(MINECRAFT, "").equalsIgnoreCase("stone") && !isTool(bedrockItem.getIdentifier())) {
|
||||||
for (StoneType stoneType : StoneType.values()) {
|
for (StoneType stoneType : StoneType.values()) {
|
||||||
if (stoneType.getId() != bedrockItem.getData())
|
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()) {
|
for (Map.Entry<String, JavaItem> javaItemEntry : javaItems.entrySet()) {
|
||||||
if (identifier.equalsIgnoreCase(javaItemEntry.getKey())) {
|
if (identifier.equalsIgnoreCase(javaItemEntry.getKey())) {
|
||||||
bedrockToJava.put(bedrockItemEntry.getValue(), javaItemEntry.getValue());
|
bedrockToJava.put(bedrockItemEntry.getValue(), javaItemEntry.getValue());
|
||||||
|
|
Loading…
Reference in a new issue