Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-09-08 20:43:04 +02:00
Ursprung
9bf3334cb0
Commit
0d1fedbdbf
@ -126,11 +126,10 @@ public class BiomeTranslator {
|
|||||||
storage = new BlockStorage(bitArray, bedrockPalette);
|
storage = new BlockStorage(bitArray, bedrockPalette);
|
||||||
} else {
|
} else {
|
||||||
storage = new BlockStorage(0);
|
storage = new BlockStorage(0);
|
||||||
BitArray bitArray = storage.getBitArray();
|
|
||||||
|
|
||||||
// Each section of biome corresponding to a chunk section contains 4 * 4 * 4 entries
|
// Each section of biome corresponding to a chunk section contains 4 * 4 * 4 entries
|
||||||
for (int i = 0; i < 64; i++) {
|
for (int i = 0; i < 64; i++) {
|
||||||
int javaId = biomeData.getPalette().idToState(biomeData.getStorage().get(i));
|
int javaId = palette.idToState(biomeData.getStorage().get(i));
|
||||||
int x = i & 3;
|
int x = i & 3;
|
||||||
int y = (i >> 4) & 3;
|
int y = (i >> 4) & 3;
|
||||||
int z = (i >> 2) & 3;
|
int z = (i >> 2) & 3;
|
||||||
@ -139,7 +138,9 @@ public class BiomeTranslator {
|
|||||||
int idx = storage.idFor(biomeId);
|
int idx = storage.idFor(biomeId);
|
||||||
// Convert biome coordinates into block coordinates
|
// Convert biome coordinates into block coordinates
|
||||||
// Bedrock expects a full 4096 blocks
|
// Bedrock expects a full 4096 blocks
|
||||||
multiplyIdToStorage(bitArray, idx, x, y, z);
|
// Implementation note: storage.getBitArray() must be called and not stored - if the palette
|
||||||
|
// grows, then the instance can change
|
||||||
|
multiplyIdToStorage(storage.getBitArray(), idx, x, y, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return storage;
|
return storage;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren