Skip to content

Commit

Permalink
new watermaker
Browse files Browse the repository at this point in the history
Target Strafe new modes
back AuthBypass Module
notifyLast in AntiVanish Module
correction of memory leak
  • Loading branch information
opZywl committed Jan 9, 2024
1 parent d40be9b commit 9e43a99
Show file tree
Hide file tree
Showing 33 changed files with 2,145 additions and 436 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ dependencies {

include("com.github.UnlegitMC:Astar3d:bec2291cf2") // pathfinding

include 'com.jhlabs:filters:2.0.235'

include fileTree(include: ["*.jar"], dir: "libs")
}

Expand Down
4 changes: 0 additions & 4 deletions src/main/java/net/ccbluex/liquidbounce/FDPClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ object FDPClient {
}
}

@JvmField
val CLIENT_BRANCH = (gitInfo["git.branch"] ?: "unknown").let {
if (it == "main") "Main" else it
}

// Managers
lateinit var moduleManager: ModuleManager
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import net.ccbluex.liquidbounce.utils.extensions.hitBox
import net.ccbluex.liquidbounce.utils.extensions.rayTraceWithServerSideRotation
import net.ccbluex.liquidbounce.utils.misc.RandomUtils
import net.ccbluex.liquidbounce.utils.BlinkUtils
import net.ccbluex.liquidbounce.utils.extensions.eyes
import net.ccbluex.liquidbounce.utils.timer.MSTimer
import net.ccbluex.liquidbounce.utils.timer.TimeUtils
import net.minecraft.client.gui.ScaledResolution
Expand All @@ -49,7 +50,7 @@ import java.util.*
import kotlin.math.*

