Move tritanium worms to enhanced placed feature

This commit is contained in:
DBotThePony 2025-03-24 19:27:03 +07:00
parent 5d05fe3bb4
commit 1acd105925
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 53 additions and 72 deletions

View File

@ -128,16 +128,12 @@ fun registerPlacedFeatures(context: BootstrapContext<PlacedFeature>) {
) )
)) ))
context.register(PlacedFeatures.WORM_TRITANIUM, PlacedFeature( context.register(
configured.getOrThrow(ConfiguredFeatures.TRITANIUM_ORE_SMALL), PlacedFeatures.WORM_TRITANIUM,
listOf( EnhancedPlacedFeature.Builder(RarityFilter.onAverageOnceEvery(140))
EnormousPlacement( .then(InSquarePlacement.spread())
chunkScanRange = 24, .then(HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(-40), 15.0)))
seedMix = 9284343575495L, .then(
children = listOf(
RarityFilter.onAverageOnceEvery(140),
InSquarePlacement.spread(),
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(-40), 15.0)),
SplitPlacement( SplitPlacement(
// "heart" // "heart"
EllipsoidPlacement( EllipsoidPlacement(
@ -176,9 +172,12 @@ fun registerPlacedFeatures(context: BootstrapContext<PlacedFeature>) {
) )
) )
) )
.then(configured.getOrThrow(ConfiguredFeatures.TRITANIUM_ORE_SMALL))
.build(
chunkScanRange = 24,
seedMix = 9284343575495L,
) )
) )
))
} }
run { run {
@ -189,32 +188,6 @@ fun registerPlacedFeatures(context: BootstrapContext<PlacedFeature>) {
ClampedNormalFloat.of(-0.4f, 0.2f, -2f, 2f), ClampedNormalFloat.of(-0.4f, 0.2f, -2f, 2f),
) )
/*
context.register(PlacedFeatures.DILITHIUM, PlacedFeature(
ore,
listOf(
EnormousPlacement(
chunkScanRange = 6,
seedMix = 237483209523709234L,
children = listOf(
RarityFilter.onAverageOnceEvery(120),
InSquarePlacement.spread(),
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(0), 15.0)),
EllipsoidPlacement(
x = ringularity,
y = ringularity,
z = ringularity,
count = UniformInt.of(8000, 16000),
xLength = UniformFloat.of(30f, 70f),
yLength = UniformFloat.of(40f, 90f),
zLength = UniformFloat.of(30f, 70f),
)
),
)
)
))
*/
context.register( context.register(
PlacedFeatures.DILITHIUM, PlacedFeatures.DILITHIUM,
EnhancedPlacedFeature.Builder(RarityFilter.onAverageOnceEvery(120)) EnhancedPlacedFeature.Builder(RarityFilter.onAverageOnceEvery(120))

View File

@ -283,6 +283,14 @@ object EnhancedPlacedFeature : Feature<EnhancedPlacedFeature.Config>(
return Builder(root ?: this, action).also(children::add) return Builder(root ?: this, action).also(children::add)
} }
fun then(action: ConfiguredFeature<*, *>): Builder {
return then(EnhancedFeature.Wrapper.configure(action))
}
fun then(action: Holder<ConfiguredFeature<*, *>>): Builder {
return then(EnhancedFeature.Wrapper.configure(action))
}
private fun buildNode(): Node { private fun buildNode(): Node {
return Node(children.map { it.buildNode() }, contents) return Node(children.map { it.buildNode() }, contents)
} }