Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-09-19 02:20:04 +02:00
Take biome data from same indexes as Mojang ("middle" of 4x4x4 areas)
Dieser Commit ist enthalten in:
Ursprung
decb20d2d1
Commit
68a18df969
@ -86,18 +86,18 @@ public class WorldPackets {
|
|||||||
if (chunk.isGroundUp()) {
|
if (chunk.isGroundUp()) {
|
||||||
int[] biomeData = chunk.getBiomeData();
|
int[] biomeData = chunk.getBiomeData();
|
||||||
int[] newBiomeData = new int[1024];
|
int[] newBiomeData = new int[1024];
|
||||||
// Now in 4x4x4 areas (x, then z, then y)
|
// Now in 4x4x4 areas - take the biome of each "middle"
|
||||||
// Set the x/z data
|
for (int i = 0; i < 4; ++i) {
|
||||||
int i = 0;
|
for (int j = 0; j < 4; ++j) {
|
||||||
for (int z = 1; z <= 16; z += 4) {
|
int x = (j << 2) + 2;
|
||||||
for (int x = 1; x <= 16; x += 4) {
|
int z = (i << 2) + 2;
|
||||||
int biome = biomeData[(x * z) - 1];
|
int oldIndex = (z << 4 | x);
|
||||||
// Extend it on the y axis
|
newBiomeData[i << 2 | j] = biomeData[oldIndex];
|
||||||
for (int y = 0; y < 1024; y += 16) {
|
|
||||||
newBiomeData[i + y] = biome;
|
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
// ... and copy it to the new y layers
|
||||||
|
for (int i = 1; i < 64; ++i) {
|
||||||
|
System.arraycopy(newBiomeData, 0, newBiomeData, i * 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
chunk.setBiomeData(newBiomeData);
|
chunk.setBiomeData(newBiomeData);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren