Skip to content

Commit

Permalink
Made VehicleOneHit actually one-hit vehicles + Module cleanup/descrip…
Browse files Browse the repository at this point in the history
…tion improvements. (CCBlueX#616)
  • Loading branch information
mems01 authored Aug 8, 2021
1 parent a0622a8 commit 56158d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ object ModuleAutoSoup : Module("AutoSoup", Category.COMBAT) {
}
}

private fun hasItem(slot: Int, item: Item): Boolean {
return player.inventory.getStack(slot).item == item
}

enum class BowlMode(override val choiceName: String) : NamedChoice {
DROP("Drop"), MOVE("Move")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import net.ccbluex.liquidbounce.event.AttackEvent
import net.ccbluex.liquidbounce.event.handler
import net.ccbluex.liquidbounce.features.module.Category
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.utils.client.MC_1_8
import net.ccbluex.liquidbounce.utils.client.protocolVersion
import net.minecraft.entity.vehicle.BoatEntity
import net.minecraft.entity.vehicle.MinecartEntity
import net.minecraft.network.packet.c2s.play.HandSwingC2SPacket
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket
import net.minecraft.util.Hand

Expand All @@ -43,15 +44,15 @@ object ModuleVehicleOneHit : Module("VehicleOneHit", Category.EXPLOIT) {
*
* Probably because of the lower attack strength.
*/
val hits by int("Hits", 3, 3..19)

val attackHandler = handler<AttackEvent> { event ->
val entity = event.enemy

if (entity is BoatEntity || entity is MinecartEntity) {
repeat(hits) {
network.sendPacket(HandSwingC2SPacket(Hand.MAIN_HAND))
network.sendPacket(PlayerInteractEntityC2SPacket.attack(entity, player.isSneaking))

repeat(if (protocolVersion == MC_1_8) 3 else 19) {
if (protocolVersion == MC_1_8) player.swingHand(Hand.MAIN_HAND) else network.sendPacket(PlayerInteractEntityC2SPacket.attack(entity, player.isSneaking))
if (protocolVersion == MC_1_8) network.sendPacket(PlayerInteractEntityC2SPacket.attack(entity, player.isSneaking)) else player.swingHand(Hand.MAIN_HAND)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import kotlin.math.sqrt
/**
* Trajectories module
*
* Allows you to see where arrows, pearls, etc. will land.
* Allows you to see where projectile items will land.
*/

object ModuleTrajectories : Module("Trajectories", Category.RENDER) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/liquidbounce/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@

"liquidbounce.module.storageEsp.description": "Allows you to see chests, dispensers, etc. through walls.",

"liquidbounce.module.trajectories.description": "Allows you to see where arrows, pearls, etc. will land.",
"liquidbounce.module.trajectories.description": "Allows you to see where projectile items will land.",

"liquidbounce.module.autoFarm.description": "Automatically farms stuff.",

Expand Down

0 comments on commit 56158d0

Please sign in to comment.