diff --git a/gradle.properties b/gradle.properties index dd93009..d45d22b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ jei_version=11.6.0.1015 flywheel_version=0.6.10-20 create_version=0.5.1.e-44 registrate_version=MC1.19-1.1.5 -flightlib_version=1.1.2 +flightlib_version=1.2.0 curios_version=1.19.2-5.1.4.1 caelus_version=1.19.2-3.0.0.6 diff --git a/src/main/kotlin/com/possible_triangle/create_jetpack/config/ServerConfig.kt b/src/main/kotlin/com/possible_triangle/create_jetpack/config/ServerConfig.kt index b1f7e63..7b64977 100644 --- a/src/main/kotlin/com/possible_triangle/create_jetpack/config/ServerConfig.kt +++ b/src/main/kotlin/com/possible_triangle/create_jetpack/config/ServerConfig.kt @@ -13,7 +13,7 @@ interface IServerConfig { val acceleration: Double val hoverSpeed: Double val swimModifier: Double - val elytraBoostEnabled: Boolean + val elytraBoost: Double fun isAllowed(ench: Enchantment): Boolean } @@ -25,7 +25,7 @@ data class SyncedConfig( override val acceleration: Double, override val hoverSpeed: Double, override val swimModifier: Double, - override val elytraBoostEnabled: Boolean, + override val elytraBoost: Double, ) : IServerConfig { override fun isAllowed(ench: Enchantment) = true } @@ -54,8 +54,8 @@ class ServerConfig(builder: ForgeConfigSpec.Builder) : IServerConfig { private val swimModifierValue = builder.defineInRange("speed.swim_modifier", 1.8, 0.0, 100.0) override val swimModifier get() = swimModifierValue.get()!! - private val elytraBoostEnabledValue = builder.define("features.elytra_boost", true) - override val elytraBoostEnabled get() = elytraBoostEnabledValue.get()!! + private val elytraBoostValue = builder.defineInRange("features.elytra_boost", 1.25, 1.0, 100.0) + override val elytraBoost get() = elytraBoostValue.get()!! private val enchantmentsList = builder.defineList("enchantments.list", emptyList()) { true } private val enchantmentsIsBlacklist = builder.define("enchantments.is_blacklist", true) diff --git a/src/main/kotlin/com/possible_triangle/create_jetpack/config/SyncConfigMessage.kt b/src/main/kotlin/com/possible_triangle/create_jetpack/config/SyncConfigMessage.kt index 2979382..6544847 100644 --- a/src/main/kotlin/com/possible_triangle/create_jetpack/config/SyncConfigMessage.kt +++ b/src/main/kotlin/com/possible_triangle/create_jetpack/config/SyncConfigMessage.kt @@ -19,7 +19,7 @@ class SyncConfigMessage(private val config: IServerConfig) { acceleration = buf.readDouble(), hoverSpeed = buf.readDouble(), swimModifier = buf.readDouble(), - elytraBoostEnabled = buf.readBoolean(), + elytraBoost = buf.readDouble(), ) return SyncConfigMessage(config) } @@ -33,7 +33,7 @@ class SyncConfigMessage(private val config: IServerConfig) { buf.writeDouble(config.acceleration) buf.writeDouble(config.hoverSpeed) buf.writeDouble(config.swimModifier) - buf.writeBoolean(config.elytraBoostEnabled) + buf.writeDouble(config.elytraBoost) } fun handle(context: Supplier) { diff --git a/src/main/kotlin/com/possible_triangle/create_jetpack/item/JetpackItem.kt b/src/main/kotlin/com/possible_triangle/create_jetpack/item/JetpackItem.kt index 7da9a37..2e88c7c 100644 --- a/src/main/kotlin/com/possible_triangle/create_jetpack/item/JetpackItem.kt +++ b/src/main/kotlin/com/possible_triangle/create_jetpack/item/JetpackItem.kt @@ -69,8 +69,8 @@ open class JetpackItem( return Configs.SERVER.swimModifier } - override fun boostsElytra(): Boolean { - return Configs.SERVER.elytraBoostEnabled + override fun elytraBoost(): Double { + return Configs.SERVER.elytraBoost } private val thrusters = listOf(-0.35, 0.35).map { offset ->