Fixes & improvements
This commit is contained in:
parent
b375d76956
commit
10fae49f6a
10 changed files with 51 additions and 15 deletions
|
@ -11,6 +11,7 @@ public class BiomeBlossomingSpires extends EndBiome {
|
|||
.setFogColor(241, 146, 229)
|
||||
.setFogDensity(1.7F)
|
||||
.setPlantsColor(122, 45, 122)
|
||||
.setCaves(false)
|
||||
.setSurface(EndBlocks.PINK_MOSS)
|
||||
.setMusic(EndSounds.MUSIC_BLOSSOMING_SPIRES)
|
||||
.setLoop(EndSounds.AMBIENT_BLOSSOMING_SPIRES)
|
||||
|
|
|
@ -59,6 +59,7 @@ public class BiomeDefinition {
|
|||
|
||||
private final Identifier id;
|
||||
private float genChance = 1F;
|
||||
private boolean hasCaves = true;
|
||||
|
||||
private ConfiguredSurfaceBuilder<?> surface;
|
||||
|
||||
|
@ -198,6 +199,11 @@ public class BiomeDefinition {
|
|||
this.music = music;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BiomeDefinition setCaves(boolean hasCaves) {
|
||||
this.hasCaves = hasCaves;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Biome build() {
|
||||
SpawnSettings.Builder spawnSettings = new SpawnSettings.Builder();
|
||||
|
@ -255,4 +261,8 @@ public class BiomeDefinition {
|
|||
public float getGenChance() {
|
||||
return genChance;
|
||||
}
|
||||
|
||||
public boolean hasCaves() {
|
||||
return hasCaves;
|
||||
}
|
||||
}
|
|
@ -11,6 +11,7 @@ public class BiomeDustWastelands extends EndBiome {
|
|||
super(new BiomeDefinition("dust_wastelands")
|
||||
.setFogColor(226, 239, 168)
|
||||
.setFogDensity(2)
|
||||
.setCaves(false)
|
||||
.setWaterColor(192, 180, 131)
|
||||
.setWaterFogColor(192, 180, 131)
|
||||
.setSurface(EndBlocks.ENDSTONE_DUST)
|
||||
|
|
|
@ -11,6 +11,7 @@ public class BiomePaintedMountains extends EndBiome {
|
|||
super(new BiomeDefinition("painted_mountains")
|
||||
.setFogColor(226, 239, 168)
|
||||
.setFogDensity(2)
|
||||
.setCaves(false)
|
||||
.setWaterColor(192, 180, 131)
|
||||
.setWaterFogColor(192, 180, 131)
|
||||
.setMusic(EndSounds.MUSIC_DUST_WASTELANDS)
|
||||
|
|
|
@ -11,6 +11,7 @@ public class BiomeSulfurSprings extends EndBiome {
|
|||
.setSurface(SurfaceBuilders.SULPHURIC_SURFACE)
|
||||
.setFogColor(207, 194, 62)
|
||||
.setFogDensity(1.5F)
|
||||
.setCaves(false)
|
||||
.setParticles(EndParticles.SULPHUR_PARTICLE, 0.001F)
|
||||
.addFeature(EndFeatures.GEYSER)
|
||||
.addFeature(EndFeatures.SULPHURIC_LAKE)
|
||||
|
|
|
@ -32,6 +32,7 @@ public class EndBiome {
|
|||
protected float genChance = 1;
|
||||
|
||||
private final float fogDensity;
|
||||
private final boolean hasCaves;
|
||||
private EndFeature structuresFeature;
|
||||
private Biome actualBiome;
|
||||
|
||||
|
@ -40,14 +41,16 @@ public class EndBiome {
|
|||
mcID = definition.getID();
|
||||
fogDensity = definition.getFodDensity();
|
||||
genChanceUnmutable = definition.getGenChance();
|
||||
hasCaves = definition.hasCaves();
|
||||
readStructureList();
|
||||
}
|
||||
|
||||
public EndBiome(Identifier id, Biome biome, float fogDensity, float genChance) {
|
||||
public EndBiome(Identifier id, Biome biome, float fogDensity, float genChance, boolean hasCaves) {
|
||||
this.biome = biome;
|
||||
this.mcID = id;
|
||||
this.fogDensity = fogDensity;
|
||||
this.genChanceUnmutable = genChance;
|
||||
this.hasCaves = hasCaves;
|
||||
readStructureList();
|
||||
}
|
||||
|
||||
|
@ -165,4 +168,8 @@ public class EndBiome {
|
|||
public float getGenChance() {
|
||||
return this.genChance;
|
||||
}
|
||||
|
||||
public boolean hasCaves() {
|
||||
return hasCaves;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,8 +92,22 @@ public class SulphuricLakeFeature extends DefaultFeature {
|
|||
}
|
||||
else {
|
||||
BlocksHelper.setWithoutUpdate(world, POS, Blocks.WATER);
|
||||
brimstone.remove(POS);
|
||||
for (Direction dir: BlocksHelper.HORIZONTAL) {
|
||||
BlockPos offseted = POS.offset(dir);
|
||||
if (world.getBlockState(offseted).isIn(EndTags.GEN_TERRAIN)) {
|
||||
brimstone.add(offseted);
|
||||
}
|
||||
}
|
||||
if (isDeepWater(world, POS)) {
|
||||
BlocksHelper.setWithoutUpdate(world, POS.move(Direction.DOWN), Blocks.WATER);
|
||||
brimstone.remove(POS);
|
||||
for (Direction dir: BlocksHelper.HORIZONTAL) {
|
||||
BlockPos offseted = POS.offset(dir);
|
||||
if (world.getBlockState(offseted).isIn(EndTags.GEN_TERRAIN)) {
|
||||
brimstone.add(offseted);
|
||||
}
|
||||
}
|
||||
}
|
||||
brimstone.add(POS.down());
|
||||
if (random.nextBoolean()) {
|
||||
|
@ -179,9 +193,9 @@ public class SulphuricLakeFeature extends DefaultFeature {
|
|||
private void makeShards(StructureWorldAccess world, BlockPos pos, Random random) {
|
||||
for (Direction dir: BlocksHelper.DIRECTIONS) {
|
||||
BlockPos side;
|
||||
if (random.nextInt(4) == 0 && world.getBlockState((side = pos.offset(dir))).getMaterial().isReplaceable()) {
|
||||
if (random.nextInt(3) == 0 && world.getBlockState((side = pos.offset(dir))).isOf(Blocks.WATER)) {
|
||||
BlockState state = EndBlocks.SULPHUR_CRYSTAL.getDefaultState()
|
||||
.with(BlockSulphurCrystal.WATERLOGGED, world.getBlockState(side).isOf(Blocks.WATER))
|
||||
.with(BlockSulphurCrystal.WATERLOGGED, true)
|
||||
.with(BlockSulphurCrystal.FACING, dir)
|
||||
.with(BlockSulphurCrystal.AGE, random.nextInt(3));
|
||||
BlocksHelper.setWithoutUpdate(world, side, state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue