Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Slot NoSlow
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Feb 8, 2024
1 parent 3be7d50 commit a7a690b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ object NoSlow : Module("NoSlow", ModuleCategory.MOVEMENT, gameDetecting = false)
AAC2,
Place,
EmptyPlace,
Slot,
WatchDog2,
).sortedBy { it.modeName }
private val consumeModes = arrayOf(
Expand All @@ -45,6 +46,7 @@ object NoSlow : Module("NoSlow", ModuleCategory.MOVEMENT, gameDetecting = false)
UNCP2,
Place,
EmptyPlace,
Slot,
).sortedBy { it.modeName }
private val bowModes = arrayOf(
Vanilla,
Expand All @@ -54,6 +56,7 @@ object NoSlow : Module("NoSlow", ModuleCategory.MOVEMENT, gameDetecting = false)
UNCP2,
Place,
EmptyPlace,
Slot,
).sortedBy { it.modeName }

var shouldSwap = false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* SkidBounce Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge, Forked from LiquidBounce.
* https://github.com/ManInMyVan/SkidBounce/
*/
package net.ccbluex.liquidbounce.features.module.modules.movement.noslowmodes.other

import net.ccbluex.liquidbounce.event.EventState.*
import net.ccbluex.liquidbounce.event.MotionEvent
import net.ccbluex.liquidbounce.features.module.modules.movement.NoSlow.blockingPacketTiming
import net.ccbluex.liquidbounce.features.module.modules.movement.NoSlow.bowPacketTiming
import net.ccbluex.liquidbounce.features.module.modules.movement.NoSlow.consumePacketTiming
import net.ccbluex.liquidbounce.features.module.modules.movement.noslowmodes.NoSlowMode
import net.ccbluex.liquidbounce.utils.PacketUtils.sendPacket
import net.ccbluex.liquidbounce.utils.inventory.InventoryUtils.serverSlot
import net.minecraft.item.*
import net.minecraft.network.play.client.C09PacketHeldItemChange

object Slot : NoSlowMode("Slot") {
override fun onMotion(event: MotionEvent) {
when (mc.thePlayer.heldItem.item) {
is ItemSword ->
if ((blockingPacketTiming == "Post" && event.eventState != POST) || (blockingPacketTiming == "Pre" && event.eventState != PRE))
return
is ItemBow ->
if ((bowPacketTiming == "Post" && event.eventState != POST) || (bowPacketTiming == "Pre" && event.eventState != PRE))
return
is ItemFood, is ItemBucketMilk, is ItemPotion ->
if ((consumePacketTiming == "Post" && event.eventState != POST) || (consumePacketTiming == "Pre" && event.eventState != PRE))
return
}
// has to be noevent for some reason
sendPacket(C09PacketHeldItemChange(serverSlot), false)
}
}

0 comments on commit a7a690b

Please sign in to comment.