mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-29 09:15:27 +00:00
Resurface shallow tidal banks
- Keep the biome surface layer on tidal bank cuts of 6 blocks or less
This commit is contained in:
3 files changed
+25
No files matched your search
@@ -1405,6 +1405,11 @@ public class IrisComplex implements DataProvider {
|
||||
return tier == null ? pondMaterials : tier.materials();
|
||||
}
|
||||
|
||||
public boolean isTidalBank(int x, int z) {
|
||||
WaterRole role = resolveWaterRole(x, z);
|
||||
return (role == WaterRole.BANK || role == WaterRole.SHORE) && chunkRasterAt(x, z).tier(x & 15, z & 15) == hydrologyRuntime.settings().tidalTier();
|
||||
}
|
||||
|
||||
public HydrologyVegetation.Decorators resolveWaterDecorators(int x, int z) {
|
||||
if (!waterVegetation.planted()) {
|
||||
return HydrologyVegetation.Decorators.EMPTY;
|
||||
|
||||
@@ -51,6 +51,7 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<NativeBloc
|
||||
private static final BoundBlockState DIRT = BoundBlockState.of("minecraft:dirt");
|
||||
private static final BoundBlockState NETHERRACK = BoundBlockState.of("minecraft:netherrack");
|
||||
private static final int INLET_SEA_LAYERS = 1;
|
||||
private static final int TIDAL_BANK_SHALLOW_CUT = 6;
|
||||
@Getter
|
||||
private final RNG rng;
|
||||
|
||||
@@ -313,6 +314,9 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<NativeBloc
|
||||
int naturalSurfaceY = naturalColumn == null
|
||||
? complex.naturalTrueHeight(realX, realZ) : naturalColumn.surfaceY(layerSurfaceY);
|
||||
cut = Math.max(0, naturalSurfaceY - layerSurfaceY);
|
||||
if (cut <= TIDAL_BANK_SHALLOW_CUT && complex.isTidalBank(realX, realZ)) {
|
||||
cut = 0;
|
||||
}
|
||||
}
|
||||
blocks = biome.generateLayers(dimension, realX, realZ, rng,
|
||||
layerSurfaceY + cut + 1 - bedrockFloor, layerSurfaceY + cut, data, complex);
|
||||
|
||||
Reference in new issue
Block a user