Lake generation fixes
This commit is contained in:
parent
064c8509e2
commit
5f516ac2a0
1 changed files with 11 additions and 24 deletions
|
@ -108,7 +108,7 @@ public class LakePiece extends BasePiece {
|
||||||
double x3 = MHelper.sqr(x2 + noise.eval(nx, nz, 100) * 10);
|
double x3 = MHelper.sqr(x2 + noise.eval(nx, nz, 100) * 10);
|
||||||
double z3 = MHelper.sqr(z2 + noise.eval(nx, nz, -100) * 10);
|
double z3 = MHelper.sqr(z2 + noise.eval(nx, nz, -100) * 10);
|
||||||
|
|
||||||
for (int y = minY; y <= maxY; y++) {
|
for (int y = maxY; y >= minY; y--) {
|
||||||
mut.setY((int) (y + n));
|
mut.setY((int) (y + n));
|
||||||
double y2 = MHelper.sqr((y - center.getY()) * aspect);
|
double y2 = MHelper.sqr((y - center.getY()) * aspect);
|
||||||
double r2 = radius * clamp;
|
double r2 = radius * clamp;
|
||||||
|
@ -132,15 +132,10 @@ public class LakePiece extends BasePiece {
|
||||||
)) {
|
)) {
|
||||||
state = chunk.getBlockState(mut.above());
|
state = chunk.getBlockState(mut.above());
|
||||||
if (state.isAir()) {
|
if (state.isAir()) {
|
||||||
state = EndBiome.findTopMaterial(world, worldPos);
|
state = random.nextBoolean() ? ENDSTONE : EndBiome.findTopMaterial(world, worldPos);
|
||||||
// state = random.nextBoolean() ? ENDSTONE : world.getBiome(worldPos)
|
|
||||||
// .getGenerationSettings()
|
|
||||||
// .getSurfaceBuilderConfig()
|
|
||||||
// .getTopMaterial();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
state = state.getFluidState()
|
state = state.getFluidState().isEmpty() ? ENDSTONE : EndBlocks.ENDSTONE_DUST.defaultBlockState();
|
||||||
.isEmpty() ? ENDSTONE : EndBlocks.ENDSTONE_DUST.defaultBlockState();
|
|
||||||
}
|
}
|
||||||
chunk.setBlockState(mut, state, false);
|
chunk.setBlockState(mut, state, false);
|
||||||
}
|
}
|
||||||
|
@ -168,15 +163,10 @@ public class LakePiece extends BasePiece {
|
||||||
|
|
||||||
BlockState bState = chunk.getBlockState(mut);
|
BlockState bState = chunk.getBlockState(mut);
|
||||||
if (bState.isAir()) {
|
if (bState.isAir()) {
|
||||||
bState = EndBiome.findTopMaterial(world, mut.offset(sx, 0, sz));
|
bState = random.nextBoolean() ? ENDSTONE : EndBiome.findTopMaterial(world, mut.offset(sx, 0, sz));
|
||||||
// bState = random.nextBoolean() ? ENDSTONE : world.getBiome(mut.offset(sx, 0, sz))
|
|
||||||
// .getGenerationSettings()
|
|
||||||
// .getSurfaceBuilderConfig()
|
|
||||||
// .getTopMaterial();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bState = bState.getFluidState()
|
bState = bState.getFluidState().isEmpty() ? ENDSTONE : EndBlocks.ENDSTONE_DUST.defaultBlockState();
|
||||||
.isEmpty() ? ENDSTONE : EndBlocks.ENDSTONE_DUST.defaultBlockState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mut.setY(y);
|
mut.setY(y);
|
||||||
|
@ -191,15 +181,10 @@ public class LakePiece extends BasePiece {
|
||||||
mut.setY(y + 1);
|
mut.setY(y + 1);
|
||||||
BlockState bState = chunk.getBlockState(mut);
|
BlockState bState = chunk.getBlockState(mut);
|
||||||
if (bState.isAir()) {
|
if (bState.isAir()) {
|
||||||
bState =EndBiome.findTopMaterial(world, mut.offset(sx, 0, sz));
|
bState = random.nextBoolean() ? ENDSTONE : EndBiome.findTopMaterial(world, mut.offset(sx, 0, sz));
|
||||||
// bState = random.nextBoolean() ? ENDSTONE : world.getBiome(mut.offset(sx, 0, sz))
|
|
||||||
// .getGenerationSettings()
|
|
||||||
// .getSurfaceBuilderConfig()
|
|
||||||
// .getTopMaterial();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bState = bState.getFluidState()
|
bState = bState.getFluidState().isEmpty() ? ENDSTONE : EndBlocks.ENDSTONE_DUST.defaultBlockState();
|
||||||
.isEmpty() ? ENDSTONE : EndBlocks.ENDSTONE_DUST.defaultBlockState();
|
|
||||||
}
|
}
|
||||||
mut.setY(y);
|
mut.setY(y);
|
||||||
makeEndstonePillar(chunk, mut, bState);
|
makeEndstonePillar(chunk, mut, bState);
|
||||||
|
@ -209,10 +194,12 @@ public class LakePiece extends BasePiece {
|
||||||
}
|
}
|
||||||
else if (chunk.getBlockState(mut.move(Direction.UP)).isAir()) {
|
else if (chunk.getBlockState(mut.move(Direction.UP)).isAir()) {
|
||||||
//TODO: 1.18 test if this is thr right tick
|
//TODO: 1.18 test if this is thr right tick
|
||||||
chunk.markPosForPostprocessing(mut.move(Direction.DOWN));
|
chunk.markPosForPostprocessing(mut.move(Direction.DOWN).immutable());
|
||||||
// /*chunk.getLiquidTicks()*/world.scheduleTick(mut.move(Direction.DOWN), state.getType(), 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (chunk.getBlockState(mut).isRandomlyTicking()) {
|
||||||
|
chunk.markPosForPostprocessing(mut.immutable());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue