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(
|
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(
|
SplitPlacement(
|
||||||
RarityFilter.onAverageOnceEvery(140),
|
// "heart"
|
||||||
InSquarePlacement.spread(),
|
EllipsoidPlacement(
|
||||||
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(-40), 15.0)),
|
count = UniformInt.of(600, 900),
|
||||||
SplitPlacement(
|
xLength = UniformFloat.of(9f, 12f),
|
||||||
// "heart"
|
yLength = UniformFloat.of(9f, 12f),
|
||||||
EllipsoidPlacement(
|
zLength = UniformFloat.of(9f, 12f),
|
||||||
count = UniformInt.of(600, 900),
|
x = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||||
xLength = UniformFloat.of(9f, 12f),
|
y = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||||
yLength = UniformFloat.of(9f, 12f),
|
z = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
||||||
zLength = UniformFloat.of(9f, 12f),
|
),
|
||||||
x = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
// "branches"
|
||||||
y = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
ChainPlacement(
|
||||||
z = ClampedNormalFloat.of(0f, 0.4f, -1f, 1f),
|
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"
|
EllipsoidPlacement(
|
||||||
ChainPlacement(
|
count = UniformInt.of(3, 6),
|
||||||
CountPlacement.of(UniformInt.of(2, 7)),
|
xLength = ConstantFloat.of(4f),
|
||||||
WormPlacement(
|
yLength = ConstantFloat.of(4f),
|
||||||
length = UniformInt.of(60, 120),
|
zLength = ConstantFloat.of(4f),
|
||||||
turnRateXY = WormPlacement.normalDistributedTurnRate(2f, 3f),
|
x = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||||
initialAngleXY = WormPlacement.normalDistributedTurnRate(3f, 4f),
|
y = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||||
turnRateXZ = WormPlacement.normalDistributedTurnRate(30f),
|
z = ClampedNormalFloat.of(0f, 0.2f, -1f, 1f),
|
||||||
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),
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
.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))
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user