Tunnel caves fixes
This commit is contained in:
parent
6bd2a08726
commit
d0b23a9c9f
3 changed files with 7 additions and 11 deletions
|
@ -128,8 +128,7 @@ public abstract class EndCaveFeature extends DefaultFeature {
|
||||||
if (wallBlock != null) {
|
if (wallBlock != null) {
|
||||||
for (Vec3i offset : SPHERE) {
|
for (Vec3i offset : SPHERE) {
|
||||||
BlockPos wallPos = pos.offset(offset);
|
BlockPos wallPos = pos.offset(offset);
|
||||||
if (!positions.contains(wallPos) && !placed.contains(wallPos) && world.getBlockState(wallPos)
|
if (!positions.contains(wallPos) && !placed.contains(wallPos) && world.getBlockState(wallPos).is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
||||||
.is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
|
||||||
wallBlock = biome.getWall(wallPos);
|
wallBlock = biome.getWall(wallPos);
|
||||||
BlocksHelper.setWithoutUpdate(world, wallPos, wallBlock);
|
BlocksHelper.setWithoutUpdate(world, wallPos, wallBlock);
|
||||||
placed.add(wallPos);
|
placed.add(wallPos);
|
||||||
|
|
|
@ -74,9 +74,9 @@ public class RoundCaveFeature extends EndCaveFeature {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isReplaceable(BlockState state) {
|
private boolean isReplaceable(BlockState state) {
|
||||||
return state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.getMaterial().isReplaceable() || state.getMaterial()
|
return state.is(TagAPI.BLOCK_GEN_TERRAIN) ||
|
||||||
.equals(Material.PLANT) || state
|
state.getMaterial().isReplaceable() ||
|
||||||
.getMaterial()
|
state.getMaterial().equals(Material.PLANT) ||
|
||||||
.equals(Material.LEAVES);
|
state.getMaterial().equals(Material.LEAVES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.world.biomes.BCLBiome;
|
import ru.bclib.world.biomes.BCLBiome;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBiomes;
|
import ru.betterend.registry.EndBiomes;
|
||||||
|
import ru.betterend.world.biome.EndBiome;
|
||||||
import ru.betterend.world.biome.cave.EndCaveBiome;
|
import ru.betterend.world.biome.cave.EndCaveBiome;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -167,11 +168,7 @@ public class TunelCaveFeature extends EndCaveFeature {
|
||||||
}
|
}
|
||||||
|
|
||||||
floorSets.forEach((biome, floorPositions) -> {
|
floorSets.forEach((biome, floorPositions) -> {
|
||||||
BlockState surfaceBlock = Blocks.END_STONE.defaultBlockState();
|
BlockState surfaceBlock = EndBiome.findTopMaterial(biome);
|
||||||
// BlockState surfaceBlock = biome.getBiome()
|
|
||||||
// .getGenerationSettings()
|
|
||||||
// .getSurfaceBuilderConfig()
|
|
||||||
// .getTopMaterial();
|
|
||||||
placeFloor(world, biome, floorPositions, random, surfaceBlock);
|
placeFloor(world, biome, floorPositions, random, surfaceBlock);
|
||||||
});
|
});
|
||||||
ceilSets.forEach((biome, ceilPositions) -> {
|
ceilSets.forEach((biome, ceilPositions) -> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue