Skip to content

Commit 6d15499

Browse files
CoPokBlmworzala
authored andcommitted
Fix to biome palette issue
1 parent 36132bd commit 6d15499

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/net/hollowcube/polar/PolarLoader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ private void loadSection(@NotNull PolarSection sectionData, @NotNull Section sec
251251
section.biomePalette().fill(biomePalette[0]);
252252
} else {
253253
final var paletteData = sectionData.biomeData();
254-
for (int y = 0; y < CHUNK_SECTION_SIZE; y++) {
255-
for (int z = 0; z < CHUNK_SECTION_SIZE; z++) {
256-
for (int x = 0; x < CHUNK_SECTION_SIZE; x++) {
257-
int index = x / 4 + (z / 4) * 4 + (y / 4) * 16;
254+
for (int y = 0; y < CHUNK_SECTION_SIZE/4; y++) {
255+
for (int z = 0; z < CHUNK_SECTION_SIZE/4; z++) {
256+
for (int x = 0; x < CHUNK_SECTION_SIZE/4; x++) {
257+
int index = x + (z) * 4 + (y) * 16;
258258

259259
var paletteIndex = paletteData[index];
260260
if (paletteIndex >= biomePalette.length) {

0 commit comments

Comments
 (0)