Rebalance black hole to new matter values
This commit is contained in:
parent
d8e6a43085
commit
657b388e55
@ -57,7 +57,7 @@ class BlackHoleBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Synchro
|
||||
6 -> {massForDiv /= 16384}
|
||||
}
|
||||
|
||||
gravitationStrength = sqrt(massForDiv.div(BASELINE_MASS).toDouble()).coerceAtMost(20.0).coerceAtLeast(0.2)
|
||||
gravitationStrength = sqrt(massForDiv.div(BASELINE_MASS).toDouble()).coerceIn(0.2, 40.0)
|
||||
|
||||
affectedBounds = BoundingBox(
|
||||
(-30 * gravitationStrength).toInt(),
|
||||
@ -267,7 +267,7 @@ class BlackHoleBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Synchro
|
||||
}
|
||||
|
||||
if (gravitationStrength > 0.4) {
|
||||
val sphere = getSphericalBlockPositions((gravitationStrength * 6.0).roundToInt())
|
||||
val sphere = getSphericalBlockPositions((gravitationStrength * 12.0).roundToInt())
|
||||
|
||||
if (sphere.size != lastSphereSizeOuter) {
|
||||
lastSphereSizeOuter = sphere.size
|
||||
@ -304,11 +304,11 @@ class BlackHoleBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Synchro
|
||||
|
||||
var strengthLinear = sqrt(blockPos.distSqr(pos))
|
||||
|
||||
if (strengthLinear < gravitationStrength * 1.1) {
|
||||
strengthLinear /= 4.0
|
||||
if (strengthLinear < gravitationStrength) {
|
||||
strengthLinear *= 1.0 + 8.0 * (gravitationStrength - strengthLinear) / gravitationStrength
|
||||
}
|
||||
|
||||
if (speed >= 0f && (speed * 2f).coerceAtLeast(eResist / 3f) < gravitationStrength * (8.0 / strengthLinear)) {
|
||||
if (speed >= 0f && (speed * 2f).coerceAtLeast(eResist / 3f) < gravitationStrength * (12.0 / strengthLinear)) {
|
||||
Block.dropResources(getBlock, level, pos, level.getBlockEntity(pos))
|
||||
getBlock.block.destroy(level, pos, getBlock)
|
||||
level.setBlock(pos, getBlock.fluidState.createLegacyBlock(), Block.UPDATE_ALL)
|
||||
@ -327,7 +327,7 @@ class BlackHoleBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Synchro
|
||||
|
||||
companion object {
|
||||
const val ITERATIONS = 30_000
|
||||
val BASELINE_MASS = ImpreciseFraction(1_000)
|
||||
val HAWKING_MASS_LOSE_STEP = ImpreciseFraction("-0.1")
|
||||
val BASELINE_MASS = ImpreciseFraction(50_000)
|
||||
val HAWKING_MASS_LOSE_STEP = ImpreciseFraction(-100)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user