mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-22 15:16:25 -04:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7303023218 |
@@ -72,6 +72,7 @@
|
||||
- Fixed absence or incorrect mergers in spawning conditions, making max height/depth of conditions to use the min value instead
|
||||
- Added stricter riding checks on server side to prevent possible packet forgery when player tries to ride pokemon
|
||||
- Fixed Pokémon cries and animation sounds played from GUIs, such as the starter selection screen and the Pokédex, being tied to the Master volume slider instead of Friendly Creatures
|
||||
- Fixed boat style mounts sprinting on their own after landing in water from jet flight
|
||||
|
||||
### Developer
|
||||
- Bumped NeoForge to `21.1.195` to get access to MixinExtras `0.5` and the expressions annotation
|
||||
|
||||
+11
-6
@@ -37,6 +37,7 @@ import com.cobblemon.mod.common.util.writeRidingStats
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf
|
||||
import net.minecraft.util.Mth
|
||||
@@ -94,12 +95,16 @@ class BoatBehaviour : RidingBehaviour<BoatSettings, BoatState> {
|
||||
state.jumpBuffer.set(state.jumpBuffer.get() + 1)
|
||||
}
|
||||
|
||||
// Only start sprinting on vehicle if the state has changed and the pokemon has atleast 1/3 stamina
|
||||
if (driver.isSprinting && !state.isVehicleSprinting.get()) {
|
||||
state.isVehicleSprinting.set(state.stamina.get() > 0.33f)
|
||||
}
|
||||
else if (!driver.isSprinting) {
|
||||
state.isVehicleSprinting.set(false)
|
||||
if (vehicle.level().isClientSide) {
|
||||
// Check the keys instead of driver.isSprinting since that can still be true from a previous ride style
|
||||
val tryingToSprint = Minecraft.getInstance().options.keySprint.isDown() && Minecraft.getInstance().options.keyUp.isDown()
|
||||
// Only start sprinting on vehicle if the state has changed and the pokemon has atleast 1/3 stamina
|
||||
if (tryingToSprint && !state.isVehicleSprinting.get()) {
|
||||
state.isVehicleSprinting.set(state.stamina.get() > 0.33f)
|
||||
}
|
||||
else if (!tryingToSprint) {
|
||||
state.isVehicleSprinting.set(false)
|
||||
}
|
||||
}
|
||||
|
||||
if (!state.isVehicleSprinting.get()) {
|
||||
|
||||
Reference in New Issue
Block a user