@ModuleInfo(name = "KillAura", category = ModuleCategory.COMBAT, keyBind = Keyboard.KEY_G)
class KillAura : Module() {
object KillAura : Module() {
/**
* OPTIONS
*/
Expand Down Expand Up @@ -137,6 +138,7 @@ class KillAura : Module() {
private val targetModeValue = ListValue("TargetMode", arrayOf("Single", "Switch", "Multi"), "Switch").displayable { modeDisplay.get() }
private val switchDelayValue = IntegerValue("SwitchDelay", 15, 1, 2000).displayable { targetModeValue.equals("Switch") && modeDisplay.get() }
private val limitedMultiTargetsValue = IntegerValue("LimitedMultiTargets", 0, 0, 50).displayable { targetModeValue.equals("Multi") && modeDisplay.get() }
private val reachMode = ListValue("CheckTargetDistance", arrayOf("Old", "New"), "New")

// AutoBlock
private val autoblockDisplay = BoolValue("AutoBlock Settings:", true)
Expand Down Expand Up @@ -593,8 +595,6 @@ class KillAura : Module() {
}
}



private fun runAttackLoop() {

if (autoBlockPacketValue.equals("Legit2") && autoBlockValue.equals("Range")) {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.Notification
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.NotifyType
import net.ccbluex.liquidbounce.value.IntegerValue
import net.minecraft.network.play.server.S14PacketEntity
import net.minecraft.network.play.server.S1DPacketEntityEffect

@ModuleInfo(name = "AntiVanish", category = ModuleCategory.OTHER)
object AntiVanish : Module() {

private var lastNotify = -1L
private var lastNotify=-1L

private val notifyLast = IntegerValue("Notification-Seconds", 2, 1, 30)

@EventTarget
fun onPacket(event: PacketEvent){
Expand All @@ -37,7 +40,7 @@ object AntiVanish : Module() {

private fun vanish() {
if((System.currentTimeMillis()-lastNotify)>5000){
FDPClient.hud.addNotification(Notification("Found a vanished entity!", "someone just vanished!", NotifyType.WARNING, 4000, 500))
FDPClient.hud.addNotification(Notification("Found a vanished entity!", "someone just vanished!", NotifyType.WARNING, notifyLast.get() * 1000))

}
lastNotify=System.currentTimeMillis()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.features.module.modules.other

import com.google.gson.JsonParser
import net.ccbluex.liquidbounce.FDPClient

import net.ccbluex.liquidbounce.event.EventTarget
import net.ccbluex.liquidbounce.event.PacketEvent
import net.ccbluex.liquidbounce.event.UpdateEvent
import net.ccbluex.liquidbounce.value.IntegerValue
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.Notification
import net.ccbluex.liquidbounce.ui.client.hud.element.elements.NotifyType

import net.ccbluex.liquidbounce.utils.misc.RandomUtils
import net.ccbluex.liquidbounce.utils.timer.MSTimer
import net.minecraft.item.*
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.network.Packet
import net.minecraft.network.play.INetHandlerPlayServer
import net.minecraft.network.play.client.C0EPacketClickWindow
import net.minecraft.network.play.server.S2DPacketOpenWindow
import net.minecraft.network.play.server.S2FPacketSetSlot
import org.apache.commons.io.IOUtils
import java.util.*

@ModuleInfo(name = "AuthBypass", description = "Bypass auth when join server.", category = ModuleCategory.OTHER)
class AuthBypass : Module() {
private val delayValue = IntegerValue("Delay", 1500, 100, 5000, "ms")

private var skull : String? = null
private var type = "none"
private val packets = ArrayList<Packet<INetHandlerPlayServer>>()
private val clickedSlot = ArrayList<Int>()
private val timer = MSTimer()
private val jsonParser = JsonParser()

private val brLangMap = HashMap<String, String>()

@EventTarget
fun onUpdate(event: UpdateEvent) {
if (packets.isNotEmpty() && timer.hasTimePassed(delayValue.get().toLong())) {
for (packet in packets) {
mc.netHandler.addToSendQueue(packet)
}
packets.clear()
FDPClient.hud.addNotification(Notification(name,"Authentication bypassed.", NotifyType.INFO))
}
}

override fun onEnable() {
skull = null
type = "none"
packets.clear()
clickedSlot.clear()

//load locale async
Thread {
val localeJson = JsonParser().parse(IOUtils.toString(AuthBypass::class.java.classLoader.getResourceAsStream("br_items.json"), "utf-8")).asJsonObject

brLangMap.clear()
for ((key,element) in localeJson.entrySet()) {
brLangMap["item.$key"] = element.asString.lowercase(Locale.getDefault())
}
}.start()
}

@EventTarget
fun onPacket(event: PacketEvent) {
val packet = event.packet
if (packet is S2FPacketSetSlot) {
val slot = packet.func_149173_d()
val windowId = packet.func_149175_c()
val item = packet.func_149174_e()
if (windowId == 0 || item == null || type == "none" || clickedSlot.contains(slot)) {
return
}
val itemName = item.unlocalizedName

when (type.lowercase(Locale.getDefault())) {
"skull" -> {
if (itemName.contains("item.skull.char", ignoreCase = true)) {
val nbt = item.tagCompound ?: return
// val uuid=nbt.get<CompoundTag>("SkullOwner").get<CompoundTag>("Properties").get<ListTag>("textures").get<CompoundTag>(0).get<StringTag>("Value").value
val data = process(nbt.getCompoundTag("SkullOwner").getCompoundTag("Properties")
.getTagList("textures", NBTTagCompound.NBT_TYPES.indexOf("COMPOUND"))
.getCompoundTagAt(0).getString("Value"))
if (skull== null) {
skull = data
} else if (skull != data) {
skull = null
timer.reset()
click(windowId, slot, item)
}
}
}

// special rules lol
"enchada" -> { // select all
click(windowId, slot, item)
}

"cabeça" -> { // skulls
if (item.item is ItemSkull) {
click(windowId, slot, item)
}
}

"ferramenta" -> { // tools
if (item.item is ItemTool) {
click(windowId, slot, item)
}
}

"comida" -> { // foods
if (item.item is ItemFood) {
click(windowId, slot, item)
}
}

// the new item check in redesky
else -> {
if (getItemLocalName(item).contains(type)) {
click(windowId, slot, item)
}
}
}
}
//silent auth xd
if (packet is S2DPacketOpenWindow) {
val windowName = packet.windowTitle.unformattedText
if (packet.slotCount == 27 && packet.guiId.contains("container", ignoreCase = true)
&& windowName.startsWith("Clique", ignoreCase = true)) {
type = when {
windowName.contains("bloco", ignoreCase = true) -> "skull"
else -> {
val splited = windowName.split(" ")
var str = splited[splited.size - 1].replace(".", "").lowercase(Locale.getDefault())
if (str.endsWith("s")) {
str = str.substring(0, str.length - 1)
}
str
}
}
packets.clear()
clickedSlot.clear()
event.cancelEvent()
} else {
type = "none"
}
}
}

private fun click(windowId: Int, slot: Int, item: ItemStack) {
clickedSlot.add(slot)
packets.add(C0EPacketClickWindow(windowId, slot, 0, 0, item, RandomUtils.nextInt(114, 514).toShort()))
}

private fun getItemLocalName(item: ItemStack): String {
return brLangMap[item.unlocalizedName] ?: "null"
}

private fun process(data: String):String {
val jsonObject = jsonParser.parse(String(Base64.getDecoder().decode(data))).asJsonObject
return jsonObject
.getAsJsonObject("textures")
.getAsJsonObject("SKIN")
.get("url").asString
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,20 @@ import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.value.IntegerValue
import net.minecraft.client.entity.EntityOtherPlayerMP


@ModuleInfo(name = "FakePlayer", category = ModuleCategory.OTHER)
object FakePlayer : Module() {

private val amountValue = IntegerValue("Summon", 1, 0, 20, "x")

private var fakePlayer: EntityOtherPlayerMP? = null

override fun onEnable() {
for (i in 0 until amountValue.get()) {
val fakePlayer = EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.gameProfile)
fakePlayer.clonePlayer(mc.thePlayer, true)
fakePlayer.rotationYawHead = mc.thePlayer.rotationYawHead
fakePlayer.copyLocationAndAnglesFrom(mc.thePlayer)
mc.theWorld.addEntityToWorld(-1000 - i, fakePlayer)
}
fakePlayer = EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.gameProfile)
fakePlayer!!.clonePlayer(mc.thePlayer, true)
fakePlayer!!.rotationYawHead = mc.thePlayer.rotationYawHead
fakePlayer!!.copyLocationAndAnglesFrom(mc.thePlayer)
mc.theWorld.addEntityToWorld(-1000, fakePlayer)
}

override fun onDisable() {
for (i in 0 until amountValue.get()) {
mc.theWorld.removeEntityFromWorld(-1000 - i)
}
mc.theWorld.removeEntityFromWorld(fakePlayer!!.entityId)
fakePlayer = null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ object MurderDetector : Module() {
private val chatValue = BoolValue("Chat", true)
private val notifyValue = BoolValue("Notification", true)

var murder1: EntityPlayer? = null
var murder2: EntityPlayer? = null
private var murder1: EntityPlayer? = null
private var murder2: EntityPlayer? = null

private val murderItems = mutableListOf(
267, // Items.iron_sword,
Expand Down
Loading

0 comments on commit 9e43a99

Please sign in to comment.