[Change] Migrated to new Feature API
This commit is contained in:
parent
0ec39fa2da
commit
031a14f278
16 changed files with 242 additions and 120 deletions
|
@ -4,8 +4,8 @@ import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
|||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.BCLCommonFeatures;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.BCLFeature;
|
||||
import org.betterx.bclib.api.v3.levelgen.features.BCLFeature;
|
||||
import org.betterx.bclib.api.v3.levelgen.features.BCLFeatureBuilder;
|
||||
import org.betterx.bclib.util.WeightedList;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
|
@ -28,11 +28,17 @@ public class EndCaveBiome extends EndBiome {
|
|||
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
BCLFeature feature = BCLCommonFeatures.makeChunkFeature(
|
||||
BetterEnd.makeID(ID.getPath() + "_cave_populator"),
|
||||
GenerationStep.Decoration.RAW_GENERATION,
|
||||
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) BiomeAPI.getBiome(ID))
|
||||
);
|
||||
BCLFeature feature = BCLFeatureBuilder
|
||||
.start(
|
||||
BetterEnd.makeID(ID.getPath() + "_cave_populator"),
|
||||
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) BiomeAPI.getBiome(ID))
|
||||
)
|
||||
.buildAndRegister()
|
||||
.place()
|
||||
.decoration(GenerationStep.Decoration.RAW_GENERATION)
|
||||
.count(1)
|
||||
.onlyInBiome()
|
||||
.buildAndRegister();
|
||||
|
||||
builder.feature(feature)
|
||||
.music(EndSounds.MUSIC_CAVES)
|
||||
|
|
|
@ -88,7 +88,7 @@ public class FloatingSpireFeature extends SpireFeature {
|
|||
support.forEach((bpos) -> {
|
||||
if (BiomeAPI.getFromBiome(world.getBiome(bpos)) == EndBiomes.BLOSSOMING_SPIRES) {
|
||||
EndFeatures.TENANEA_BUSH.getFeature()
|
||||
.place(new FeaturePlaceContext<>(
|
||||
.place(new FeaturePlaceContext<NoneFeatureConfiguration>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
chunkGenerator,
|
||||
|
|
|
@ -88,7 +88,7 @@ public class SpireFeature extends DefaultFeature {
|
|||
support.forEach((bpos) -> {
|
||||
if (BiomeAPI.getFromBiome(world.getBiome(bpos)) == EndBiomes.BLOSSOMING_SPIRES) {
|
||||
EndFeatures.TENANEA_BUSH.getFeature()
|
||||
.place(new FeaturePlaceContext<>(
|
||||
.place(new FeaturePlaceContext<NoneFeatureConfiguration>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
chunkGenerator,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue