Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Put everything into bedrock mapping
Dieser Commit ist enthalten in:
Ursprung
3972cc7f87
Commit
87e372ce21
@ -149,168 +149,15 @@ public class BlockTranslator {
|
||||
JAVA_ID_TO_BLOCK_ENTITY_MAP.put(javaBlockState, javaId);
|
||||
}
|
||||
|
||||
int lastIndex = javaId.length() -1;
|
||||
byte rotation = 0;
|
||||
if (javaId.contains("skeleton_skull[")) {
|
||||
if (javaId.indexOf("=") == lastIndex - 2) {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -1, lastIndex));
|
||||
}
|
||||
else {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -2, lastIndex));
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 0);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
else if (javaId.contains("skeleton_wall")) {
|
||||
if (javaId.contains("north")) {
|
||||
rotation = 0;
|
||||
}
|
||||
else if (javaId.contains("east")) {
|
||||
rotation = 4;
|
||||
}
|
||||
else if (javaId.contains("south")) {
|
||||
rotation = 8;
|
||||
}
|
||||
else if(javaId.contains("west")) {
|
||||
rotation = 12;
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 0);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
|
||||
if (javaId.contains("wither_skeleton_skull[")) {
|
||||
if (javaId.indexOf("=") == lastIndex - 2) {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -1, lastIndex));
|
||||
JsonNode skullVariation = entry.getValue().get("variation");
|
||||
if(skullVariation != null) {
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) skullVariation.intValue());
|
||||
}
|
||||
else {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -2, lastIndex));
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 1);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
else if (javaId.contains("wither_skeleton_wall")) {
|
||||
if (javaId.contains("north")) {
|
||||
rotation = 0;
|
||||
}
|
||||
else if (javaId.contains("east")) {
|
||||
rotation = 4;
|
||||
}
|
||||
else if (javaId.contains("south")) {
|
||||
rotation = 8;
|
||||
}
|
||||
else if(javaId.contains("west")) {
|
||||
rotation = 12;
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 1);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
|
||||
if (javaId.contains("zombie_head[")) {
|
||||
if (javaId.indexOf("=") == lastIndex - 2) {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -1, lastIndex));
|
||||
}
|
||||
else {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -2, lastIndex));
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 2);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
else if (javaId.contains("zombie_wall")) {
|
||||
if (javaId.contains("north")) {
|
||||
rotation = 0;
|
||||
}
|
||||
else if (javaId.contains("east")) {
|
||||
rotation = 4;
|
||||
}
|
||||
else if (javaId.contains("south")) {
|
||||
rotation = 8;
|
||||
}
|
||||
else if(javaId.contains("west")) {
|
||||
rotation = 12;
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 2);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
|
||||
if (javaId.contains("player_head[")) {
|
||||
if (javaId.indexOf("=") == lastIndex - 2) {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -1, lastIndex));
|
||||
}
|
||||
else {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -2, lastIndex));
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 3);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
else if (javaId.contains("player_wall")) {
|
||||
if (javaId.contains("north")) {
|
||||
rotation = 0;
|
||||
}
|
||||
else if (javaId.contains("east")) {
|
||||
rotation = 4;
|
||||
}
|
||||
else if (javaId.contains("south")) {
|
||||
rotation = 8;
|
||||
}
|
||||
else if(javaId.contains("west")) {
|
||||
rotation = 12;
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 3);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
|
||||
if (javaId.contains("creeper_head[")) {
|
||||
if (javaId.indexOf("=") == lastIndex - 2) {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -1, lastIndex));
|
||||
}
|
||||
else {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -2, lastIndex));
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 4);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
else if (javaId.contains("creeper_wall")) {
|
||||
if (javaId.contains("north")) {
|
||||
rotation = 0;
|
||||
}
|
||||
else if (javaId.contains("east")) {
|
||||
rotation = 4;
|
||||
}
|
||||
else if (javaId.contains("south")) {
|
||||
rotation = 8;
|
||||
}
|
||||
else if(javaId.contains("west")) {
|
||||
rotation = 12;
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 4);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
|
||||
if (javaId.contains("dragon_head[")) {
|
||||
if (javaId.indexOf("=") == lastIndex - 2) {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -1, lastIndex));
|
||||
}
|
||||
else {
|
||||
rotation = Byte.parseByte(javaId.substring(lastIndex -2, lastIndex));
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 5);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
}
|
||||
else if (javaId.contains("dragon_wall")) {
|
||||
if (javaId.contains("north")) {
|
||||
rotation = 0;
|
||||
}
|
||||
else if (javaId.contains("east")) {
|
||||
rotation = 4;
|
||||
}
|
||||
else if (javaId.contains("south")) {
|
||||
rotation = 8;
|
||||
}
|
||||
else if(javaId.contains("west")) {
|
||||
rotation = 12;
|
||||
}
|
||||
SKULL_VARIANTS.put(javaBlockState, (byte) 5);
|
||||
SKULL_ROTATIONS.put(javaBlockState, rotation);
|
||||
JsonNode skullRotation = entry.getValue().get("skull_rotation");
|
||||
if (skullRotation != null) {
|
||||
SKULL_ROTATIONS.put(javaBlockState, (byte) skullRotation.intValue());
|
||||
}
|
||||
|
||||
// If the Java ID is bed, signal that it needs a tag to show color
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren