Code style changes, entities fixes
This commit is contained in:
parent
9d604b2d25
commit
44962e18b6
377 changed files with 5038 additions and 4914 deletions
|
@ -10,14 +10,14 @@ import ru.betterend.registry.EndFeatures;
|
|||
public class EndBiome extends BCLBiome {
|
||||
public EndBiome(BCLBiomeDef def) {
|
||||
super(updateDef(def));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public EndBiome(ResourceLocation id, Biome biome, float fogDensity, float genChance, boolean hasCaves) {
|
||||
super(id, biome, fogDensity, genChance);
|
||||
this.addCustomData("has_caves", hasCaves);
|
||||
}
|
||||
|
||||
|
||||
private static BCLBiomeDef updateDef(BCLBiomeDef def) {
|
||||
def.loadConfigValues(Configs.BIOME_CONFIG);
|
||||
EndFeatures.addDefaultFeatures(def);
|
||||
|
|
|
@ -13,17 +13,17 @@ public class EmptyAuroraCaveBiome extends EndCaveBiome {
|
|||
.setPlantsColor(108, 25, 46)
|
||||
.setWaterAndFogColor(186, 77, 237)
|
||||
.setParticles(EndParticles.GLOWING_SPHERE, 0.001F));
|
||||
|
||||
|
||||
this.addFloorFeature(EndFeatures.BIG_AURORA_CRYSTAL, 1);
|
||||
|
||||
|
||||
this.addCeilFeature(EndFeatures.END_STONE_STALACTITE, 1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getFloorDensity() {
|
||||
return 0.01F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getCeilDensity() {
|
||||
return 0.1F;
|
||||
|
|
|
@ -10,12 +10,12 @@ public class EmptyEndCaveBiome extends EndCaveBiome {
|
|||
this.addFloorFeature(EndFeatures.END_STONE_STALAGMITE, 1);
|
||||
this.addCeilFeature(EndFeatures.END_STONE_STALACTITE, 1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getFloorDensity() {
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getCeilDensity() {
|
||||
return 0.1F;
|
||||
|
|
|
@ -13,18 +13,18 @@ public class EmptySmaragdantCaveBiome extends EndCaveBiome {
|
|||
.setPlantsColor(0, 131, 145)
|
||||
.setWaterAndFogColor(31, 167, 212)
|
||||
.setParticles(EndParticles.SMARAGDANT, 0.001F));
|
||||
|
||||
|
||||
this.addFloorFeature(EndFeatures.SMARAGDANT_CRYSTAL, 1);
|
||||
this.addFloorFeature(EndFeatures.SMARAGDANT_CRYSTAL_SHARD, 20);
|
||||
|
||||
|
||||
this.addCeilFeature(EndFeatures.END_STONE_STALACTITE, 1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getFloorDensity() {
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getCeilDensity() {
|
||||
return 0.1F;
|
||||
|
|
|
@ -14,55 +14,53 @@ import ru.betterend.util.ShuffelingListExtended;
|
|||
import ru.betterend.world.biome.EndBiome;
|
||||
import ru.betterend.world.features.terrain.caves.CaveChunkPopulatorFeature;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EndCaveBiome extends EndBiome {
|
||||
final private ShufflingList<Feature<?>> floorFeatures = new ShufflingList<>();
|
||||
final private ShufflingList<Feature<?>> ceilFeatures = new ShufflingList<>();
|
||||
|
||||
|
||||
public EndCaveBiome(BCLBiomeDef definition) {
|
||||
super(makeDef(definition));
|
||||
}
|
||||
|
||||
|
||||
private static BCLBiomeDef makeDef(BCLBiomeDef definition) {
|
||||
BCLFeature feature = BCLFeature.makeChunkFeature(
|
||||
BetterEnd.makeID(definition.getID().getPath() + "_cave_populator"),
|
||||
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) BiomeAPI.getBiome(definition.getID()))
|
||||
BetterEnd.makeID(definition.getID().getPath() + "_cave_populator"),
|
||||
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) BiomeAPI.getBiome(definition.getID()))
|
||||
);
|
||||
definition.setCategory(BiomeCategory.NONE).addFeature(feature);
|
||||
definition.setMusic(EndSounds.MUSIC_CAVES);
|
||||
definition.setLoop(EndSounds.AMBIENT_CAVES);
|
||||
return definition;
|
||||
}
|
||||
|
||||
|
||||
public void addFloorFeature(Feature<?> feature, int weight) {
|
||||
floorFeatures.add(feature, weight);
|
||||
}
|
||||
|
||||
|
||||
public void addCeilFeature(Feature<?> feature, int weight) {
|
||||
ceilFeatures.add(feature, weight);
|
||||
}
|
||||
|
||||
|
||||
public Feature<?> getFloorFeature() {
|
||||
return ((ShuffelingListExtended<Feature<?>>)floorFeatures).isEmpty() ? null : ((ShuffelingListExtended<Feature<?>>)floorFeatures).getOne();
|
||||
return ((ShuffelingListExtended<Feature<?>>) floorFeatures).isEmpty() ? null : ((ShuffelingListExtended<Feature<?>>) floorFeatures).getOne();
|
||||
}
|
||||
|
||||
|
||||
public Feature<?> getCeilFeature() {
|
||||
return ((ShuffelingListExtended<Feature<?>>)ceilFeatures).isEmpty() ? null : ((ShuffelingListExtended<Feature<?>>)ceilFeatures).getOne();
|
||||
return ((ShuffelingListExtended<Feature<?>>) ceilFeatures).isEmpty() ? null : ((ShuffelingListExtended<Feature<?>>) ceilFeatures).getOne();
|
||||
}
|
||||
|
||||
|
||||
public float getFloorDensity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public float getCeilDensity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public BlockState getCeil(BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public BlockState getWall(BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -12,18 +12,18 @@ public class JadeCaveBiome extends EndCaveBiome {
|
|||
private static final OpenSimplexNoise WALL_NOISE = new OpenSimplexNoise("jade_cave".hashCode());
|
||||
private static final OpenSimplexNoise DEPTH_NOISE = new OpenSimplexNoise("depth_noise".hashCode());
|
||||
private static final BlockState[] JADE = new BlockState[3];
|
||||
|
||||
|
||||
public JadeCaveBiome() {
|
||||
super(new BCLBiomeDef(BetterEnd.makeID("jade_cave"))
|
||||
.setFogColor(118, 150, 112)
|
||||
.setFogDensity(2.0F)
|
||||
.setWaterAndFogColor(95, 223, 255)
|
||||
.setFogColor(118, 150, 112)
|
||||
.setFogDensity(2.0F)
|
||||
.setWaterAndFogColor(95, 223, 255)
|
||||
);
|
||||
JADE[0] = EndBlocks.VIRID_JADESTONE.stone.defaultBlockState();
|
||||
JADE[1] = EndBlocks.AZURE_JADESTONE.stone.defaultBlockState();
|
||||
JADE[2] = EndBlocks.SANDY_JADESTONE.stone.defaultBlockState();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getWall(BlockPos pos) {
|
||||
double depth = DEPTH_NOISE.eval(pos.getX() * 0.02, pos.getZ() * 0.02) * 0.2 + 0.5;
|
||||
|
|
|
@ -18,29 +18,29 @@ public class LushAuroraCaveBiome extends EndCaveBiome {
|
|||
.setWaterAndFogColor(186, 77, 237)
|
||||
.setParticles(EndParticles.GLOWING_SPHERE, 0.001F)
|
||||
.setSurface(EndBlocks.CAVE_MOSS));
|
||||
|
||||
|
||||
this.addFloorFeature(EndFeatures.BIG_AURORA_CRYSTAL, 1);
|
||||
this.addFloorFeature(EndFeatures.CAVE_BUSH, 5);
|
||||
this.addFloorFeature(EndFeatures.CAVE_GRASS, 40);
|
||||
this.addFloorFeature(EndFeatures.END_STONE_STALAGMITE_CAVEMOSS, 5);
|
||||
|
||||
|
||||
this.addCeilFeature(EndFeatures.CAVE_BUSH, 1);
|
||||
this.addCeilFeature(EndFeatures.CAVE_PUMPKIN, 1);
|
||||
this.addCeilFeature(EndFeatures.RUBINEA, 3);
|
||||
this.addCeilFeature(EndFeatures.MAGNULA, 1);
|
||||
this.addCeilFeature(EndFeatures.END_STONE_STALACTITE_CAVEMOSS, 10);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getFloorDensity() {
|
||||
return 0.2F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getCeilDensity() {
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getCeil(BlockPos pos) {
|
||||
return EndBlocks.CAVE_MOSS.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.TOP);
|
||||
|
|
|
@ -15,18 +15,18 @@ public class LushSmaragdantCaveBiome extends EndCaveBiome {
|
|||
.setWaterAndFogColor(31, 167, 212)
|
||||
.setParticles(EndParticles.SMARAGDANT, 0.001F)
|
||||
.setSurface(EndBlocks.CAVE_MOSS));
|
||||
|
||||
|
||||
this.addFloorFeature(EndFeatures.SMARAGDANT_CRYSTAL, 1);
|
||||
this.addFloorFeature(EndFeatures.SMARAGDANT_CRYSTAL_SHARD, 20);
|
||||
|
||||
|
||||
this.addCeilFeature(EndFeatures.END_STONE_STALACTITE, 1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getFloorDensity() {
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getCeilDensity() {
|
||||
return 0.1F;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue