Skip to content

Commit

Permalink
Fix biome colors being retrieved differently from vanilla (#2131)
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt authored Oct 31, 2023
1 parent 09965a9 commit e4250e9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import me.jellysquid.mods.sodium.client.util.color.BoxBlur;
import me.jellysquid.mods.sodium.client.util.color.BoxBlur.ColorBuffer;
import me.jellysquid.mods.sodium.client.world.cloned.ChunkRenderContext;
import net.minecraft.client.color.world.BiomeColors;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.biome.Biome;

Expand Down Expand Up @@ -78,9 +79,9 @@ private void updateColorBuffers(int relY) {
int relativeX = worldX - this.minX;
int relativeZ = worldZ - this.minZ;

slice.grass.set(relativeX, relativeZ, biome.getGrassColorAt(worldX, worldZ));
slice.foliage.set(relativeX, relativeZ, biome.getFoliageColor());
slice.water.set(relativeX, relativeZ, biome.getWaterColor());
slice.grass.set(relativeX, relativeZ, BiomeColors.GRASS_COLOR.getColor(biome, worldX, worldZ));
slice.foliage.set(relativeX, relativeZ, BiomeColors.FOLIAGE_COLOR.getColor(biome, worldX, worldZ));
slice.water.set(relativeX, relativeZ, BiomeColors.WATER_COLOR.getColor(biome, worldX, worldZ));
}
}

Expand Down

0 comments on commit e4250e9

Please sign in to comment.