[vintage] Add biome blend option, small changes to .lang file #19

Merged
embeddedt merged 11 commits from karnatour/celeritas:stonecutter into stonecutter 2025-08-06 18:28:27 -04:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 52b9c836fb - Show all commits

No files matched your search

@@ -26,6 +26,7 @@ import org.embeddedt.embeddium.impl.util.PositionUtil;
import org.embeddedt.embeddium.impl.util.position.SectionPos; import org.embeddedt.embeddium.impl.util.position.SectionPos;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.joml.Vector3i; import org.joml.Vector3i;
import org.taumc.celeritas.CeleritasVintage;
import org.taumc.celeritas.impl.compat.fluidlogged.FluidloggedCompat; import org.taumc.celeritas.impl.compat.fluidlogged.FluidloggedCompat;
import org.taumc.celeritas.impl.render.terrain.CeleritasWorldRenderer; import org.taumc.celeritas.impl.render.terrain.CeleritasWorldRenderer;
import org.taumc.celeritas.impl.world.biome.BiomeColorCache; import org.taumc.celeritas.impl.world.biome.BiomeColorCache;
@@ -172,7 +173,7 @@ public class WorldSlice implements CeleritasBlockAccess {
this.sections = new ClonedChunkSection[SECTION_TABLE_ARRAY_SIZE]; this.sections = new ClonedChunkSection[SECTION_TABLE_ARRAY_SIZE];
this.blockStatesArrays = new IBlockState[SECTION_TABLE_ARRAY_SIZE][]; this.blockStatesArrays = new IBlockState[SECTION_TABLE_ARRAY_SIZE][];
this.biomeCaches = new Biome[SECTION_TABLE_ARRAY_SIZE][16 * 16]; this.biomeCaches = new Biome[SECTION_TABLE_ARRAY_SIZE][16 * 16];
this.biomeColorCache = new BiomeColorCache(this, 3); this.biomeColorCache = new BiomeColorCache(this, CeleritasVintage.options().quality.biomeBlendRadius);
if(!FluidloggedCompat.IS_LOADED) this.fluidStatesArrays = null; if(!FluidloggedCompat.IS_LOADED) this.fluidStatesArrays = null;
else this.fluidStatesArrays = new Object[SECTION_TABLE_ARRAY_SIZE][]; else this.fluidStatesArrays = new Object[SECTION_TABLE_ARRAY_SIZE][];
@@ -17,12 +17,12 @@ public class BiomeColorHelperMixin {
@Overwrite @Overwrite
private static int getColorAtPos(IBlockAccess blockAccess, BlockPos pos, BiomeColorHelper.ColorResolver colorResolver) private static int getColorAtPos(IBlockAccess blockAccess, BlockPos pos, BiomeColorHelper.ColorResolver colorResolver)
{ {
int radius = CeleritasVintage.options().quality.biomeBlendRadius; if (blockAccess instanceof CeleritasBlockAccess) {
if (blockAccess instanceof CeleritasBlockAccess && radius == 0) {
// Use Sodium's more efficient biome cache // Use Sodium's more efficient biome cache
return ((CeleritasBlockAccess)blockAccess).getBlockTint(pos, colorResolver); return ((CeleritasBlockAccess)blockAccess).getBlockTint(pos, colorResolver);
} }
int radius = CeleritasVintage.options().quality.biomeBlendRadius;
if (radius == 0) { if (radius == 0) {
return colorResolver.getColorAtPos(blockAccess.getBiome(pos), pos); return colorResolver.getColorAtPos(blockAccess.getBiome(pos), pos);
} else { } else {