Skip to content

Commit 9e4b1b0

Browse files
Merge pull request #225 from Agarmal/1.20.1/nozzle_sensitivity
[Reuploaded] Add sensitivity config to Gas Nozzle
2 parents 5bf389c + 507b793 commit 9e4b1b0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

common/src/main/kotlin/org/valkyrienskies/clockwork/ClockworkConfig.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ object ClockworkConfig {
8282
@ConfigEntry(description = "Force multiplier for balloons. Realism is 1.0, default is 1000.0. Range: > 0.0", min = 0.0)
8383
var balloonForceMult: Double = 50.0
8484

85+
@ConfigEntry(description = "Speed multiplier for the gas nozzle pointer, default is 0.5. Range: > 0.0", min = 0.0)
86+
var gasNozzleSensitivity = 0.5
87+
8588
@ConfigEntry(description = "Sets the gas retention efficiency of the balloon material; lower values simulate airtight rubber/synthetic, while higher values represent porous fabrics. Default 0.001.", min = 0.0, max = 1.0)
8689
var permeabilityConstant = 0.01
8790

common/src/main/kotlin/org/valkyrienskies/clockwork/content/logistics/gas/pockets/nozzle/GasNozzleBlockEntity.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import net.minecraft.util.RandomSource
1919
import net.minecraft.world.level.block.entity.BlockEntityType
2020
import net.minecraft.world.level.block.state.BlockState
2121
import org.valkyrienskies.clockwork.ClockworkAugmentations
22+
import org.valkyrienskies.clockwork.ClockworkConfig
2223
import org.valkyrienskies.clockwork.ClockworkLang
2324
import org.valkyrienskies.clockwork.ClockworkMod
2425
import org.valkyrienskies.clockwork.ClockworkModClient
@@ -260,7 +261,7 @@ class GasNozzleBlockEntity(type: BlockEntityType<*>, pos: BlockPos, state: Block
260261
}
261262

262263
fun getChaseSpeed(): Double {
263-
return Mth.clamp(abs(getSpeed().toDouble()) / 16.0 / 40.0, 0.0, 1.0)
264+
return abs(getSpeed().toDouble()) / 16.0 / 40.0 * ClockworkConfig.SERVER.gasNozzleSensitivity
264265
}
265266

266267
private fun heatBalloon() {

0 commit comments

Comments
 (0)