This commit is contained in:
parent
be40692c0d
commit
36c4eeb798
|
|
@ -9,6 +9,8 @@ public class PreMotionEvent extends Event {
|
|||
private double posZ;
|
||||
private float yaw;
|
||||
private float pitch;
|
||||
private float fakeYaw;
|
||||
private float fakePitch;
|
||||
private boolean onGround;
|
||||
private static boolean setRenderYaw;
|
||||
private boolean isSprinting;
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@ public interface IAccessorEntityPlayerSP {
|
|||
|
||||
@Accessor("lastReportedYaw")
|
||||
float getLastReportedYaw();
|
||||
|
||||
@Accessor("lastReportedPitch")
|
||||
float getLastReportedPitch();
|
||||
}
|
||||
|
|
@ -121,6 +121,7 @@ public abstract class MixinEntityPlayerSP extends AbstractClientPlayer {
|
|||
@Overwrite
|
||||
public void onUpdateWalkingPlayer() {
|
||||
PreMotionEvent.setRenderYaw(false);
|
||||
RotationUtils.setFakeRotations = false;
|
||||
PreMotionEvent preMotionEvent = new PreMotionEvent(
|
||||
this.posX,
|
||||
this.getEntityBoundingBox().minY,
|
||||
|
|
@ -166,6 +167,13 @@ public abstract class MixinEntityPlayerSP extends AbstractClientPlayer {
|
|||
RotationUtils.renderPitch = preMotionEvent.getPitch();
|
||||
RotationUtils.renderYaw = preMotionEvent.getYaw();
|
||||
|
||||
if (RotationUtils.setFakeRotations) {
|
||||
RotationUtils.renderPitch = RotationUtils.fakeRotations[1];
|
||||
RotationUtils.renderYaw = RotationUtils.fakeRotations[0];
|
||||
RotationUtils.setRenderYaw(RotationUtils.renderYaw);
|
||||
}
|
||||
RotationUtils.setFakeRotations = false;
|
||||
|
||||
double d0 = preMotionEvent.getPosX() - this.lastReportedPosX;
|
||||
double d1 = preMotionEvent.getPosY() - this.lastReportedPosY;
|
||||
double d2 = preMotionEvent.getPosZ() - this.lastReportedPosZ;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class KillAura extends Module {
|
|||
private ButtonSetting weaponOnly;
|
||||
|
||||
private String[] autoBlockModes = new String[] { "Manual", "Vanilla", "Partial", "Interact A", "Interact B" };
|
||||
private String[] interactAModes = new String[] { "10", "7", "8.5" };
|
||||
private String[] interactAModes = new String[] { "10", "7", "7.5" };
|
||||
private String[] interactBModes = new String[] { "10", "7", "8.5" };
|
||||
private String[] rotationModes = new String[] { "Silent", "Lock view", "None" };
|
||||
private String[] sortModes = new String[] { "Distance", "Health", "Hurttime", "Yaw" };
|
||||
|
|
@ -929,20 +929,12 @@ public class KillAura extends Module {
|
|||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -959,20 +951,12 @@ public class KillAura extends Module {
|
|||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -981,6 +965,9 @@ public class KillAura extends Module {
|
|||
if (interactTicks == 0) {
|
||||
firstEdge++;
|
||||
}
|
||||
if (firstEdge > 10) {
|
||||
firstEdge = 0;
|
||||
}
|
||||
interactTicks++;
|
||||
if (firstCycle) {
|
||||
switch (interactTicks) {
|
||||
|
|
@ -990,23 +977,15 @@ public class KillAura extends Module {
|
|||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
break;
|
||||
case 3:
|
||||
if (firstEdge >= 4) {
|
||||
firstEdge = 0;
|
||||
if (firstEdge == 3 || firstEdge == 6) {
|
||||
firstCycle = false;
|
||||
}
|
||||
interactTicks = 0;
|
||||
|
|
@ -1025,24 +1004,13 @@ public class KillAura extends Module {
|
|||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
lag = true;
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
lag = true;
|
||||
releasePackets(); // release
|
||||
if (firstEdge >= 2) {
|
||||
firstEdge = 0;
|
||||
firstCycle = true;
|
||||
}
|
||||
firstCycle = true;
|
||||
interactTicks = 0;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1062,24 +1030,16 @@ public class KillAura extends Module {
|
|||
swapped = true;
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (swapped) {
|
||||
setCurrentSlot();
|
||||
swapped = false;
|
||||
}
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1097,24 +1057,16 @@ public class KillAura extends Module {
|
|||
swapped = true;
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (swapped) {
|
||||
setCurrentSlot();
|
||||
swapped = false;
|
||||
}
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1142,24 +1094,16 @@ public class KillAura extends Module {
|
|||
}
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (swapped) {
|
||||
setCurrentSlot();
|
||||
swapped = false;
|
||||
}
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
break;
|
||||
case 3:
|
||||
firstCycle = false;
|
||||
|
|
@ -1188,24 +1132,16 @@ public class KillAura extends Module {
|
|||
}
|
||||
lag = false;
|
||||
}
|
||||
else {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (swapped) {
|
||||
setCurrentSlot();
|
||||
swapped = false;
|
||||
}
|
||||
if (!lag) {
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
}
|
||||
handleInteractAndAttack(distance, true, true, swung);
|
||||
sendBlockPacket();
|
||||
releasePackets(); // release
|
||||
lag = true;
|
||||
firstCycle = true;
|
||||
interactTicks = 0;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ public class Bhop extends Module {
|
|||
public SliderSetting mode;
|
||||
public static SliderSetting speedSetting;
|
||||
private ButtonSetting liquidDisable;
|
||||
private ButtonSetting sneakDisable, jumpMoving;
|
||||
public ButtonSetting disablerOnly;
|
||||
private ButtonSetting sneakDisable;
|
||||
private ButtonSetting jumpMoving;
|
||||
public ButtonSetting rotateYawOption, damageBoost, airStrafe, damageBoostRequireKey;
|
||||
public GroupSetting damageBoostGroup;
|
||||
public KeySetting damageBoostKey;
|
||||
|
|
@ -31,6 +33,7 @@ public class Bhop extends Module {
|
|||
super("Bhop", Module.category.movement);
|
||||
this.registerSetting(mode = new SliderSetting("Mode", 0, modes));
|
||||
this.registerSetting(speedSetting = new SliderSetting("Speed", 2.0, 0.8, 1.2, 0.01));
|
||||
this.registerSetting(disablerOnly = new ButtonSetting("Lowhop only if disabler loaded", false));
|
||||
this.registerSetting(liquidDisable = new ButtonSetting("Disable in liquid", true));
|
||||
this.registerSetting(sneakDisable = new ButtonSetting("Disable while sneaking", true));
|
||||
this.registerSetting(jumpMoving = new ButtonSetting("Only jump when moving", true));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package keystrokesmod.module.impl.movement;
|
||||
|
||||
import keystrokesmod.clickgui.ClickGui;
|
||||
import keystrokesmod.event.PrePlayerInputEvent;
|
||||
import net.minecraft.client.gui.GuiChat;
|
||||
import keystrokesmod.event.JumpEvent;
|
||||
import keystrokesmod.event.PreUpdateEvent;
|
||||
|
|
@ -19,6 +20,7 @@ import net.minecraft.network.Packet;
|
|||
import net.minecraft.network.play.client.C0DPacketCloseWindow;
|
||||
import net.minecraft.network.play.client.C0EPacketClickWindow;
|
||||
import net.minecraft.network.play.client.C16PacketClientStatus;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class LongJump extends Module {
|
|||
public static boolean function;
|
||||
|
||||
private int boostTicks;
|
||||
public int lastSlot = -1;
|
||||
public int lastSlot = -1, spoofSlot = -1;
|
||||
private int stopTime;
|
||||
private int rotateTick;
|
||||
private int motionDecayVal;
|
||||
|
|
@ -158,7 +158,7 @@ public class LongJump extends Module {
|
|||
return;
|
||||
}
|
||||
|
||||
if (spoofItem.isToggled()) {
|
||||
if (spoofItem.isToggled() && lastSlot != -1) {
|
||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
|
||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ public class LongJump extends Module {
|
|||
int fireballSlot = setupFireballSlot(true);
|
||||
if (fireballSlot != -1) {
|
||||
if (!manual.isToggled()) {
|
||||
lastSlot = mc.thePlayer.inventory.currentItem;
|
||||
lastSlot = spoofSlot = mc.thePlayer.inventory.currentItem;
|
||||
if (mc.thePlayer.inventory.currentItem != fireballSlot) {
|
||||
mc.thePlayer.inventory.currentItem = fireballSlot;
|
||||
}
|
||||
|
|
@ -229,6 +229,13 @@ public class LongJump extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSlotUpdate(SlotUpdateEvent e) {
|
||||
if (lastSlot != -1) {
|
||||
spoofSlot = e.slot;
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onPreMotion(PreMotionEvent e) {
|
||||
if (!Utils.nullCheck()) {
|
||||
|
|
@ -375,13 +382,14 @@ public class LongJump extends Module {
|
|||
|
||||
private void resetSlot() {
|
||||
if (lastSlot != -1 && !manual.isToggled()) {
|
||||
mc.thePlayer.inventory.currentItem = lastSlot;
|
||||
lastSlot = -1;
|
||||
spoofSlot = -1;
|
||||
firstSlot = -1;
|
||||
if (spoofItem.isToggled()) {
|
||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(false);
|
||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(false);
|
||||
}
|
||||
mc.thePlayer.inventory.currentItem = lastSlot;
|
||||
lastSlot = -1;
|
||||
firstSlot = -1;
|
||||
}
|
||||
slotReset = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public class NoSlow extends Module {
|
|||
else {
|
||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
||||
setCancelled = true;
|
||||
if (!Utils.jumpDown()) {
|
||||
if (!Utils.jumpDown() && !ModuleManager.bhop.isEnabled()) {
|
||||
mc.thePlayer.jump();
|
||||
}
|
||||
reSendConsume = true;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import keystrokesmod.module.Module;
|
|||
import keystrokesmod.module.ModuleManager;
|
||||
import keystrokesmod.module.impl.render.HUD;
|
||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||
import keystrokesmod.utility.RenderUtils;
|
||||
import keystrokesmod.utility.Theme;
|
||||
import keystrokesmod.utility.Utils;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
|
|
@ -20,143 +22,172 @@ import java.awt.*;
|
|||
import java.util.Objects;
|
||||
|
||||
public class Disabler extends Module {
|
||||
private SliderSetting disablerTicks;
|
||||
private SliderSetting activationDelay;
|
||||
|
||||
private final int defaultSetbacks = 20;
|
||||
private final long joinDelay = 200, delay = 0, checkDisabledTime = 4000, timeout = 12000;
|
||||
private final double min_offset = 0.2;
|
||||
|
||||
private long joinTime, lobbyTime, finished;
|
||||
private boolean awaitJoin, joinTick, awaitSetback, hideProgress, awaitJump, awaitGround;
|
||||
private int setbackCount, airTicks, disablerAirTicks;
|
||||
private double minSetbacks, zOffset;
|
||||
int tickCounter = 0;
|
||||
boolean waitingForGround = false;
|
||||
int airTicks = 0;
|
||||
boolean applyingMotion = false;
|
||||
int stateTickCounter = 0;
|
||||
boolean warningDisplayed = false;
|
||||
int sprintToggleTick = 0;
|
||||
boolean shouldRun = false;
|
||||
long lobbyTime = 0;
|
||||
long finished = 0;
|
||||
long activationDelayMillis;
|
||||
final long checkDisabledTime = 4000;
|
||||
private int color = new Color(0, 187, 255, 255).getRGB();
|
||||
private float barWidth = 100;
|
||||
private float barHeight = 6;
|
||||
private float filledWidth;
|
||||
private float barX;
|
||||
private float barY;
|
||||
private boolean shouldRender;
|
||||
private double firstY;
|
||||
private boolean reset;
|
||||
private float savedYaw, savedPitch;
|
||||
|
||||
private int color = new Color(0, 187, 255, 255).getRGB();
|
||||
|
||||
private String text;
|
||||
private int[] disp;
|
||||
private int width;
|
||||
public boolean disablerLoaded, running;
|
||||
|
||||
public Disabler() {
|
||||
super("Disabler", Module.category.player);
|
||||
this.registerSetting(disablerTicks = new SliderSetting("Ticks", "", 150, 110, 150, 5));
|
||||
this.registerSetting(activationDelay = new SliderSetting("Activation delay", " seconds", 0, 0, 4, 0.5));
|
||||
}
|
||||
|
||||
private void resetVars() {
|
||||
awaitJoin = joinTick = awaitSetback = awaitJump = false;
|
||||
minSetbacks = zOffset = lobbyTime = finished = setbackCount = 0;
|
||||
public void onEnable() {
|
||||
if (!disablerLoaded) {
|
||||
resetState();
|
||||
}
|
||||
}
|
||||
|
||||
public void onDisable() {
|
||||
resetVars();
|
||||
shouldRun = false;
|
||||
running = false;
|
||||
}
|
||||
|
||||
private void resetState() {
|
||||
shouldRun = true;
|
||||
tickCounter = 0;
|
||||
airTicks = 0;
|
||||
applyingMotion = false;
|
||||
waitingForGround = true;
|
||||
stateTickCounter = 0;
|
||||
warningDisplayed = false;
|
||||
running = false;
|
||||
sprintToggleTick = 0;
|
||||
lobbyTime = Utils.time();
|
||||
finished = 0;
|
||||
shouldRender = false;
|
||||
reset = false;
|
||||
activationDelayMillis = (long)(activationDelay.getInput() * 1000);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldJoin(EntityJoinWorldEvent e) {
|
||||
if (e.entity == mc.thePlayer) {
|
||||
resetState();
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onPreMotion(PreMotionEvent e) {
|
||||
if (Utils.getLobbyStatus() == 1 || Utils.hypixelStatus() != 1) {
|
||||
return;
|
||||
}
|
||||
long now = System.currentTimeMillis();
|
||||
|
||||
if (!awaitGround && !mc.thePlayer.onGround) {
|
||||
disablerAirTicks++;
|
||||
} else {
|
||||
awaitGround = false;
|
||||
disablerAirTicks = 0;
|
||||
}
|
||||
|
||||
if (awaitJoin && now >= joinTime + joinDelay) {
|
||||
if (Utils.getBedwarsStatus() == 1 || Utils.isBedwarsPractice() || Utils.getSkyWarsStatus() == 1) {
|
||||
awaitJoin = false;
|
||||
joinTick = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (awaitSetback) {
|
||||
color = Theme.getGradient((int) HUD.theme.getInput(), 0);
|
||||
text = "§7running disabler " + "§r" + Utils.round((now - lobbyTime) / 1000d, 1) + "s " + ((int) Utils.round(100 * (setbackCount / minSetbacks), 0)) + "%";
|
||||
width = mc.fontRendererObj.getStringWidth(text) / 2 - 2;
|
||||
} else {
|
||||
text = null;
|
||||
}
|
||||
|
||||
if (finished != 0 && mc.thePlayer.onGround && now - finished > checkDisabledTime) {
|
||||
Utils.print("&7[&dR&7] &adisabler enabled");
|
||||
finished = 0;
|
||||
disablerLoaded = true;
|
||||
}
|
||||
if (!shouldRun) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (awaitJump && disablerAirTicks == 5) {
|
||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindJump.getKeyCode(), false);
|
||||
awaitJump = false;
|
||||
|
||||
minSetbacks = defaultSetbacks;
|
||||
savedYaw = e.getYaw(); // pitch will be 0
|
||||
lobbyTime = now;
|
||||
awaitSetback = true;
|
||||
if ((now - lobbyTime) < activationDelayMillis) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (joinTick) {
|
||||
joinTick = false;
|
||||
Utils.print("&7[&dR&7] running disabler...");
|
||||
if (mc.thePlayer.onGround || (mc.thePlayer.fallDistance < 0.3 && !Utils.isBedwarsPractice())) {
|
||||
awaitJump = true;
|
||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindJump.getKeyCode(), true);
|
||||
} else {
|
||||
minSetbacks = defaultSetbacks;
|
||||
savedYaw = e.getYaw(); // pitch will be 0
|
||||
lobbyTime = now;
|
||||
awaitSetback = true;
|
||||
if (waitingForGround) {
|
||||
running = true;
|
||||
if (mc.thePlayer.onGround) {
|
||||
savedYaw = e.getYaw();
|
||||
savedPitch = e.getPitch();
|
||||
mc.thePlayer.motionY = 0.42f;
|
||||
waitingForGround = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (awaitSetback) {
|
||||
if (setbackCount >= minSetbacks) {
|
||||
Utils.print("&7[&dR&7] &afinished in &b" + Utils.round((now - lobbyTime) / 1000d, 1) + "&as, wait a few seconds...");
|
||||
resetVars();
|
||||
finished = now;
|
||||
return;
|
||||
} else if (lobbyTime != 0 && now - lobbyTime > timeout) {
|
||||
Utils.print("&7[&dR&7] &cdisabler failed");
|
||||
resetVars();
|
||||
return;
|
||||
airTicks = mc.thePlayer.onGround ? 0 : airTicks + 1;
|
||||
int simpleY = (int) Math.round((e.posY % 1) * 10000);
|
||||
//Utils.print("" + simpleY);
|
||||
if (airTicks >= 10) {
|
||||
if (!applyingMotion) {
|
||||
applyingMotion = true;
|
||||
firstY = mc.thePlayer.posY;
|
||||
}
|
||||
if (now - lobbyTime > delay) {
|
||||
e.setYaw(savedYaw);
|
||||
e.setPitch(savedPitch);
|
||||
|
||||
if (tickCounter < disablerTicks.getInput()) {
|
||||
shouldRender = true;
|
||||
|
||||
mc.thePlayer.motionX = 0;
|
||||
mc.thePlayer.motionY = 0;
|
||||
mc.thePlayer.motionZ = 0;
|
||||
|
||||
if (mc.thePlayer.ticksExisted % 2 == 0) {
|
||||
//e.setPosX(mc.thePlayer.posX + 0.11);
|
||||
e.setRotations(savedYaw, savedPitch);
|
||||
|
||||
if (mc.thePlayer.posY != firstY) {
|
||||
if (!reset) {
|
||||
resetState();
|
||||
activationDelayMillis = 4000;
|
||||
reset = true;
|
||||
Utils.print("&7[&dR&7] &adisabler reset, wait 4s");
|
||||
}
|
||||
else {
|
||||
shouldRun = false;
|
||||
applyingMotion = false;
|
||||
running = false;
|
||||
Utils.print("&7[&dR&7] &cfailed to reset disabler, re-enable to try again");
|
||||
}
|
||||
}
|
||||
|
||||
if (Utils.getSkyWarsStatus() == 1) {
|
||||
zOffset = min_offset * 0.7;
|
||||
if (mc.thePlayer.ticksExisted % 2 == 0) {
|
||||
zOffset *= -1;
|
||||
}
|
||||
e.setPosZ(e.getPosZ() + zOffset);
|
||||
} else {
|
||||
e.setPosZ(e.getPosZ() + (zOffset += min_offset));
|
||||
if (mc.thePlayer.ticksExisted % 2 == 0) {
|
||||
e.setPosZ(e.getPosZ() + 0.075);
|
||||
e.setPosX(e.getPosX() + 0.075);
|
||||
e.setPosY(e.getPosY() + 0.075);
|
||||
//e.setYaw(e.getYaw() + 8);
|
||||
}
|
||||
|
||||
tickCounter++;
|
||||
} else if (!warningDisplayed) {
|
||||
double totalTimeSeconds = (now - lobbyTime) / 1000.0;
|
||||
warningDisplayed = true;
|
||||
finished = now;
|
||||
shouldRender = false;
|
||||
shouldRun = false;
|
||||
applyingMotion = false;
|
||||
running = false;
|
||||
}
|
||||
}
|
||||
|
||||
filledWidth = (float)(barWidth * tickCounter / disablerTicks.getInput());
|
||||
final ScaledResolution scaledResolution = new ScaledResolution(mc);
|
||||
int[] disp = {scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), scaledResolution.getScaleFactor()};
|
||||
barX = disp[0] / 2 - barWidth / 2;
|
||||
barY = disp[1] / 2 + 20;
|
||||
}
|
||||
|
||||
@SubscribeEvent()
|
||||
public void onMoveInput(PrePlayerInputEvent e) {
|
||||
if (awaitSetback) {
|
||||
e.setForward(0);
|
||||
e.setStrafe(0);
|
||||
mc.thePlayer.movementInput.jump = false;
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onReceivePacket(ReceivePacketEvent e) {
|
||||
if (e.getPacket() instanceof S08PacketPlayerPosLook) {
|
||||
setbackCount++;
|
||||
zOffset = 0;
|
||||
if (!running) {
|
||||
return;
|
||||
}
|
||||
e.setForward(0);
|
||||
e.setStrafe(0);
|
||||
mc.thePlayer.movementInput.jump = false;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
@ -165,26 +196,12 @@ public class Disabler extends Module {
|
|||
return;
|
||||
}
|
||||
if (ev.phase == TickEvent.Phase.END) {
|
||||
if (mc.currentScreen != null || !awaitSetback || text == null) {
|
||||
if (mc.currentScreen != null || !shouldRun || !shouldRender) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
float widthOffset = 0;
|
||||
color = Theme.getGradient((int) HUD.theme.getInput(), 0);
|
||||
final ScaledResolution scaledResolution = new ScaledResolution(mc);
|
||||
int[] display = {scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), scaledResolution.getScaleFactor()};
|
||||
mc.fontRendererObj.drawString(text, display[0] / 2 - width + widthOffset, display[1] / 2 + 8, color, true);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldJoin(EntityJoinWorldEvent e) {
|
||||
if (e.entity == mc.thePlayer) {
|
||||
long joinTime = System.currentTimeMillis();
|
||||
if (awaitSetback) {
|
||||
Utils.print("&7[&dR&7] &cdisabing disabler");
|
||||
}
|
||||
resetVars();
|
||||
awaitJoin = awaitGround = true;
|
||||
}
|
||||
RenderUtils.drawRect(barX, barY, barX + barWidth, barY + barHeight, 0xFF555555);
|
||||
RenderUtils.drawRect(barX, barY, barX + filledWidth, barY + barHeight, color);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
package keystrokesmod.module.impl.player;
|
||||
|
||||
import keystrokesmod.Raven;
|
||||
import keystrokesmod.event.PreMotionEvent;
|
||||
import keystrokesmod.event.PreUpdateEvent;
|
||||
import keystrokesmod.event.ReceivePacketEvent;
|
||||
import keystrokesmod.event.SlotUpdateEvent;
|
||||
import keystrokesmod.event.*;
|
||||
import keystrokesmod.mixin.interfaces.IMixinItemRenderer;
|
||||
import keystrokesmod.module.Module;
|
||||
import keystrokesmod.module.ModuleManager;
|
||||
|
|
@ -19,6 +16,9 @@ import net.minecraft.block.BlockTNT;
|
|||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.play.client.C03PacketPlayer;
|
||||
import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
||||
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
||||
import net.minecraft.network.play.client.C0APacketAnimation;
|
||||
import net.minecraft.network.play.server.S12PacketEntityVelocity;
|
||||
import net.minecraft.network.play.server.S27PacketExplosion;
|
||||
|
|
@ -36,7 +36,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
|
||||
public class Scaffold extends Module {
|
||||
private final SliderSetting motion;
|
||||
public SliderSetting rotation;
|
||||
public SliderSetting rotation, fakeRotation;
|
||||
private SliderSetting sprint;
|
||||
private SliderSetting fastScaffold;
|
||||
private SliderSetting multiPlace;
|
||||
|
|
@ -49,10 +49,11 @@ public class Scaffold extends Module {
|
|||
public ButtonSetting showBlockCount;
|
||||
private ButtonSetting silentSwing;
|
||||
|
||||
private String[] rotationModes = new String[] { "None", "Simple", "Offset", "Precise" };
|
||||
private String[] sprintModes = new String[] { "None", "Vanilla", "Float" };
|
||||
private String[] fastScaffoldModes = new String[] { "None", "Jump B", "Jump B Low", "Jump E", "Keep-Y", "Keep-Y Low", "Jump Nigger" };
|
||||
private String[] multiPlaceModes = new String[] { "Disabled", "1 extra", "2 extra" };
|
||||
private String[] rotationModes = new String[] { "§cDisabled", "Simple", "Offset", "Precise" };
|
||||
private String[] fakeRotationModes = new String[] { "§cDisabled", "Strict", "Smooth", "Spin" };
|
||||
private String[] sprintModes = new String[] { "§cDisabled", "Vanilla", "Float" };
|
||||
private String[] fastScaffoldModes = new String[] { "§cDisabled", "Jump B", "Jump B Low", "Jump E", "Keep-Y", "Keep-Y Low", "Jump Nigger" };
|
||||
private String[] multiPlaceModes = new String[] { "§cDisabled", "1 extra", "2 extra" };
|
||||
|
||||
public Map<BlockPos, Timer> highlight = new HashMap<>();
|
||||
|
||||
|
|
@ -73,6 +74,8 @@ public class Scaffold extends Module {
|
|||
private int rotationDelay;
|
||||
private int blockSlot = -1;
|
||||
|
||||
private float fakeYaw1, fakeYaw2;
|
||||
|
||||
public boolean canBlockFade;
|
||||
|
||||
private boolean floatJumped;
|
||||
|
|
@ -87,7 +90,7 @@ public class Scaffold extends Module {
|
|||
private long lastPlaceTime, rotationTimeout = 250L;
|
||||
private float lastYaw = 0.0f;
|
||||
private float lastPitch = 0.0f;
|
||||
public float yaw, pitch, blockYaw, groundYaw, yawOffset, lastYawOffset;
|
||||
public float scaffoldYaw, scaffoldPitch, blockYaw, groundYaw, yawOffset, lastYawOffset;
|
||||
private boolean set2;
|
||||
|
||||
public boolean moduleEnabled;
|
||||
|
|
@ -99,7 +102,8 @@ public class Scaffold extends Module {
|
|||
|
||||
private boolean was451, was452;
|
||||
|
||||
private float minOffset, pOffset, minPitch;
|
||||
private float minOffset, pOffset;
|
||||
private float minPitch = 80F;
|
||||
|
||||
private float edge;
|
||||
|
||||
|
|
@ -108,8 +112,16 @@ public class Scaffold extends Module {
|
|||
private boolean lastAir;
|
||||
private double thisX, thisY, thisZ;
|
||||
|
||||
private float finalYaw, finalPitch, lastFY, lastFP;
|
||||
private boolean set3;
|
||||
|
||||
private float fakeYaw, fakePitch;
|
||||
|
||||
private int speedEdge;
|
||||
|
||||
private int currentFace;
|
||||
private boolean enabledOffGround = false;
|
||||
|
||||
private EnumFacing[] facings = { EnumFacing.EAST, EnumFacing.WEST, EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.UP };
|
||||
private BlockPos[] offsets = { new BlockPos(-1, 0, 0), new BlockPos(1, 0, 0), new BlockPos(0, 0, 1), new BlockPos(0, 0, -1), new BlockPos(0, -1, 0) };
|
||||
|
||||
|
|
@ -119,6 +131,7 @@ public class Scaffold extends Module {
|
|||
super("Scaffold", category.player);
|
||||
this.registerSetting(motion = new SliderSetting("Motion", "%", 100, 50, 150, 1));
|
||||
this.registerSetting(rotation = new SliderSetting("Rotation", 1, rotationModes));
|
||||
this.registerSetting(fakeRotation = new SliderSetting("Rotation (fake)", 0, fakeRotationModes));
|
||||
this.registerSetting(sprint = new SliderSetting("Sprint mode", 0, sprintModes));
|
||||
this.registerSetting(fastScaffold = new SliderSetting("Fast scaffold", 0, fastScaffoldModes));
|
||||
this.registerSetting(multiPlace = new SliderSetting("Multi-place", 0, multiPlaceModes));
|
||||
|
|
@ -150,6 +163,12 @@ public class Scaffold extends Module {
|
|||
moduleEnabled = true;
|
||||
ModuleUtils.fadeEdge = 0;
|
||||
edge = -999999929;
|
||||
minPitch = 80F;
|
||||
if (!mc.thePlayer.onGround) {
|
||||
rotationDelay = 2;
|
||||
enabledOffGround = true;
|
||||
}
|
||||
lastEdge2 = mc.thePlayer.rotationYaw;
|
||||
|
||||
FMLCommonHandler.instance().bus().register(scaffoldBlockCount = new ScaffoldBlockCount(mc));
|
||||
lastSlot.set(-1);
|
||||
|
|
@ -242,18 +261,24 @@ public class Scaffold extends Module {
|
|||
floatStarted = floatJumped = floatKeepY = floatWasEnabled = false;
|
||||
}
|
||||
|
||||
|
||||
if (targetBlock != null) {
|
||||
Vec3 lookAt = new Vec3(targetBlock.xCoord - lookVec.xCoord, targetBlock.yCoord - lookVec.yCoord, targetBlock.zCoord - lookVec.zCoord);
|
||||
blockRotations = RotationUtils.getRotations(lookAt);
|
||||
targetBlock = null;
|
||||
fakeYaw1 = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
}
|
||||
if (blockRotations == null) {
|
||||
fakeYaw1 = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
}
|
||||
|
||||
switch ((int) rotation.getInput()) {
|
||||
case 1:
|
||||
yaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
pitch = 80F;
|
||||
e.setRotations(yaw, pitch);
|
||||
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
scaffoldPitch = 79F;
|
||||
if (currentFace == 1) {
|
||||
scaffoldPitch = 87F;
|
||||
}
|
||||
e.setRotations(scaffoldYaw, scaffoldPitch);
|
||||
break;
|
||||
case 2:
|
||||
float moveAngle = (float) getMovementAngle();
|
||||
|
|
@ -261,47 +286,48 @@ public class Scaffold extends Module {
|
|||
float normalizedYaw = (relativeYaw % 360 + 360) % 360;
|
||||
float quad = normalizedYaw % 90;
|
||||
|
||||
float side = MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw);
|
||||
float side = MathHelper.wrapAngleTo180_float(getMotionYaw() - scaffoldYaw);
|
||||
float yawBackwards = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
||||
float blockYawOffset = MathHelper.wrapAngleTo180_float(yawBackwards - blockYaw);
|
||||
|
||||
long strokeDelay = 225;
|
||||
long strokeDelay = 250;
|
||||
|
||||
if (quad <= 5 || quad >= 85) {
|
||||
yawAngle = 127F;//(float) first.getInput();
|
||||
minOffset = 18;//(int) first1.getInput();
|
||||
minPitch = 71.08F;
|
||||
yawAngle = 128F;
|
||||
minOffset = 13;
|
||||
minPitch = 74.08F;
|
||||
}
|
||||
if (quad > 5 && quad <= 15 || quad >= 75 && quad < 85) {
|
||||
yawAngle = 128F;//(float) second.getInput();
|
||||
minOffset = 15;//(int) second1.getInput();
|
||||
minPitch = 71.84F;
|
||||
yawAngle = 129F;
|
||||
minOffset = 11;
|
||||
minPitch = 74.84F;
|
||||
}
|
||||
if (quad > 15 && quad <= 25 || quad >= 65 && quad < 75) {
|
||||
yawAngle = 129F;//(float) three.getInput();
|
||||
minOffset = 12;//(int) three1.getInput();
|
||||
minPitch = 72.45F;
|
||||
yawAngle = 131.50F;
|
||||
minOffset = 8;
|
||||
minPitch = 75.35F;
|
||||
}
|
||||
if (quad > 25 && quad <= 32 || quad >= 58 && quad < 65) {
|
||||
yawAngle = 130F;//(float) four.getInput();
|
||||
minOffset = 9;//(int) four1.getInput();
|
||||
minPitch = 75.43F;
|
||||
yawAngle = 132.50F;
|
||||
minOffset = 6;
|
||||
minPitch = 75.73F;
|
||||
}
|
||||
if (quad > 32 && quad <= 38 || quad >= 52 && quad < 58) {
|
||||
yawAngle = 131F;//(float) five.getInput();
|
||||
minOffset = 7;//(int) five1.getInput();
|
||||
minPitch = 75.8F;
|
||||
yawAngle = 133.50F;
|
||||
minOffset = 5;
|
||||
minPitch = 76.41F;
|
||||
}
|
||||
if (quad > 38 && quad <= 42 || quad >= 48 && quad < 52) {
|
||||
yawAngle = 132.50F;//(float) six.getInput();
|
||||
minOffset = 5;//(int) six1.getInput();
|
||||
minPitch = 76.84F;
|
||||
yawAngle = 135.50F;
|
||||
minOffset = 4;
|
||||
minPitch = 77.54F;
|
||||
}
|
||||
if (quad > 42 && quad <= 45 || quad >= 45 && quad < 48) {
|
||||
yawAngle = 137F;//(float) seven.getInput();
|
||||
minOffset = 3;//(int) seven1.getInput();
|
||||
minPitch = 78.1F;
|
||||
yawAngle = 137.50F;
|
||||
minOffset = 4;
|
||||
minPitch = 77.93F;
|
||||
}
|
||||
//Utils.print("" + minOffset);
|
||||
//float offsetAmountD = ((((float) offsetAmount.getInput() / 10) - 10) * -2) - (((float) offsetAmount.getInput() / 10) - 10);
|
||||
//yawAngle += offsetAmountD;
|
||||
//Utils.print("" + offsetAmountD);
|
||||
|
|
@ -312,16 +338,28 @@ public class Scaffold extends Module {
|
|||
if (firstStroke > 0 && (System.currentTimeMillis() - firstStroke) > strokeDelay) {
|
||||
firstStroke = 0;
|
||||
}
|
||||
if (enabledOffGround) {
|
||||
if (blockRotations != null) {
|
||||
scaffoldYaw = blockRotations[0];
|
||||
scaffoldPitch = blockRotations[1];
|
||||
}
|
||||
else {
|
||||
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
scaffoldPitch = minPitch;
|
||||
}
|
||||
e.setRotations(scaffoldYaw, scaffoldPitch);
|
||||
break;
|
||||
}
|
||||
|
||||
if (blockRotations != null) {
|
||||
blockYaw = blockRotations[0];
|
||||
pitch = blockRotations[1];
|
||||
scaffoldPitch = blockRotations[1];
|
||||
yawOffset = blockYawOffset;
|
||||
if (pitch < minPitch) {
|
||||
pitch = minPitch;
|
||||
if (scaffoldPitch < minPitch) {
|
||||
scaffoldPitch = minPitch;
|
||||
}
|
||||
} else {
|
||||
pitch = 80F;
|
||||
scaffoldPitch = minPitch;
|
||||
if (edge == 1) {
|
||||
firstStroke = Utils.time();
|
||||
}
|
||||
|
|
@ -332,16 +370,16 @@ public class Scaffold extends Module {
|
|||
lastAir = blockBelow instanceof BlockAir;
|
||||
|
||||
if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) {
|
||||
e.setRotations(theYaw, pitch);
|
||||
e.setRotations(theYaw, scaffoldPitch);
|
||||
break;
|
||||
}
|
||||
|
||||
float motionYaw = getMotionYaw();
|
||||
|
||||
float newYaw = motionYaw - offset * Math.signum(
|
||||
MathHelper.wrapAngleTo180_float(motionYaw - yaw)
|
||||
MathHelper.wrapAngleTo180_float(motionYaw - scaffoldYaw)
|
||||
);
|
||||
yaw = MathHelper.wrapAngleTo180_float(newYaw);
|
||||
scaffoldYaw = MathHelper.wrapAngleTo180_float(newYaw);
|
||||
|
||||
if (quad > 5 && quad < 85) {
|
||||
if (quad < 45F) {
|
||||
|
|
@ -395,8 +433,8 @@ public class Scaffold extends Module {
|
|||
if (set2) {
|
||||
if (yawOffset <= -0) yawOffset = -0;
|
||||
if (yawOffset >= minOffset) yawOffset = minOffset;
|
||||
e.setRotations((yaw + offset * 2) - yawOffset, pitch);
|
||||
theYaw = e.getYaw();
|
||||
theYaw = (scaffoldYaw + offset * 2) - yawOffset;
|
||||
e.setRotations(theYaw, scaffoldPitch);
|
||||
break;
|
||||
}
|
||||
} else if (side <= -0) {
|
||||
|
|
@ -420,8 +458,8 @@ public class Scaffold extends Module {
|
|||
if (set2) {
|
||||
if (yawOffset >= 0) yawOffset = 0;
|
||||
if (yawOffset <= -minOffset) yawOffset = -minOffset;
|
||||
e.setRotations((yaw - offset * 2) - yawOffset, pitch);
|
||||
theYaw = e.getYaw();
|
||||
theYaw = (scaffoldYaw - offset * 2) - yawOffset;
|
||||
e.setRotations(theYaw, scaffoldPitch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -433,20 +471,19 @@ public class Scaffold extends Module {
|
|||
if (yawOffset <= -0) yawOffset = -0;
|
||||
if (yawOffset >= minOffset) yawOffset = minOffset;
|
||||
}
|
||||
e.setRotations(yaw - yawOffset, pitch);
|
||||
theYaw = e.getYaw();
|
||||
theYaw = scaffoldYaw - yawOffset;
|
||||
e.setRotations(theYaw, scaffoldPitch);
|
||||
break;
|
||||
case 3:
|
||||
if (blockRotations != null) {
|
||||
yaw = blockRotations[0];
|
||||
pitch = blockRotations[1];
|
||||
scaffoldYaw = blockRotations[0];
|
||||
scaffoldPitch = blockRotations[1];
|
||||
}
|
||||
else {
|
||||
yaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
pitch = 80F;
|
||||
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
scaffoldPitch = 80F;
|
||||
}
|
||||
|
||||
e.setRotations(yaw, pitch);
|
||||
e.setRotations(scaffoldYaw, scaffoldPitch);
|
||||
theYaw = e.getYaw();
|
||||
break;
|
||||
}
|
||||
|
|
@ -454,6 +491,9 @@ public class Scaffold extends Module {
|
|||
firstStroke = Utils.time();
|
||||
edge = 1;
|
||||
}
|
||||
if (mc.thePlayer.onGround) {
|
||||
enabledOffGround = false;
|
||||
}
|
||||
|
||||
//get yaw - player yaw offset
|
||||
float yv = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
||||
|
|
@ -494,14 +534,6 @@ public class Scaffold extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
//Smoothing
|
||||
float yawDifference = getAngleDifference(lastEdge2, e.getYaw());
|
||||
float smoothingFactor = (1.0f - (30.0f / 100.0f));
|
||||
if (!mc.thePlayer.onGround) {
|
||||
//e.setYaw(lastEdge2 + yawDifference * smoothingFactor);
|
||||
}
|
||||
lastEdge2 = e.getYaw();
|
||||
|
||||
//pitch fix
|
||||
if (e.getPitch() > 89.9F) {
|
||||
e.setPitch(89.9F);
|
||||
|
|
@ -510,6 +542,53 @@ public class Scaffold extends Module {
|
|||
lastYaw = mc.thePlayer.rotationYaw;
|
||||
if (lastPlaceTime > 0 && (System.currentTimeMillis() - lastPlaceTime) > rotationTimeout) blockRotations = null;
|
||||
if (rotationDelay > 0) --rotationDelay;
|
||||
|
||||
finalYaw = e.getYaw();
|
||||
finalPitch = e.getPitch();
|
||||
|
||||
//Fake rotations
|
||||
if (fakeRotation.getInput() > 0) {
|
||||
if (fakeRotation.getInput() == 1) {
|
||||
fakeYaw = fakeYaw1;
|
||||
if (blockRotations != null) {
|
||||
fakePitch = blockRotations[1] + 5;
|
||||
} else {
|
||||
fakePitch = scaffoldPitch;
|
||||
}
|
||||
}
|
||||
else if (fakeRotation.getInput() == 2) {
|
||||
fakeYaw2 = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||
float yawDifference = getAngleDifference(lastEdge2, fakeYaw2);
|
||||
float smoothingFactor = (1.0f - (65.0f / 100.0f));
|
||||
fakeYaw2 = (lastEdge2 + yawDifference * smoothingFactor);
|
||||
lastEdge2 = fakeYaw2;
|
||||
|
||||
fakeYaw = fakeYaw2;
|
||||
if (blockRotations != null) {
|
||||
fakePitch = blockRotations[1] + 5;
|
||||
} else {
|
||||
fakePitch = scaffoldPitch;
|
||||
}
|
||||
}
|
||||
else if (fakeRotation.getInput() == 3) {
|
||||
fakeYaw += 25.71428571428571F;
|
||||
fakePitch = 90F;
|
||||
}
|
||||
RotationUtils.setFakeRotations(fakeYaw, fakePitch);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSendPacket(SendPacketEvent e) {
|
||||
if (!Utils.nullCheck()) {
|
||||
return;
|
||||
}
|
||||
if (!isEnabled) {
|
||||
return;
|
||||
}
|
||||
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement) {
|
||||
currentFace = ((C08PacketPlayerBlockPlacement) e.getPacket()).getPlacedBlockDirection();
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
@ -621,11 +700,12 @@ public class Scaffold extends Module {
|
|||
blockInfo = null;
|
||||
blockRotations = null;
|
||||
fastScaffoldKeepY = firstKeepYPlace = rotateForward = rotatingForward = floatStarted = floatJumped = floatWasEnabled = towerEdge =
|
||||
was451 = was452 = lastAir = false;
|
||||
was451 = was452 = lastAir = enabledOffGround = false;
|
||||
rotationDelay = keepYTicks = scaffoldTicks = speedEdge = 0;
|
||||
firstStroke = 0;
|
||||
startYPos = -1;
|
||||
lookVec = null;
|
||||
set3 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,13 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|||
|
||||
public class Tower extends Module {
|
||||
final private SliderSetting towerMove;
|
||||
private SliderSetting speedSetting;
|
||||
final private SliderSetting verticalTower;
|
||||
final private SliderSetting slowedSpeed;
|
||||
final private SliderSetting slowedTicks;
|
||||
final private ButtonSetting disableWhileHurt;
|
||||
|
||||
final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Edge", "2.5 tick"};
|
||||
final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Edge", "2.5 tick", "1.5 tick"};
|
||||
final private String[] verticalTowerModes = new String[]{"None", "Vanilla", "Extra block"};
|
||||
private int slowTicks;
|
||||
private boolean wasTowering;
|
||||
|
|
@ -47,6 +48,7 @@ public class Tower extends Module {
|
|||
public Tower() {
|
||||
super("Tower", category.player);
|
||||
this.registerSetting(towerMove = new SliderSetting("Tower Move", 0, towerMoveModes));
|
||||
this.registerSetting(speedSetting = new SliderSetting("Speed", 3.0, 0.5, 8.0, 0.1));
|
||||
this.registerSetting(verticalTower = new SliderSetting("Vertical Tower", 0, verticalTowerModes));
|
||||
this.registerSetting(slowedSpeed = new SliderSetting("Slowed speed", "%", 0, 0, 100, 1));
|
||||
this.registerSetting(slowedTicks = new SliderSetting("Slowed ticks", 1, 0, 20, 1));
|
||||
|
|
@ -58,9 +60,6 @@ public class Tower extends Module {
|
|||
@SubscribeEvent
|
||||
public void onPreMotion(PreMotionEvent e) {
|
||||
if (canTower() && Utils.keysDown()) {
|
||||
if (tower) {
|
||||
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
||||
}
|
||||
if (disableWhileHurt.isToggled() && ModuleUtils.damage) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -81,6 +80,9 @@ public class Tower extends Module {
|
|||
ModuleManager.scaffold.rotateForward();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -89,9 +91,12 @@ public class Tower extends Module {
|
|||
@SubscribeEvent
|
||||
public void onPreUpdate(PreUpdateEvent e) {
|
||||
int valY = (int) Math.round((mc.thePlayer.posY % 1) * 10000);
|
||||
int simpleY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D);
|
||||
if (canTower() && Utils.keysDown()) {
|
||||
wasTowering = true;
|
||||
if (disableWhileHurt.isToggled() && ModuleUtils.damage) {
|
||||
towerTicks = 0;
|
||||
tower = false;
|
||||
return;
|
||||
}
|
||||
switch ((int) towerMove.getInput()) {
|
||||
|
|
@ -170,11 +175,11 @@ public class Tower extends Module {
|
|||
break;
|
||||
case 4:
|
||||
speed = false;
|
||||
int simpleY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D);
|
||||
if (mc.thePlayer.posY % 1 == 0) {
|
||||
tower = true;
|
||||
}
|
||||
if (tower) {
|
||||
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
||||
switch (simpleY) {
|
||||
case 0:
|
||||
mc.thePlayer.motionY = 0.42f;
|
||||
|
|
@ -195,6 +200,43 @@ public class Tower extends Module {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
speed = false;
|
||||
if (mc.thePlayer.posY % 1 == 0) {
|
||||
tower = true;
|
||||
}
|
||||
if (tower) {
|
||||
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
||||
switch (towerTicks) {
|
||||
case 0:
|
||||
mc.thePlayer.motionY = 0.42f;
|
||||
Utils.setSpeed(get15tickspeed(getSpeedLevel())); // Speed + Strafe tick
|
||||
speed = true;
|
||||
break;
|
||||
case 1:
|
||||
mc.thePlayer.motionY = 0.33f;
|
||||
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
|
||||
break;
|
||||
case 2:
|
||||
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
|
||||
break;
|
||||
case 3:
|
||||
mc.thePlayer.motionY = 0.42f;
|
||||
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
|
||||
break;
|
||||
case 4:
|
||||
mc.thePlayer.motionY = 0.33f;
|
||||
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
|
||||
break;
|
||||
case 5:
|
||||
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f + 0.0000001;
|
||||
break;
|
||||
case 6:
|
||||
mc.thePlayer.motionY = -0.01;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -281,12 +323,12 @@ public class Tower extends Module {
|
|||
if (!firstJump) {
|
||||
if (!mc.thePlayer.onGround) {
|
||||
if (!startedTowerInAir) {
|
||||
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()) - 0.04);
|
||||
//Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()) - 0.04);
|
||||
}
|
||||
startedTowerInAir = true;
|
||||
}
|
||||
else if (mc.thePlayer.onGround) {
|
||||
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()));
|
||||
//Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()));
|
||||
firstJump = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -373,22 +415,49 @@ public class Tower extends Module {
|
|||
return value;
|
||||
}
|
||||
|
||||
private double[] towerSpeedLevels = {0.3, 0.34, 0.38, 0.42, 0.42};
|
||||
|
||||
private double getTowerSpeed(int speedLevel) {
|
||||
if (speedLevel >= 0) {
|
||||
return towerSpeedLevels[speedLevel];
|
||||
if (speedLevel == 0) {
|
||||
return (speedSetting.getInput() / 10);
|
||||
} else if (speedLevel == 1) {
|
||||
return (speedSetting.getInput() / 10) + 0.04;
|
||||
} else if (speedLevel == 2) {
|
||||
return (speedSetting.getInput() / 10) + 0.08;
|
||||
} else if (speedLevel == 3) {
|
||||
return (speedSetting.getInput() / 10) + 0.12;
|
||||
} else if (speedLevel == 4) {
|
||||
return (speedSetting.getInput() / 10) + 0.12;
|
||||
}
|
||||
return towerSpeedLevels[0];
|
||||
return (speedSetting.getInput() / 10);
|
||||
}
|
||||
|
||||
private final double[] towerGroundSpeedLevels = {0.22, 0.25, 0.3, 0.35, 0.4};
|
||||
|
||||
private double getTowerGroundSpeed(int speedLevel) {
|
||||
if (speedLevel >= 0) {
|
||||
return towerGroundSpeedLevels[speedLevel];
|
||||
if (speedLevel == 0) {
|
||||
return (speedSetting.getInput() / 10) - 0.08;
|
||||
} else if (speedLevel == 1) {
|
||||
return (speedSetting.getInput() / 10) - 0.05;
|
||||
} else if (speedLevel == 2) {
|
||||
return (speedSetting.getInput() / 10);
|
||||
} else if (speedLevel == 3) {
|
||||
return (speedSetting.getInput() / 10) + 0.05;
|
||||
} else if (speedLevel == 4) {
|
||||
return (speedSetting.getInput() / 10) + 0.10;
|
||||
}
|
||||
return towerGroundSpeedLevels[0];
|
||||
return (speedSetting.getInput() / 10) - 0.08;
|
||||
}
|
||||
|
||||
private double get15tickspeed(int speedLevel) {
|
||||
if (speedLevel == 0) {
|
||||
return (speedSetting.getInput() / 10);
|
||||
} else if (speedLevel == 1) {
|
||||
return (speedSetting.getInput() / 10) + 0.04;
|
||||
} else if (speedLevel == 2) {
|
||||
return (speedSetting.getInput() / 10) + 0.08;
|
||||
} else if (speedLevel == 3) {
|
||||
return (speedSetting.getInput() / 10) + 0.12;
|
||||
} else if (speedLevel == 4) {
|
||||
return (speedSetting.getInput() / 10) + 0.13;
|
||||
}
|
||||
return (speedSetting.getInput() / 10);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -28,6 +28,7 @@ public class Arrows extends Module {
|
|||
private ButtonSetting renderEnemies;
|
||||
private ButtonSetting renderDistance;
|
||||
private ButtonSetting renderOnlyOffScreen;
|
||||
private ButtonSetting renderInGUIs;
|
||||
|
||||
private int friendColor = new Color(0, 255, 0, 255).getRGB();
|
||||
private int enemyColor = new Color(255, 0, 0, 255).getRGB();
|
||||
|
|
@ -45,6 +46,7 @@ public class Arrows extends Module {
|
|||
this.registerSetting(renderEnemies = new ButtonSetting("Render enemies (red)", true));
|
||||
this.registerSetting(renderDistance = new ButtonSetting("Render distance", true));
|
||||
this.registerSetting(renderOnlyOffScreen = new ButtonSetting("Render only offscreen", false));
|
||||
this.registerSetting(renderInGUIs = new ButtonSetting("Render in GUIs", false));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
@ -52,7 +54,7 @@ public class Arrows extends Module {
|
|||
if (event.phase != TickEvent.Phase.END) {
|
||||
return;
|
||||
}
|
||||
if (mc.currentScreen != null || !Utils.nullCheck()) {
|
||||
if (mc.currentScreen != null && !renderInGUIs.isToggled() || !Utils.nullCheck()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import keystrokesmod.module.impl.render.HUD;
|
|||
import keystrokesmod.utility.command.CommandManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockAir;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import keystrokesmod.module.ModuleManager;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
|
|
@ -18,6 +19,7 @@ import net.minecraft.network.play.server.S27PacketExplosion;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
|
|
@ -40,8 +42,6 @@ public class ModuleUtils {
|
|||
private long FIREBALL_TIMEOUT = 500L, fireballTime = 0;
|
||||
public static int inAirTicks, groundTicks, stillTicks;
|
||||
public static int fadeEdge;
|
||||
public static int lastFaceDifference;
|
||||
private int lastFace;
|
||||
public static double offsetValue = 0.0000000000201;
|
||||
public static boolean isAttacking;
|
||||
private int attackingTicks;
|
||||
|
|
@ -57,8 +57,17 @@ public class ModuleUtils {
|
|||
private int damageTicks;
|
||||
private boolean lowhopAir;
|
||||
|
||||
private int edgeTick;
|
||||
|
||||
public static boolean canSlow, didSlow, setSlow;
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldJoin(EntityJoinWorldEvent e) {
|
||||
if (e.entity == mc.thePlayer) {
|
||||
ModuleManager.disabler.disablerLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSendPacketNoEvent(NoEventPacketEvent e) {
|
||||
if (!Utils.nullCheck()) {
|
||||
|
|
@ -148,36 +157,6 @@ public class ModuleUtils {
|
|||
}
|
||||
}
|
||||
|
||||
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement && Utils.scaffoldDiagonal(false)) {
|
||||
if (((C08PacketPlayerBlockPlacement) e.getPacket()).getPlacedBlockDirection() != 1) {
|
||||
int currentFace = ((C08PacketPlayerBlockPlacement) e.getPacket()).getPlacedBlockDirection();
|
||||
|
||||
if (currentFace == lastFace) {
|
||||
lastFaceDifference++;
|
||||
}
|
||||
else {
|
||||
lastFaceDifference = 0;
|
||||
}
|
||||
|
||||
lastFace = currentFace;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onReceivePacket(ReceivePacketEvent e) {
|
||||
if (!Utils.nullCheck()) {
|
||||
return;
|
||||
}
|
||||
if (e.getPacket() instanceof S12PacketEntityVelocity) {
|
||||
if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) {
|
||||
|
||||
damage = firstDamage = true;
|
||||
damageTicks = 0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
@ -285,6 +264,21 @@ public class ModuleUtils {
|
|||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onReceivePacket(ReceivePacketEvent e) {
|
||||
if (!Utils.nullCheck()) {
|
||||
return;
|
||||
}
|
||||
if (e.getPacket() instanceof S12PacketEntityVelocity) {
|
||||
if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) {
|
||||
|
||||
damage = firstDamage = true;
|
||||
damageTicks = 0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPostMotion(PostMotionEvent e) {
|
||||
if (bhopBoostConditions()) {
|
||||
|
|
@ -336,12 +330,13 @@ public class ModuleUtils {
|
|||
groundTicks = !mc.thePlayer.onGround ? 0 : ++groundTicks;
|
||||
stillTicks = Utils.isMoving() ? 0 : ++stillTicks;
|
||||
|
||||
Block blockAbove = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY + 2, mc.thePlayer.posZ));
|
||||
Block blockBelow = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ));
|
||||
Block blockBelow2 = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 2, mc.thePlayer.posZ));
|
||||
Block block = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ));
|
||||
|
||||
|
||||
if (ModuleManager.bhop.didMove || ModuleManager.scaffold.lowhop) {
|
||||
if ((ModuleManager.bhop.didMove || ModuleManager.scaffold.lowhop) && (!ModuleManager.bhop.disablerOnly.isToggled() || ModuleManager.bhop.disablerOnly.isToggled() && ModuleManager.disabler.disablerLoaded)) {
|
||||
|
||||
if ((!ModuleUtils.damage || Velocity.vertical.getInput() == 0) && !mc.thePlayer.isCollidedHorizontally) {
|
||||
|
||||
|
|
@ -360,7 +355,7 @@ public class ModuleUtils {
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (!(block instanceof BlockAir) || (blockBelow instanceof BlockAir && blockBelow2 instanceof BlockAir)) {
|
||||
if (!ModuleManager.bhop.lowhop && (!(block instanceof BlockAir) || !(blockAbove instanceof BlockAir) || blockBelow instanceof BlockSlab || (blockBelow instanceof BlockAir && blockBelow2 instanceof BlockAir))) {
|
||||
resetLowhop();
|
||||
}
|
||||
switch ((int) ModuleManager.bhop.mode.getInput()) {
|
||||
|
|
@ -368,6 +363,7 @@ public class ModuleUtils {
|
|||
switch (simpleY) {
|
||||
case 13:
|
||||
mc.thePlayer.motionY = mc.thePlayer.motionY - 0.02483;
|
||||
ModuleManager.bhop.lowhop = true;
|
||||
break;
|
||||
case 2000:
|
||||
mc.thePlayer.motionY = mc.thePlayer.motionY - 0.1913;
|
||||
|
|
@ -376,20 +372,20 @@ public class ModuleUtils {
|
|||
mc.thePlayer.motionY = mc.thePlayer.motionY + 0.08;
|
||||
break;
|
||||
}
|
||||
if (ModuleUtils.inAirTicks > 6 && Utils.isMoving()) {
|
||||
if (ModuleUtils.inAirTicks >= 7 && Utils.isMoving()) {
|
||||
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer));
|
||||
}
|
||||
if (ModuleUtils.inAirTicks > 8) {
|
||||
if (ModuleUtils.inAirTicks >= 9) {
|
||||
resetLowhop();
|
||||
}
|
||||
break;
|
||||
case 3: // 8 tick
|
||||
switch (simpleY) {
|
||||
case 13:
|
||||
mc.thePlayer.motionY = mc.thePlayer.motionY - 0.045;//0.02483;
|
||||
mc.thePlayer.motionY = mc.thePlayer.motionY - 0.02483;
|
||||
break;
|
||||
case 2000:
|
||||
mc.thePlayer.motionY = mc.thePlayer.motionY - 0.175;//0.1913;
|
||||
mc.thePlayer.motionY = mc.thePlayer.motionY - 0.1913;
|
||||
resetLowhop();
|
||||
break;
|
||||
}
|
||||
|
|
@ -398,6 +394,7 @@ public class ModuleUtils {
|
|||
switch (simpleY) {
|
||||
case 4200:
|
||||
mc.thePlayer.motionY = 0.39;
|
||||
ModuleManager.bhop.lowhop = true;
|
||||
break;
|
||||
case 1138:
|
||||
mc.thePlayer.motionY = mc.thePlayer.motionY - 0.13;
|
||||
|
|
@ -436,7 +433,7 @@ public class ModuleUtils {
|
|||
}
|
||||
|
||||
if ((canSlow || ModuleManager.scaffold.moduleEnabled && !ModuleManager.tower.canTower()) && !mc.thePlayer.onGround) {
|
||||
double motionVal = 0.9 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006);
|
||||
double motionVal = 0.92 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006);
|
||||
if (mc.thePlayer.hurtTime == 0 && inAirTicks > 4 && !setSlow) {
|
||||
mc.thePlayer.motionX *= motionVal;
|
||||
mc.thePlayer.motionZ *= motionVal;
|
||||
|
|
@ -457,6 +454,7 @@ public class ModuleUtils {
|
|||
ModuleManager.bhop.lowhop = ModuleManager.scaffold.lowhop = false;
|
||||
ModuleManager.bhop.didMove = false;
|
||||
lowhopAir = false;
|
||||
edgeTick = 0;
|
||||
}
|
||||
|
||||
public static void handleSlow() {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,13 @@ public class RotationUtils {
|
|||
public static float[] serverRotations = new float[] { 0, 0 } ;
|
||||
public static final float PI = (float) Math.PI;
|
||||
public static final float TO_DEGREES = 180.0F / PI;
|
||||
public static Float[] fakeRotations;
|
||||
public static boolean setFakeRotations;
|
||||
|
||||
public static void setFakeRotations(float yaw, float pitch) {
|
||||
fakeRotations = new Float[] { yaw, pitch };
|
||||
setFakeRotations = true;
|
||||
}
|
||||
|
||||
public static void setRenderYaw(float yaw) {
|
||||
mc.thePlayer.rotationYawHead = yaw;
|
||||
|
|
|
|||
|
|
@ -709,6 +709,51 @@ public class Utils {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public static int getLobbyStatus() {
|
||||
if (!Utils.nullCheck()) {
|
||||
return -1;
|
||||
}
|
||||
final Scoreboard scoreboard = mc.theWorld.getScoreboard();
|
||||
if (scoreboard == null) {
|
||||
return -1;
|
||||
}
|
||||
final ScoreObjective objective = scoreboard.getObjectiveInDisplaySlot(1);
|
||||
if (objective == null) {
|
||||
return -1;
|
||||
}
|
||||
for (String line : getSidebarLines()) {
|
||||
line = stripString(line);
|
||||
String[] parts = line.split(" ");
|
||||
if (parts.length > 1) {
|
||||
if (parts[1].startsWith("L")) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int hypixelStatus() {
|
||||
if (!Utils.nullCheck()) {
|
||||
return -1;
|
||||
}
|
||||
final Scoreboard scoreboard = mc.theWorld.getScoreboard();
|
||||
if (scoreboard == null) {
|
||||
return -1;
|
||||
}
|
||||
final ScoreObjective objective = scoreboard.getObjectiveInDisplaySlot(1);
|
||||
if (objective == null) {
|
||||
return -1;
|
||||
}
|
||||
for (String line : getSidebarLines()) {
|
||||
line = stripString(line);
|
||||
if (line.startsWith("0") || line.startsWith("1")) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static boolean skywarsQueue() {
|
||||
if (!Utils.nullCheck()) {
|
||||
return false;
|
||||
|
|
@ -719,7 +764,6 @@ public class Utils {
|
|||
}
|
||||
final ScoreObjective objective = scoreboard.getObjectiveInDisplaySlot(1);
|
||||
if (stripString(objective.getDisplayName()).contains("SKYWARS")) {
|
||||
Utils.print("Skywars");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1054,6 +1098,10 @@ public class Utils {
|
|||
return ((IAccessorEntityPlayerSP) mc.thePlayer).getLastReportedYaw();
|
||||
}
|
||||
|
||||
public static float getLastReportedPitch() {
|
||||
return ((IAccessorEntityPlayerSP) mc.thePlayer).getLastReportedPitch();
|
||||
}
|
||||
|
||||
public static boolean lookingAtBlock() {
|
||||
return mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && mc.objectMouseOver.getBlockPos() != null;
|
||||
}
|
||||
|
|
@ -1491,12 +1539,12 @@ public class Utils {
|
|||
if (ModuleManager.scaffold.isEnabled && ModuleManager.scaffold.autoSwap.isToggled() && ModuleManager.autoSwap.spoofItem.isToggled()) {
|
||||
return mc.thePlayer.inventory.getStackInSlot(ModuleManager.scaffold.lastSlot.get() == -1 ? mc.thePlayer.inventory.currentItem : ModuleManager.scaffold.lastSlot.get());
|
||||
}
|
||||
if (ModuleManager.LongJump.lastSlot != -1 && ModuleManager.LongJump.spoofItem.isToggled()) {
|
||||
return mc.thePlayer.inventory.getStackInSlot(ModuleManager.LongJump.spoofSlot == -1 ? mc.thePlayer.inventory.currentItem : ModuleManager.LongJump.spoofSlot);
|
||||
}
|
||||
if (ModuleManager.autoTool.isEnabled() && ModuleManager.autoTool.spoofItem.isToggled()) {
|
||||
return mc.thePlayer.inventory.getStackInSlot(ModuleManager.autoTool.previousSlot == -1 ? mc.thePlayer.inventory.currentItem : ModuleManager.autoTool.previousSlot);
|
||||
}
|
||||
if (ModuleManager.LongJump.isEnabled() && ModuleManager.LongJump.spoofItem.isToggled()) {
|
||||
return mc.thePlayer.inventory.getStackInSlot(ModuleManager.LongJump.lastSlot == -1 ? mc.thePlayer.inventory.currentItem : ModuleManager.LongJump.lastSlot);
|
||||
}
|
||||
return original;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue