Lake fixes & textures

This commit is contained in:
paulevsGitch 2020-11-02 00:50:53 +03:00
parent 1fd085b331
commit c285bb5136
17 changed files with 30 additions and 19 deletions

View file

@ -110,39 +110,50 @@ public class LakePiece extends BasePiece {
pos.setY(maxY ++); pos.setY(maxY ++);
} }
for (int y = maxY; y >= minY; y--) { for (int y = maxY; y >= minY; y--) {
pos.setY(y - 1); pos.setY(y);
BlockState state = chunk.getBlockState(pos); BlockState state = chunk.getBlockState(pos);
if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) { if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) {
pos.setY(y);
chunk.setBlockState(pos, y > 56 ? AIR : WATER, false); chunk.setBlockState(pos, y > 56 ? AIR : WATER, false);
} }
else { else {
pos.setY(y);
break; break;
} }
} }
pos.setY(MHelper.floor(minY - 1)); maxY = MHelper.randRange(2, 3, random);
if (pos.getY() == 57 && chunk.getBlockState(pos).isIn(EndTags.GEN_TERRAIN)) { for (int i = 0; i < maxY; i++) {
BlockState state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getTopMaterial(); pos.setY(pos.getY() - 1);
chunk.setBlockState(pos, state, false);
}
if (pos.getY() < 57) {
BlockState state = chunk.getBlockState(pos); BlockState state = chunk.getBlockState(pos);
if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) { if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) {
if (pos.getY() > 56) {
pos.setY(pos.getY() + 1);
state = chunk.getBlockState(pos);
pos.setY(pos.getY() - 1);
if (state.getMaterial().isReplaceable()) {
state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getTopMaterial();
}
else {
state = EndBlocks.ENDSTONE_DUST.getDefaultState(); state = EndBlocks.ENDSTONE_DUST.getDefaultState();
if (pos.getY() == 56 && random.nextBoolean()) { }
chunk.setBlockState(pos, state, false);
}
else if (pos.getY() == 56) {
if (random.nextBoolean()) {
state = EndBlocks.ENDSTONE_DUST.getDefaultState();
}
else {
state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getTopMaterial(); state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getTopMaterial();
} }
chunk.setBlockState(pos, state, false); chunk.setBlockState(pos, state, false);
pos.setY(pos.getY() - 1);
state = chunk.getBlockState(pos);
if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) {
chunk.setBlockState(pos, EndBlocks.ENDSTONE_DUST.getDefaultState(), false);
pos.setY(pos.getY() - 1);
} }
if (!chunk.getBlockState(pos).isIn(EndTags.GEN_TERRAIN)) { else {
chunk.setBlockState(pos, EndBlocks.ENDSTONE_DUST.getDefaultState(), false);
}
}
else {
if (state.getMaterial().isReplaceable()) {
chunk.setBlockState(pos, Blocks.END_STONE.getDefaultState(), false); chunk.setBlockState(pos, Blocks.END_STONE.getDefaultState(), false);
} }
break;
} }
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B