Stop sprinting for criticals
parent
0632528416
commit
3736a86842
|
@ -6,6 +6,7 @@ import codes.som.hibiscus.events.SendPacketEvent
|
||||||
import codes.som.hibiscus.mixins.MixinExtPlayerInteractEntityC2SPacket
|
import codes.som.hibiscus.mixins.MixinExtPlayerInteractEntityC2SPacket
|
||||||
import codes.som.hibiscus.player
|
import codes.som.hibiscus.player
|
||||||
import codes.som.hibiscus.util.ext.requireExtension
|
import codes.som.hibiscus.util.ext.requireExtension
|
||||||
|
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket
|
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket
|
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket
|
||||||
|
|
||||||
|
@ -19,6 +20,14 @@ class Criticals : Feature("Criticals", FeatureCategory.COMBAT) {
|
||||||
if (packet.typeHandler.type != PlayerInteractEntityC2SPacket.InteractType.ATTACK)
|
if (packet.typeHandler.type != PlayerInteractEntityC2SPacket.InteractType.ATTACK)
|
||||||
return@on
|
return@on
|
||||||
|
|
||||||
|
player.isSprinting = false
|
||||||
|
player.networkHandler.sendPacket(
|
||||||
|
ClientCommandC2SPacket(
|
||||||
|
player,
|
||||||
|
ClientCommandC2SPacket.Mode.STOP_SPRINTING
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
player.networkHandler.sendPacket(
|
player.networkHandler.sendPacket(
|
||||||
PlayerMoveC2SPacket.PositionAndOnGround(
|
PlayerMoveC2SPacket.PositionAndOnGround(
|
||||||
player.x,
|
player.x,
|
||||||
|
|
Loading…
Reference in New Issue