3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 16:12:46 +01:00

Map bamboo jungle [hills] to their Bedrock ID

Dieser Commit ist enthalten in:
Camotoy 2021-07-23 21:42:08 -04:00
Ursprung da66a01a9a
Commit a93f3119f6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
2 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -71,12 +71,14 @@ public class BiomeUtils {
private static int biomeID(int[] biomeData, int x, int y, int z) { private static int biomeID(int[] biomeData, int x, int y, int z) {
int biomeId = biomeData[((y >> 2) & 63) << 4 | ((z >> 2) & 3) << 2 | ((x >> 2) & 3)]; int biomeId = biomeData[((y >> 2) & 63) << 4 | ((z >> 2) & 3) << 2 | ((x >> 2) & 3)];
if (biomeId == 0) { if (biomeId >= 40 && biomeId <= 43) { // Java has multiple End dimensions that Bedrock doesn't recognize
biomeId = 42; // Ocean
} else if (biomeId >= 40 && biomeId <= 43) { // Java has multiple End dimensions that Bedrock doesn't recognize
biomeId = 9; biomeId = 9;
} else if (biomeId >= 170) { // Nether biomes. Dunno why it's like this :microjang: } else if (biomeId >= 170 && biomeId <= 173) { // 1.16 nether biomes. Dunno why it's like this :microjang:
biomeId += 8; biomeId += 8;
} else if (biomeId == 168) { // Bamboo jungle
biomeId = 48;
} else if (biomeId == 169) { // Bamboo jungle hills
biomeId = 49;
} }
return biomeId; return biomeId;
} }

Datei anzeigen

@ -107,6 +107,8 @@ public class ChunkUtils {
byteBuf.writeBytes(EMPTY_BIOME_DATA); byteBuf.writeBytes(EMPTY_BIOME_DATA);
} }
byteBuf.writeByte(0); // Border
EMPTY_CHUNK_DATA = new byte[byteBuf.readableBytes()]; EMPTY_CHUNK_DATA = new byte[byteBuf.readableBytes()];
byteBuf.readBytes(EMPTY_CHUNK_DATA); byteBuf.readBytes(EMPTY_CHUNK_DATA);
} finally { } finally {