Lotus update & simple lakes fix

This commit is contained in:
paulevsGitch 2020-12-19 14:07:10 +03:00
parent b5773c5f9c
commit c6b2760c94
13 changed files with 25 additions and 4 deletions

View file

@ -7,6 +7,7 @@ import com.google.common.collect.Maps;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.Material;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtHelper;
import net.minecraft.structure.StructureManager;
@ -135,6 +136,7 @@ public class LakePiece extends BasePiece {
for (int i = 0; i < maxY; i++) {
pos.setY(pos.getY() - 1);
BlockState state = chunk.getBlockState(pos);
//boolean isReplaceable = state.getMaterial().isReplaceable();
if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) {
if (pos.getY() > 56) {
chunk.setBlockState(pos, AIR, false);
@ -151,17 +153,36 @@ public class LakePiece extends BasePiece {
state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getTopMaterial();
}
chunk.setBlockState(pos, state, false);
state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getUnderMaterial();
int count = (int) (noise1.eval((pos.getX() + sx) * 0.1, (pos.getZ() + sz) * 0.1) + 2);//MHelper.randRange(1, 2, random);
for (int n = 0; n < count; n++) {
pos.setY(pos.getY() - 1);
chunk.setBlockState(pos, state, false);
}
break;
}
else {
chunk.setBlockState(pos, EndBlocks.ENDSTONE_DUST.getDefaultState(), false);
state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getUnderMaterial();
int count = (int) (noise1.eval((pos.getX() + sx) * 0.1, (pos.getZ() + sz) * 0.1) + 2);//int count = MHelper.randRange(1, 2, random);
for (int n = 0; n < count; n++) {
pos.setY(pos.getY() - 1);
chunk.setBlockState(pos, state, false);
}
break;
}
}
else {
if (state.getMaterial().isReplaceable()) {
chunk.setBlockState(pos, Blocks.END_STONE.getDefaultState(), false);
/*if (pos.getY() < 57 && !state.isIn(EndTags.GEN_TERRAIN)) {
state = world.getBiome(pos.add(sx, 0, sz)).getGenerationSettings().getSurfaceConfig().getUnderMaterial();
int count = MHelper.randRange(2, 4, random);
for (int n = 0; n < count; n++) {
chunk.setBlockState(pos, state, false);
pos.setY(pos.getY() - 1);
}
break;
}
}*/
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 460 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 455 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 611 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 443 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 430 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

After

Width:  |  Height:  |  Size: 280 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 508 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

After

Width:  |  Height:  |  Size: 470 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 423 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 669 B

Before After
Before After