mirror of https://github.com/kami-blue/client
Fixed a java.lang.IllegalArgumentException being raised in 'all' fastuse mode while the player is a spectator. (#815)
This commit is contained in:
parent
1f19ae9c82
commit
ed5b9a02b4
|
@ -35,7 +35,7 @@ class Fastuse : Module() {
|
|||
override fun onUpdate() {
|
||||
if (mc.player == null) return
|
||||
|
||||
if (all.value || bow.value && mc.player.heldItemMainhand.getItem() is ItemBow && mc.player.isHandActive && mc.player.itemInUseMaxCount >= 3) {
|
||||
if (!mc.player.isSpectator && (all.value || bow.value && mc.player.heldItemMainhand.getItem() is ItemBow && mc.player.isHandActive && mc.player.itemInUseMaxCount >= 3)) {
|
||||
mc.player.connection.sendPacket(CPacketPlayerDigging(CPacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, mc.player.horizontalFacing))
|
||||
mc.player.connection.sendPacket(CPacketPlayerTryUseItem(mc.player.activeHand))
|
||||
mc.player.stopActiveHand()
|
||||
|
|
Loading…
Reference in New Issue