Skip to content

Commit

Permalink
cubecraft disabler
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed May 3, 2024
1 parent f1c383d commit 5afe4f5
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/aspw/client/Launch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object Launch {
// Client information
const val CLIENT_BEST = "NightX"
const val CLIENT_FOLDER = "NightX-Client"
const val CLIENT_VERSION = "B116"
const val CLIENT_VERSION = "B117"
const val CLIENT_CHAT = "§c[$CLIENT_BEST] §r"

var isStarting = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Disabler : Module() {
private val funcraftstaff = BoolValue("Funcraft-Staff", false)
private val blockdrop = BoolValue("BlockDrop", false)
private val grim = BoolValue("Grim", false)
private val cubecraft = BoolValue("Cubecraft", false)
private val hycraft = BoolValue("Hycraft", false)
private val inventoryspoof = BoolValue("Inventory-Spoof", false)
private val jump = BoolValue("Jump", false)
Expand Down Expand Up @@ -1095,6 +1096,72 @@ class Disabler : Module() {
}
}

if (cubecraft.get()) {
if (packet is C03PacketPlayer) {
val yPos = round(mc.thePlayer.posY / 0.015625) * 0.015625
mc.thePlayer.setPosition(mc.thePlayer.posX, yPos, mc.thePlayer.posZ)

if (mc.thePlayer.ticksExisted % 45 == 0) {
PacketUtils.sendPacketNoEvent(
C04PacketPlayerPosition(
mc.thePlayer.posX,
mc.thePlayer.posY,
mc.thePlayer.posZ,
true
)
)
PacketUtils.sendPacketNoEvent(
C04PacketPlayerPosition(
mc.thePlayer.posX,
mc.thePlayer.posY - 2.854394682,
mc.thePlayer.posZ,
false
)
)
PacketUtils.sendPacketNoEvent(
C04PacketPlayerPosition(
mc.thePlayer.posX,
mc.thePlayer.posY,
mc.thePlayer.posZ,
true
)
)
debug("c03 saved us")
}
}

if (packet is S08PacketPlayerPosLook) {
if (mc.thePlayer == null || mc.thePlayer.ticksExisted <= 0) return

val x = packet.getX() - mc.thePlayer.posX
val y = packet.getY() - mc.thePlayer.posY
val z = packet.getZ() - mc.thePlayer.posZ
val diff = sqrt(x * x + y * y + z * z)
if (diff <= 8) {
event.cancelEvent()
PacketUtils.sendPacketNoEvent(
C06PacketPlayerPosLook(
packet.getX(),
packet.getY(),
packet.getZ(),
packet.getYaw(),
packet.getPitch(),
true
)
)

debug("switch pos")
}
}

if (packet is C0FPacketConfirmTransaction && !isInventory(packet.uid)) {
repeat(4) {
packetQueue.add(packet)
}
event.cancelEvent()
}
}

if (buzzsemi.get()) {
if (packet is C0FPacketConfirmTransaction) {
repeat(5) {
Expand Down Expand Up @@ -1542,6 +1609,14 @@ class Disabler : Module() {
}
}

if (cubecraft.get()) {
if (mc.thePlayer.ticksExisted % 180 == 0) {
while (packetQueue.size > 22) {
PacketUtils.sendPacketNoEvent(packetQueue.poll())
}
}
}

if (latestverus.get()) {
if (verusAntiFlyCheck.get() && !shouldActive) {
val flightMod = Launch.moduleManager[Flight::class.java]!!
Expand Down

0 comments on commit 5afe4f5

Please sign in to comment.