Move tritanium worms to enhanced placed feature
This commit is contained in:
parent
5d05fe3bb4
commit
1acd105925
@ -128,57 +128,56 @@ fun registerPlacedFeatures(context: BootstrapContext<PlacedFeature>) {
|
||||
)
|
||||
))
|
||||
|
||||
context.register(PlacedFeatures.WORM_TRITANIUM, PlacedFeature(
|
||||
configured.getOrThrow(ConfiguredFeatures.TRITANIUM_ORE_SMALL),
|
||||
listOf(
|
||||
EnormousPlacement(
|
||||
chunkScanRange = 24,
|
||||
seedMix = 9284343575495L,
|
||||
children = listOf(
|
||||
RarityFilter.onAverageOnceEvery(140),
|
||||
InSquarePlacement.spread(),
|
||||
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(-40), 15.0)),
|
||||
SplitPlacement(
|
||||
// "heart"
|
||||
EllipsoidPlacement(
|
||||
count = UniformInt.of(600, 900),
|
||||
xLength = UniformFloat.of(9f, 12f),
|
||||
yLength = UniformFloat.of(9f, 12f),
|
||||
zLength = UniformFloat.of(9f, 12f),
|
||||
x = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||
y = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||
z = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||
context.register(
|
||||
PlacedFeatures.WORM_TRITANIUM,
|
||||
EnhancedPlacedFeature.Builder(RarityFilter.onAverageOnceEvery(140))
|
||||
.then(InSquarePlacement.spread())
|
||||
.then(HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(-40), 15.0)))
|
||||
.then(
|
||||
SplitPlacement(
|
||||
// "heart"
|
||||
EllipsoidPlacement(
|
||||
count = UniformInt.of(600, 900),
|
||||
xLength = UniformFloat.of(9f, 12f),
|
||||
yLength = UniformFloat.of(9f, 12f),
|
||||
zLength = UniformFloat.of(9f, 12f),
|
||||
x = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||
y = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||
z = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||
),
|
||||
// "branches"
|
||||
ChainPlacement(
|
||||
CountPlacement.of(UniformInt.of(2, 7)),
|
||||
WormPlacement(
|
||||
length = UniformInt.of(60, 120),
|
||||
turnRateXY = WormPlacement.normalDistributedTurnRate(2f, 3f),
|
||||
initialAngleXY = WormPlacement.normalDistributedTurnRate(3f, 4f),
|
||||
turnRateXZ = WormPlacement.normalDistributedTurnRate(30f),
|
||||
turnSpeedXZ = WormPlacement.constantTurnRate(10f),
|
||||
turnSpeedXY = WormPlacement.constantTurnRate(4f),
|
||||
turnChanceXY = BooleanProvider.Unbiased(6),
|
||||
turnChanceXZ = BooleanProvider.BiasedLinear(0.6f, 5),
|
||||
maxTravelUp = 90,
|
||||
maxTravelDown = 10,
|
||||
),
|
||||
// "branches"
|
||||
ChainPlacement(
|
||||
CountPlacement.of(UniformInt.of(2, 7)),
|
||||
WormPlacement(
|
||||
length = UniformInt.of(60, 120),
|
||||
turnRateXY = WormPlacement.normalDistributedTurnRate(2f, 3f),
|
||||
initialAngleXY = WormPlacement.normalDistributedTurnRate(3f, 4f),
|
||||
turnRateXZ = WormPlacement.normalDistributedTurnRate(30f),
|
||||
turnSpeedXZ = WormPlacement.constantTurnRate(10f),
|
||||
turnSpeedXY = WormPlacement.constantTurnRate(4f),
|
||||
turnChanceXY = BooleanProvider.Unbiased(6),
|
||||
turnChanceXZ = BooleanProvider.BiasedLinear(0.6f, 5),
|
||||
maxTravelUp = 90,
|
||||
maxTravelDown = 10,
|
||||
),
|
||||
EllipsoidPlacement(
|
||||
count = UniformInt.of(3, 6),
|
||||
xLength = ConstantFloat.of(4f),
|
||||
yLength = ConstantFloat.of(4f),
|
||||
zLength = ConstantFloat.of(4f),
|
||||
x = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||
y = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||
z = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||
)
|
||||
EllipsoidPlacement(
|
||||
count = UniformInt.of(3, 6),
|
||||
xLength = ConstantFloat.of(4f),
|
||||
yLength = ConstantFloat.of(4f),
|
||||
zLength = ConstantFloat.of(4f),
|
||||
x = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||
y = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||
z = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
.then(configured.getOrThrow(ConfiguredFeatures.TRITANIUM_ORE_SMALL))
|
||||
.build(
|
||||
chunkScanRange = 24,
|
||||
seedMix = 9284343575495L,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
run {
|
||||
@ -189,32 +188,6 @@ fun registerPlacedFeatures(context: BootstrapContext<PlacedFeature>) {
|
||||
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(
|
||||
PlacedFeatures.DILITHIUM,
|
||||
EnhancedPlacedFeature.Builder(RarityFilter.onAverageOnceEvery(120))
|
||||
|
@ -283,6 +283,14 @@ object EnhancedPlacedFeature : Feature<EnhancedPlacedFeature.Config>(
|
||||
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 {
|
||||
return Node(children.map { it.buildNode() }, contents)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user