This commit is contained in:
parent
7340d2207b
commit
62817f7f5f
|
|
@ -57,7 +57,7 @@ public class BindComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onClick(int x, int y, int button) {
|
public boolean onClick(int x, int y, int button) {
|
||||||
if (this.overSetting(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled() && this.visible && (this.keySetting == null || this.keySetting.visible)) {
|
if (this.overSetting(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled() && this.moduleComponent.isVisible(this)) {
|
||||||
if (button == 0) {
|
if (button == 0) {
|
||||||
this.isBinding = !this.isBinding;
|
this.isBinding = !this.isBinding;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public class ButtonComponent extends Component {
|
||||||
private final int enabledColor = (new Color(20, 255, 0)).getRGB();
|
private final int enabledColor = (new Color(20, 255, 0)).getRGB();
|
||||||
private Module mod;
|
private Module mod;
|
||||||
public ButtonSetting buttonSetting;
|
public ButtonSetting buttonSetting;
|
||||||
private ModuleComponent p;
|
private ModuleComponent moduleComponent;
|
||||||
public int o;
|
public int o;
|
||||||
public int x;
|
public int x;
|
||||||
private int y;
|
private int y;
|
||||||
|
|
@ -24,7 +24,7 @@ public class ButtonComponent extends Component {
|
||||||
public ButtonComponent(Module mod, ButtonSetting op, ModuleComponent b, int o) {
|
public ButtonComponent(Module mod, ButtonSetting op, ModuleComponent b, int o) {
|
||||||
this.mod = mod;
|
this.mod = mod;
|
||||||
this.buttonSetting = op;
|
this.buttonSetting = op;
|
||||||
this.p = b;
|
this.moduleComponent = b;
|
||||||
this.x = b.categoryComponent.getX() + b.categoryComponent.getWidth();
|
this.x = b.categoryComponent.getX() + b.categoryComponent.getWidth();
|
||||||
this.y = b.categoryComponent.getY() + b.yPos;
|
this.y = b.categoryComponent.getY() + b.yPos;
|
||||||
this.o = o;
|
this.o = o;
|
||||||
|
|
@ -33,7 +33,7 @@ public class ButtonComponent extends Component {
|
||||||
public void render() {
|
public void render() {
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawString((this.buttonSetting.isMethodButton ? "[=] " : (this.buttonSetting.isToggled() ? "[+] " : "[-] ")) + this.buttonSetting.getName(), (float) ((this.p.categoryComponent.getX() + 4) * 2) + xOffset, (float) ((this.p.categoryComponent.getY() + this.o + 4) * 2), this.buttonSetting.isToggled() ? this.enabledColor : -1, false);
|
Minecraft.getMinecraft().fontRendererObj.drawString((this.buttonSetting.isMethodButton ? "[=] " : (this.buttonSetting.isToggled() ? "[+] " : "[-] ")) + this.buttonSetting.getName(), (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2) + xOffset, (float) ((this.moduleComponent.categoryComponent.getY() + this.o + 4) * 2), this.buttonSetting.isToggled() ? this.enabledColor : -1, false);
|
||||||
GL11.glScaled(1, 1, 1);
|
GL11.glScaled(1, 1, 1);
|
||||||
if (renderLine) {
|
if (renderLine) {
|
||||||
//RenderUtils.drawRectangleGL((float) ((this.p.categoryComponent.getX() + 4) * 2), (float) ((this.p.categoryComponent.getY() + this.o) * 2), (float) ((this.p.categoryComponent.getX() + 4) * 2) + 1, (float) ((this.p.categoryComponent.getY() + this.o + 4) * 2) + 16, new Color(192, 192, 192).getRGB());
|
//RenderUtils.drawRectangleGL((float) ((this.p.categoryComponent.getX() + 4) * 2), (float) ((this.p.categoryComponent.getY() + this.o) * 2), (float) ((this.p.categoryComponent.getX() + 4) * 2) + 1, (float) ((this.p.categoryComponent.getY() + this.o + 4) * 2) + 16, new Color(192, 192, 192).getRGB());
|
||||||
|
|
@ -46,12 +46,12 @@ public class ButtonComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawScreen(int x, int y) {
|
public void drawScreen(int x, int y) {
|
||||||
this.y = this.p.categoryComponent.getModuleY() + this.o;
|
this.y = this.moduleComponent.categoryComponent.getModuleY() + this.o;
|
||||||
this.x = this.p.categoryComponent.getX();
|
this.x = this.moduleComponent.categoryComponent.getX();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onClick(int x, int y, int b) {
|
public boolean onClick(int x, int y, int b) {
|
||||||
if (this.i(x, y) && b == 0 && this.p.isOpened && this.visible && this.buttonSetting.visible) {
|
if (this.i(x, y) && b == 0 && this.moduleComponent.isOpened && this.moduleComponent.isVisible(this)) {
|
||||||
if (this.buttonSetting.isMethodButton) {
|
if (this.buttonSetting.isMethodButton) {
|
||||||
this.buttonSetting.runMethod();
|
this.buttonSetting.runMethod();
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -66,6 +66,6 @@ public class ButtonComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean i(int x, int y) {
|
public boolean i(int x, int y) {
|
||||||
return x > this.x && x < this.x + this.p.categoryComponent.getWidth() && y > this.y && y < this.y + 11;
|
return x > this.x && x < this.x + this.moduleComponent.categoryComponent.getWidth() && y > this.y && y < this.y + 11;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +146,7 @@ public class SliderComponent extends Component {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(int mouseX, int mouseY, int button) {
|
public boolean onClick(int mouseX, int mouseY, int button) {
|
||||||
if ((u(mouseX, mouseY) || i(mouseX, mouseY)) && button == 0 && this.moduleComponent.isOpened && this.visible && this.sliderSetting.visible) {
|
if ((u(mouseX, mouseY) || i(mouseX, mouseY)) && button == 0 && this.moduleComponent.isOpened && this.moduleComponent.isVisible(this)) {
|
||||||
this.heldDown = true;
|
this.heldDown = true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -966,7 +966,7 @@ public class KillAura extends Module {
|
||||||
if (interactTicks == 0) {
|
if (interactTicks == 0) {
|
||||||
firstEdge++;
|
firstEdge++;
|
||||||
}
|
}
|
||||||
if (firstEdge > 6) {
|
if (firstEdge > 8) {
|
||||||
firstEdge = 0;
|
firstEdge = 0;
|
||||||
}
|
}
|
||||||
interactTicks++;
|
interactTicks++;
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ public class LongJump extends Module {
|
||||||
disabled();
|
disabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spoofItem.isToggled() && lastSlot != -1) {
|
if (spoofItem.isToggled() && lastSlot != -1 && !manual.isToggled()) {
|
||||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
|
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
|
||||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
|
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
|
||||||
}
|
}
|
||||||
|
|
@ -278,15 +278,14 @@ public class LongJump extends Module {
|
||||||
fireballTime = System.currentTimeMillis();
|
fireballTime = System.currentTimeMillis();
|
||||||
if (!manual.isToggled()) {
|
if (!manual.isToggled()) {
|
||||||
mc.getNetHandler().addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
|
mc.getNetHandler().addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
|
||||||
//((IAccessorMinecraft) mc).callRightClickMouse();
|
if (silentSwing.isToggled()) {
|
||||||
}
|
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
|
||||||
if (silentSwing.isToggled()) {
|
}
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
|
else {
|
||||||
}
|
mc.thePlayer.swingItem();
|
||||||
else {
|
if (!spoofItem.isToggled()) {
|
||||||
mc.thePlayer.swingItem();
|
mc.getItemRenderer().resetEquippedProgress();
|
||||||
if (!spoofItem.isToggled()) {
|
}
|
||||||
mc.getItemRenderer().resetEquippedProgress();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stopVelocity = true;
|
stopVelocity = true;
|
||||||
|
|
@ -431,7 +430,7 @@ public class LongJump extends Module {
|
||||||
void modifyHorizontal() {
|
void modifyHorizontal() {
|
||||||
if (boostSetting.getInput() != 0) {
|
if (boostSetting.getInput() != 0) {
|
||||||
|
|
||||||
double speed = ((boostSetting.getInput() > 1.6 && ModuleManager.scaffold.isEnabled) ? 1.6 : boostSetting.getInput()) - Utils.randomizeDouble(0.0001, 0);
|
double speed = boostSetting.getInput() - Utils.randomizeDouble(0.0001, 0);
|
||||||
if (Utils.isMoving()) {
|
if (Utils.isMoving()) {
|
||||||
Utils.setSpeed(speed);
|
Utils.setSpeed(speed);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -214,8 +214,10 @@ public class NoSlow extends Module {
|
||||||
offset = false;
|
offset = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
|
if (mc.thePlayer.ticksExisted % 2 == 0 || mc.thePlayer.onGround) {
|
||||||
offset = true;
|
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
|
||||||
|
offset = true;
|
||||||
|
}
|
||||||
if (groundSpeedOption.isToggled()) {
|
if (groundSpeedOption.isToggled()) {
|
||||||
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !Utils.jumpDown() && mc.thePlayer.moveForward <= -0.5 && mc.thePlayer.moveStrafing == 0 && offset && Utils.isMoving() && mc.thePlayer.onGround) {
|
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !Utils.jumpDown() && mc.thePlayer.moveForward <= -0.5 && mc.thePlayer.moveStrafing == 0 && offset && Utils.isMoving() && mc.thePlayer.onGround) {
|
||||||
float yaw = mc.thePlayer.rotationYaw;
|
float yaw = mc.thePlayer.rotationYaw;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package keystrokesmod.module.impl.player;
|
package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
|
import keystrokesmod.Raven;
|
||||||
import keystrokesmod.mixin.interfaces.IMixinItemRenderer;
|
import keystrokesmod.mixin.interfaces.IMixinItemRenderer;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
|
@ -11,43 +12,55 @@ import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
public class AutoTool extends Module {
|
public class AutoTool extends Module {
|
||||||
private SliderSetting hoverDelay;
|
private SliderSetting hoverDelay;
|
||||||
|
private SliderSetting swapDelay;
|
||||||
|
|
||||||
private ButtonSetting rightDisable;
|
private ButtonSetting rightDisable;
|
||||||
private ButtonSetting requireCrouch;
|
private ButtonSetting requireCrouch;
|
||||||
private ButtonSetting requireMouse;
|
private ButtonSetting requireMouse;
|
||||||
public ButtonSetting spoofItem;
|
public ButtonSetting spoofItem;
|
||||||
private ButtonSetting swap;
|
private ButtonSetting swapBack;
|
||||||
|
|
||||||
|
private boolean hasSwapped = false;
|
||||||
|
private int swapDelayTick = 0;
|
||||||
public int previousSlot = -1;
|
public int previousSlot = -1;
|
||||||
private long ticksHovered;
|
private long ticksHovered;
|
||||||
|
|
||||||
public AutoTool() {
|
public AutoTool() {
|
||||||
super("AutoTool", category.player);
|
super("AutoTool", category.player);
|
||||||
this.registerSetting(hoverDelay = new SliderSetting("Hover delay", 0.0, 0.0, 20.0, 1.0));
|
this.registerSetting(hoverDelay = new SliderSetting("Hover delay", 0.0, 0.0, 20.0, 1.0));
|
||||||
|
this.registerSetting(swapDelay = new SliderSetting("Swap delay", 0, 0, 20, 1));
|
||||||
this.registerSetting(rightDisable = new ButtonSetting("Disable while right click", true));
|
this.registerSetting(rightDisable = new ButtonSetting("Disable while right click", true));
|
||||||
this.registerSetting(requireCrouch = new ButtonSetting("Only while crouching", false));
|
this.registerSetting(requireCrouch = new ButtonSetting("Only while crouching", false));
|
||||||
this.registerSetting(requireMouse = new ButtonSetting("Require mouse down", true));
|
this.registerSetting(requireMouse = new ButtonSetting("Require mouse down", true));
|
||||||
this.registerSetting(spoofItem = new ButtonSetting("Spoof item", false));
|
this.registerSetting(spoofItem = new ButtonSetting("Spoof item", false));
|
||||||
this.registerSetting(swap = new ButtonSetting("Swap to previous slot", true));
|
this.registerSetting(swapBack = new ButtonSetting("Swap to previous slot", true));
|
||||||
this.closetModule = true;
|
this.closetModule = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
resetVariables();
|
resetVariables(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSlot(final int currentItem) {
|
public void setSlot(int currentItem) {
|
||||||
if (currentItem == -1) {
|
if (currentItem == -1 || currentItem == mc.thePlayer.inventory.currentItem) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mc.thePlayer.inventory.currentItem = currentItem;
|
mc.thePlayer.inventory.currentItem = currentItem;
|
||||||
|
hasSwapped = true;
|
||||||
|
swapDelayTick = (int) swapDelay.getInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onUpdate() {
|
public void onUpdate() {
|
||||||
if (spoofItem.isToggled() && previousSlot != mc.thePlayer.inventory.currentItem && previousSlot != -1) {
|
if (spoofItem.isToggled() && previousSlot != mc.thePlayer.inventory.currentItem && previousSlot != -1) {
|
||||||
|
if (Raven.debug) {
|
||||||
|
Utils.sendModuleMessage(this, "&7Modifying held item renderer");
|
||||||
|
}
|
||||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
|
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
|
||||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
|
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
|
||||||
}
|
}
|
||||||
if (!mc.inGameHasFocus || mc.currentScreen != null || (rightDisable.isToggled() && Mouse.isButtonDown(1)) || !mc.thePlayer.capabilities.allowEdit || (requireCrouch.isToggled() && !mc.thePlayer.isSneaking())) {
|
if (!mc.inGameHasFocus || mc.currentScreen != null || (rightDisable.isToggled() && Mouse.isButtonDown(1)) || !mc.thePlayer.capabilities.allowEdit || (requireCrouch.isToggled() && !mc.thePlayer.isSneaking())) {
|
||||||
resetVariables();
|
resetVariables(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Mouse.isButtonDown(0) && requireMouse.isToggled()) {
|
if (!Mouse.isButtonDown(0) && requireMouse.isToggled()) {
|
||||||
|
|
@ -57,7 +70,7 @@ public class AutoTool extends Module {
|
||||||
MovingObjectPosition over = mc.objectMouseOver;
|
MovingObjectPosition over = mc.objectMouseOver;
|
||||||
if (over == null || over.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK) {
|
if (over == null || over.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||||
resetSlot();
|
resetSlot();
|
||||||
resetVariables();
|
resetVariables(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hoverDelay.getInput() != 0) {
|
if (hoverDelay.getInput() != 0) {
|
||||||
|
|
@ -74,20 +87,36 @@ public class AutoTool extends Module {
|
||||||
if (previousSlot == -1) {
|
if (previousSlot == -1) {
|
||||||
previousSlot = mc.thePlayer.inventory.currentItem;
|
previousSlot = mc.thePlayer.inventory.currentItem;
|
||||||
}
|
}
|
||||||
setSlot(slot);
|
if (!hasSwapped) {
|
||||||
|
setSlot(slot);
|
||||||
|
}
|
||||||
|
else if (slot != mc.thePlayer.inventory.currentItem) {
|
||||||
|
if (swapDelayTick-- <= 0) {
|
||||||
|
if (mc.thePlayer.inventory.currentItem != slot) {
|
||||||
|
setSlot(slot);
|
||||||
|
swapDelayTick = (int) swapDelay.getInput();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetVariables() {
|
private void resetVariables(boolean resetHover) {
|
||||||
ticksHovered = 0;
|
if (resetHover) {
|
||||||
|
ticksHovered = 0;
|
||||||
|
}
|
||||||
resetSlot();
|
resetSlot();
|
||||||
previousSlot = -1;
|
previousSlot = -1;
|
||||||
|
hasSwapped = false;
|
||||||
|
swapDelayTick = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetSlot() {
|
private void resetSlot() {
|
||||||
if (previousSlot == -1 || !swap.isToggled()) {
|
if (previousSlot == -1 || !swapBack.isToggled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSlot(previousSlot);
|
setSlot(previousSlot);
|
||||||
previousSlot = -1;
|
previousSlot = -1;
|
||||||
|
hasSwapped = false;
|
||||||
|
swapDelayTick = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,11 +171,12 @@ public class BedAura extends Module {
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
aiming = false;
|
aiming = false;
|
||||||
|
if (currentBlock != null && !RotationUtils.inRange(currentBlock, range.getInput())) {
|
||||||
|
stopAutoblock = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((rotate || breakProgress >= 1 || breakProgress == 0) && (currentBlock != null || rotateLastBlock != null)) {
|
if ((rotate || breakProgress >= 1 || breakProgress == 0) && (currentBlock != null || rotateLastBlock != null)) {
|
||||||
float[] rotations = RotationUtils.getRotations(currentBlock == null ? rotateLastBlock : currentBlock, e.getYaw(), e.getPitch());
|
float[] rotations = RotationUtils.getRotations(currentBlock == null ? rotateLastBlock : currentBlock, e.getYaw(), e.getPitch());
|
||||||
if (currentBlock != null && !RotationUtils.inRange(currentBlock, range.getInput())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
e.setYaw(RotationUtils.applyVanilla(rotations[0]));
|
e.setYaw(RotationUtils.applyVanilla(rotations[0]));
|
||||||
e.setPitch(rotations[1]);
|
e.setPitch(rotations[1]);
|
||||||
if (Raven.debug) {
|
if (Raven.debug) {
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ public class Safewalk extends Module {
|
||||||
}
|
}
|
||||||
canSneak = sneakState;
|
canSneak = sneakState;
|
||||||
mc.thePlayer.movementInput.sneak = sneakState;
|
mc.thePlayer.movementInput.sneak = sneakState;
|
||||||
|
mc.thePlayer.setSneaking(sneakState);
|
||||||
this.isSneaking = sneakState;
|
this.isSneaking = sneakState;
|
||||||
//Utils.print("Edge " + mc.thePlayer.movementInput.sneak + " " + sneakState + " " + mc.thePlayer.ticksExisted);
|
//Utils.print("Edge " + mc.thePlayer.movementInput.sneak + " " + sneakState + " " + mc.thePlayer.ticksExisted);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.impl.movement.Bhop;
|
import keystrokesmod.module.impl.movement.Bhop;
|
||||||
import keystrokesmod.module.impl.movement.LongJump;
|
import keystrokesmod.module.impl.movement.LongJump;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
import keystrokesmod.module.setting.impl.GroupSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.*;
|
import keystrokesmod.utility.*;
|
||||||
import keystrokesmod.utility.Timer;
|
import keystrokesmod.utility.Timer;
|
||||||
|
|
@ -42,6 +43,9 @@ public class Scaffold extends Module {
|
||||||
private SliderSetting floatFirstJump;
|
private SliderSetting floatFirstJump;
|
||||||
private SliderSetting fastScaffold;
|
private SliderSetting fastScaffold;
|
||||||
private SliderSetting multiPlace;
|
private SliderSetting multiPlace;
|
||||||
|
private GroupSetting multiPlaceSettings;
|
||||||
|
final private ButtonSetting mAlways, mSprint, mSprintWithSpeed, mKeepY, mKeepYWithSpeed, mTowerMove, mVerticalTower;
|
||||||
|
|
||||||
public ButtonSetting autoSwap;
|
public ButtonSetting autoSwap;
|
||||||
private ButtonSetting fastOnRMB;
|
private ButtonSetting fastOnRMB;
|
||||||
public ButtonSetting highlightBlocks;
|
public ButtonSetting highlightBlocks;
|
||||||
|
|
@ -124,7 +128,17 @@ public class Scaffold extends Module {
|
||||||
this.registerSetting(sprint = new SliderSetting("Sprint mode", 0, sprintModes));
|
this.registerSetting(sprint = new SliderSetting("Sprint mode", 0, sprintModes));
|
||||||
this.registerSetting(floatFirstJump = new SliderSetting("§eFloat §rfirst jump speed", "%", 100, 50, 100, 1));
|
this.registerSetting(floatFirstJump = new SliderSetting("§eFloat §rfirst jump speed", "%", 100, 50, 100, 1));
|
||||||
this.registerSetting(fastScaffold = new SliderSetting("Fast scaffold", 0, fastScaffoldModes));
|
this.registerSetting(fastScaffold = new SliderSetting("Fast scaffold", 0, fastScaffoldModes));
|
||||||
|
|
||||||
this.registerSetting(multiPlace = new SliderSetting("Multi-place", 0, multiPlaceModes));
|
this.registerSetting(multiPlace = new SliderSetting("Multi-place", 0, multiPlaceModes));
|
||||||
|
this.registerSetting(multiPlaceSettings = new GroupSetting("Multi-place settings"));
|
||||||
|
this.registerSetting(mAlways = new ButtonSetting(multiPlaceSettings, "Always", false));
|
||||||
|
this.registerSetting(mSprint = new ButtonSetting(multiPlaceSettings, "Sprint scaffold", false));
|
||||||
|
this.registerSetting(mSprintWithSpeed = new ButtonSetting(multiPlaceSettings, "Sprint scaffold with speed", false));
|
||||||
|
this.registerSetting(mKeepY = new ButtonSetting(multiPlaceSettings, "Keep-Y", false));
|
||||||
|
this.registerSetting(mKeepYWithSpeed = new ButtonSetting(multiPlaceSettings, "Keep-Y with speed", false));
|
||||||
|
this.registerSetting(mTowerMove = new ButtonSetting(multiPlaceSettings, "Tower move", false));
|
||||||
|
this.registerSetting(mVerticalTower = new ButtonSetting(multiPlaceSettings, "Vertical tower", false));
|
||||||
|
|
||||||
this.registerSetting(autoSwap = new ButtonSetting("Auto swap", true));
|
this.registerSetting(autoSwap = new ButtonSetting("Auto swap", true));
|
||||||
this.registerSetting(fastOnRMB = new ButtonSetting("Fast on RMB", true));
|
this.registerSetting(fastOnRMB = new ButtonSetting("Fast on RMB", true));
|
||||||
this.registerSetting(highlightBlocks = new ButtonSetting("Highlight blocks", true));
|
this.registerSetting(highlightBlocks = new ButtonSetting("Highlight blocks", true));
|
||||||
|
|
@ -141,6 +155,7 @@ public class Scaffold extends Module {
|
||||||
|
|
||||||
public void guiUpdate() {
|
public void guiUpdate() {
|
||||||
this.floatFirstJump.setVisible(sprint.getInput() == 2, this);
|
this.floatFirstJump.setVisible(sprint.getInput() == 2, this);
|
||||||
|
this.multiPlaceSettings.setVisible(multiPlace.getInput() > 0, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
|
|
@ -217,7 +232,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Float
|
//Float
|
||||||
if (sprint.getInput() == 2 && !usingFastScaffold() && !fastScaffoldKeepY && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.function) {
|
if (sprint.getInput() == 2 && !usingFastScaffold() && !fastScaffoldKeepY && !ModuleManager.tower.canTower() && !LongJump.function) {
|
||||||
floatWasEnabled = true;
|
floatWasEnabled = true;
|
||||||
if (!floatStarted) {
|
if (!floatStarted) {
|
||||||
if (ModuleUtils.groundTicks > 8 && mc.thePlayer.onGround) {
|
if (ModuleUtils.groundTicks > 8 && mc.thePlayer.onGround) {
|
||||||
|
|
@ -283,37 +298,37 @@ public class Scaffold extends Module {
|
||||||
if (quad <= 5 || quad >= 85) {
|
if (quad <= 5 || quad >= 85) {
|
||||||
yawAngle = 126.50F;
|
yawAngle = 126.50F;
|
||||||
minOffset = 13;
|
minOffset = 13;
|
||||||
minPitch = 77.08F;
|
minPitch = 71.08F;
|
||||||
}
|
}
|
||||||
if (quad > 5 && quad <= 15 || quad >= 75 && quad < 85) {
|
if (quad > 5 && quad <= 15 || quad >= 75 && quad < 85) {
|
||||||
yawAngle = 127.50F;
|
yawAngle = 127.50F;
|
||||||
minOffset = 10;
|
minOffset = 10;
|
||||||
minPitch = 77.34F;
|
minPitch = 72.34F;
|
||||||
}
|
}
|
||||||
if (quad > 15 && quad <= 25 || quad >= 65 && quad < 75) {
|
if (quad > 15 && quad <= 25 || quad >= 65 && quad < 75) {
|
||||||
yawAngle = 128.50F;
|
yawAngle = 128.50F;
|
||||||
minOffset = 7;
|
minOffset = 7;
|
||||||
minPitch = 77.65F;
|
minPitch = 73.65F;
|
||||||
}
|
}
|
||||||
if (quad > 25 && quad <= 32 || quad >= 58 && quad < 65) {
|
if (quad > 25 && quad <= 32 || quad >= 58 && quad < 65) {
|
||||||
yawAngle = 130F;
|
yawAngle = 130F;
|
||||||
minOffset = 6;
|
minOffset = 6;
|
||||||
minPitch = 78.13F;
|
minPitch = 74.13F;
|
||||||
}
|
}
|
||||||
if (quad > 32 && quad <= 38 || quad >= 52 && quad < 58) {
|
if (quad > 32 && quad <= 38 || quad >= 52 && quad < 58) {
|
||||||
yawAngle = 131.50F;
|
yawAngle = 131.50F;
|
||||||
minOffset = 4;
|
minOffset = 4;
|
||||||
minPitch = 78.41F;
|
minPitch = 75.41F;
|
||||||
}
|
}
|
||||||
if (quad > 38 && quad <= 42 || quad >= 48 && quad < 52) {
|
if (quad > 38 && quad <= 42 || quad >= 48 && quad < 52) {
|
||||||
yawAngle = 133.50F;
|
yawAngle = 133.50F;
|
||||||
minOffset = 2;
|
minOffset = 2;
|
||||||
minPitch = 79.54F;
|
minPitch = 76.54F;
|
||||||
}
|
}
|
||||||
if (quad > 42 && quad <= 45 || quad >= 45 && quad < 48) {
|
if (quad > 42 && quad <= 45 || quad >= 45 && quad < 48) {
|
||||||
yawAngle = 137F;
|
yawAngle = 137F;
|
||||||
minOffset = 1;
|
minOffset = 1;
|
||||||
minPitch = 79.93F;
|
minPitch = 77.43F;
|
||||||
}
|
}
|
||||||
//Utils.print("" + minOffset);
|
//Utils.print("" + minOffset);
|
||||||
//float offsetAmountD = ((((float) offsetAmount.getInput() / 10) - 10) * -2) - (((float) offsetAmount.getInput() / 10) - 10);
|
//float offsetAmountD = ((((float) offsetAmount.getInput() / 10) - 10) * -2) - (((float) offsetAmount.getInput() / 10) - 10);
|
||||||
|
|
@ -333,7 +348,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||||
scaffoldPitch = 77f;
|
scaffoldPitch = 78f;
|
||||||
}
|
}
|
||||||
e.setRotations(scaffoldYaw, scaffoldPitch);
|
e.setRotations(scaffoldYaw, scaffoldPitch);
|
||||||
break;
|
break;
|
||||||
|
|
@ -395,7 +410,6 @@ public class Scaffold extends Module {
|
||||||
was451 = false;
|
was451 = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double minSwitch = (!Utils.scaffoldDiagonal(false)) ? 9 : 15;
|
double minSwitch = (!Utils.scaffoldDiagonal(false)) ? 9 : 15;
|
||||||
if (side >= 0) {
|
if (side >= 0) {
|
||||||
if (yawOffset <= -minSwitch && firstStroke == 0) {
|
if (yawOffset <= -minSwitch && firstStroke == 0) {
|
||||||
|
|
@ -558,11 +572,14 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
public void onPostPlayerInput(PostPlayerInputEvent e) {
|
public void onMoveInput(PrePlayerInputEvent e) {
|
||||||
if (!ModuleManager.scaffold.isEnabled) {
|
if (!ModuleManager.scaffold.isEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (fastScaffold.getInput() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
mc.thePlayer.movementInput.jump = false;
|
mc.thePlayer.movementInput.jump = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -741,7 +758,7 @@ public class Scaffold extends Module {
|
||||||
|
|
||||||
private int handleFastScaffolds() {
|
private int handleFastScaffolds() {
|
||||||
if (fastOnRMB.isToggled()) {
|
if (fastOnRMB.isToggled()) {
|
||||||
return Mouse.isButtonDown(1) && Utils.tabbedIn() ? (int) fastScaffold.getInput() : (int) sprint.getInput();
|
return fastScaffold.getInput() > 0 && Mouse.isButtonDown(1) && Utils.tabbedIn() ? (int) fastScaffold.getInput() : (int) sprint.getInput();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return fastScaffold.getInput() > 0 ? (int) fastScaffold.getInput() : (int) sprint.getInput();
|
return fastScaffold.getInput() > 0 ? (int) fastScaffold.getInput() : (int) sprint.getInput();
|
||||||
|
|
@ -814,11 +831,10 @@ public class Scaffold extends Module {
|
||||||
private void placeBlock(int yOffset, int xOffset) {
|
private void placeBlock(int yOffset, int xOffset) {
|
||||||
locateAndPlaceBlock(yOffset, xOffset);
|
locateAndPlaceBlock(yOffset, xOffset);
|
||||||
int input = (int) multiPlace.getInput();
|
int input = (int) multiPlace.getInput();
|
||||||
if (sprint.getInput() == 0 && mc.thePlayer.onGround && !ModuleManager.tower.canTower() && !usingFastScaffold()) {
|
if (!mAlways.isToggled()) {
|
||||||
return;
|
if (!handleMultiPlaceSettings()) {
|
||||||
}
|
return;
|
||||||
if (ModuleManager.tower.canTower() && !ModuleManager.tower.tower) {
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (input >= 1) {
|
if (input >= 1) {
|
||||||
locateAndPlaceBlock(yOffset, xOffset);
|
locateAndPlaceBlock(yOffset, xOffset);
|
||||||
|
|
@ -828,6 +844,28 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean handleMultiPlaceSettings() {
|
||||||
|
if (mTowerMove.isToggled() && ModuleManager.tower.towerMove.getInput() != 0 && (ModuleManager.tower.canTower() && Utils.keysDown() && ModuleManager.tower.towering || ModuleManager.tower.finishedTower)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (mVerticalTower.isToggled() && ModuleManager.tower.verticalTower.getInput() != 0 && ModuleManager.tower.canTower() && !Utils.keysDown()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (mSprint.isToggled() && sprint.getInput() != 0 && !usingFastScaffold() && !ModuleManager.tower.canTower()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (mSprintWithSpeed.isToggled() && sprint.getInput() != 0 && !usingFastScaffold() && getSpeedLevel() > 0 && !ModuleManager.tower.canTower()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (mKeepY.isToggled() && fastScaffold.getInput() != 0 && usingFastScaffold() && !ModuleManager.tower.canTower()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (mKeepYWithSpeed.isToggled() && fastScaffold.getInput() != 0 && usingFastScaffold() && getSpeedLevel() > 0 && !ModuleManager.tower.canTower()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private void locateAndPlaceBlock(int yOffset, int xOffset) {
|
private void locateAndPlaceBlock(int yOffset, int xOffset) {
|
||||||
locateBlocks(yOffset, xOffset);
|
locateBlocks(yOffset, xOffset);
|
||||||
if (blockInfo == null) {
|
if (blockInfo == null) {
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,13 @@ import net.minecraft.network.play.client.*;
|
||||||
import net.minecraft.network.play.server.S12PacketEntityVelocity;
|
import net.minecraft.network.play.server.S12PacketEntityVelocity;
|
||||||
import net.minecraft.network.play.server.S27PacketExplosion;
|
import net.minecraft.network.play.server.S27PacketExplosion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
public class Tower extends Module {
|
public class Tower extends Module {
|
||||||
final private SliderSetting towerMove;
|
final public SliderSetting towerMove;
|
||||||
private SliderSetting speedSetting;
|
private SliderSetting speedSetting;
|
||||||
final private SliderSetting verticalTower;
|
final public SliderSetting verticalTower;
|
||||||
final private SliderSetting slowedSpeed;
|
final private SliderSetting slowedSpeed;
|
||||||
final private SliderSetting slowedTicks;
|
final private SliderSetting slowedTicks;
|
||||||
final private ButtonSetting disableWhileHurt;
|
final private ButtonSetting disableWhileHurt;
|
||||||
|
|
@ -32,7 +33,7 @@ public class Tower extends Module {
|
||||||
private int slowTicks;
|
private int slowTicks;
|
||||||
private boolean wasTowering;
|
private boolean wasTowering;
|
||||||
private int towerTicks;
|
private int towerTicks;
|
||||||
public boolean tower;
|
public boolean towering;
|
||||||
private boolean hasTowered, startedTowerInAir, setLowMotion, firstJump;
|
private boolean hasTowered, startedTowerInAir, setLowMotion, firstJump;
|
||||||
private int cMotionTicks, placeTicks;
|
private int cMotionTicks, placeTicks;
|
||||||
public int dCount;
|
public int dCount;
|
||||||
|
|
@ -40,6 +41,8 @@ public class Tower extends Module {
|
||||||
|
|
||||||
public float pitch;
|
public float pitch;
|
||||||
|
|
||||||
|
public boolean finishedTower;
|
||||||
|
|
||||||
//vertical tower
|
//vertical tower
|
||||||
private boolean aligning, aligned, placed;
|
private boolean aligning, aligned, placed;
|
||||||
private int blockX;
|
private int blockX;
|
||||||
|
|
@ -97,7 +100,7 @@ public class Tower extends Module {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (tower) {
|
if (towering) {
|
||||||
if (towerTicks == 6) {
|
if (towerTicks == 6) {
|
||||||
e.setPosY(e.getPosY() + 0.000383527);
|
e.setPosY(e.getPosY() + 0.000383527);
|
||||||
ModuleManager.scaffold.rotateForward();
|
ModuleManager.scaffold.rotateForward();
|
||||||
|
|
@ -119,10 +122,11 @@ public class Tower extends Module {
|
||||||
int valY = (int) Math.round((mc.thePlayer.posY % 1) * 10000);
|
int valY = (int) Math.round((mc.thePlayer.posY % 1) * 10000);
|
||||||
int simpleY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D);
|
int simpleY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D);
|
||||||
if (canTower() && Utils.keysDown()) {
|
if (canTower() && Utils.keysDown()) {
|
||||||
wasTowering = true;
|
speed = false;
|
||||||
|
wasTowering = hasTowered = true;
|
||||||
if (disableWhileHurt.isToggled() && ModuleUtils.damage) {
|
if (disableWhileHurt.isToggled() && ModuleUtils.damage) {
|
||||||
towerTicks = 0;
|
towerTicks = 0;
|
||||||
tower = false;
|
towering = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch ((int) towerMove.getInput()) {
|
switch ((int) towerMove.getInput()) {
|
||||||
|
|
@ -162,10 +166,10 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (mc.thePlayer.posY % 1 == 0 && !setLowMotion) {
|
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround && !setLowMotion) {
|
||||||
tower = true;
|
towering = true;
|
||||||
}
|
}
|
||||||
if (tower) {
|
if (towering) {
|
||||||
if (valY == 0) {
|
if (valY == 0) {
|
||||||
mc.thePlayer.motionY = 0.42f;
|
mc.thePlayer.motionY = 0.42f;
|
||||||
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()));
|
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()));
|
||||||
|
|
@ -175,13 +179,11 @@ public class Tower extends Module {
|
||||||
mc.thePlayer.motionY = 0.33f;
|
mc.thePlayer.motionY = 0.33f;
|
||||||
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
|
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
|
||||||
speed = true;
|
speed = true;
|
||||||
hasTowered = true;
|
|
||||||
}
|
}
|
||||||
else if (valY > 7000) {
|
else if (valY > 7000) {
|
||||||
if (setLowMotion) {
|
if (setLowMotion) {
|
||||||
tower = false;
|
towering = false;
|
||||||
}
|
}
|
||||||
speed = false;
|
|
||||||
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
|
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -194,17 +196,16 @@ public class Tower extends Module {
|
||||||
else if (cMotionTicks == 4) {
|
else if (cMotionTicks == 4) {
|
||||||
cMotionTicks = 0;
|
cMotionTicks = 0;
|
||||||
setLowMotion = false;
|
setLowMotion = false;
|
||||||
tower = true;
|
towering = true;
|
||||||
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()) - 0.02);
|
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()) - 0.02);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
speed = false;
|
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
|
||||||
if (mc.thePlayer.posY % 1 == 0) {
|
towering = true;
|
||||||
tower = true;
|
|
||||||
}
|
}
|
||||||
if (tower) {
|
if (towering) {
|
||||||
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
||||||
switch (simpleY) {
|
switch (simpleY) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -227,11 +228,10 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
speed = false;
|
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
|
||||||
if (mc.thePlayer.posY % 1 == 0) {
|
towering = true;
|
||||||
tower = true;
|
|
||||||
}
|
}
|
||||||
if (tower) {
|
if (towering) {
|
||||||
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
||||||
switch (towerTicks) {
|
switch (towerTicks) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -264,14 +264,13 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
speed = false;
|
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
|
||||||
if (mc.thePlayer.onGround) {
|
|
||||||
grounds++;
|
grounds++;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.posY % 1 == 0) {
|
if (mc.thePlayer.posY % 1 == 0) {
|
||||||
tower = true;
|
towering = true;
|
||||||
}
|
}
|
||||||
if (tower) {
|
if (towering) {
|
||||||
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
|
||||||
switch (towerTicks) {
|
switch (towerTicks) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -295,6 +294,12 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (finishedTower) {
|
||||||
|
finishedTower = false;
|
||||||
|
}
|
||||||
|
if (hasTowered) {
|
||||||
|
finishedTower = true;
|
||||||
|
}
|
||||||
if (wasTowering && modulesEnabled()) {
|
if (wasTowering && modulesEnabled()) {
|
||||||
if (slowedTicks.getInput() > 0 && slowedTicks.getInput() != 100 && slowTicks++ < slowedTicks.getInput()) {
|
if (slowedTicks.getInput() > 0 && slowedTicks.getInput() != 100 && slowTicks++ < slowedTicks.getInput()) {
|
||||||
mc.thePlayer.motionX *= slowedSpeed.getInput() / 100;
|
mc.thePlayer.motionX *= slowedSpeed.getInput() / 100;
|
||||||
|
|
@ -314,10 +319,10 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
slowTicks = 0;
|
slowTicks = 0;
|
||||||
}
|
}
|
||||||
if (speed) {
|
if (speed || hasTowered && mc.thePlayer.onGround) {
|
||||||
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer) / 2);
|
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer) / 1.6);
|
||||||
}
|
}
|
||||||
hasTowered = tower = firstJump = startedTowerInAir = setLowMotion = speed = false;
|
hasTowered = towering = firstJump = startedTowerInAir = setLowMotion = speed = false;
|
||||||
cMotionTicks = placeTicks = towerTicks = grounds = 0;
|
cMotionTicks = placeTicks = towerTicks = grounds = 0;
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
@ -374,8 +379,8 @@ public class Tower extends Module {
|
||||||
return canTower() && !Utils.keysDown() && verticalTower.getInput() == 2;
|
return canTower() && !Utils.keysDown() && verticalTower.getInput() == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
public void onPostPlayerInput(PostPlayerInputEvent e) {
|
public void onMoveInput(PrePlayerInputEvent e) {
|
||||||
if (!ModuleManager.scaffold.isEnabled) {
|
if (!ModuleManager.scaffold.isEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -428,7 +433,7 @@ public class Tower extends Module {
|
||||||
|
|
||||||
private void reset() {
|
private void reset() {
|
||||||
towerTicks = 0;
|
towerTicks = 0;
|
||||||
tower = false;
|
towering = false;
|
||||||
placeTicks = 0;
|
placeTicks = 0;
|
||||||
setLowMotion = false;
|
setLowMotion = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,10 @@ public class ScriptDefaults {
|
||||||
Utils.sendRawMessage(s);
|
Utils.sendRawMessage(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void print(Message component) {
|
||||||
|
mc.thePlayer.addChatMessage(component.component);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isDiagonal() {
|
public static boolean isDiagonal() {
|
||||||
return Utils.isDiagonal(false);
|
return Utils.isDiagonal(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package keystrokesmod.script.classes;
|
||||||
|
|
||||||
|
import keystrokesmod.utility.Utils;
|
||||||
|
import net.minecraft.event.ClickEvent;
|
||||||
|
import net.minecraft.event.HoverEvent;
|
||||||
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.ChatStyle;
|
||||||
|
|
||||||
|
public class Message {
|
||||||
|
public ChatComponentText component;
|
||||||
|
|
||||||
|
public Message(String message) {
|
||||||
|
this.component = new ChatComponentText(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void appendStyle(String style, String action, String styleMessage, String message) {
|
||||||
|
ChatStyle chatStyle = new ChatStyle();
|
||||||
|
if (style.equals("HOVER")) {
|
||||||
|
chatStyle.setChatHoverEvent(new HoverEvent(Utils.getEnum(HoverEvent.Action.class, action), new ChatComponentText(styleMessage)));
|
||||||
|
}
|
||||||
|
else if (style.equals("CLICK")) {
|
||||||
|
chatStyle.setChatClickEvent(new ClickEvent(Utils.getEnum(ClickEvent.Action.class, action), styleMessage));
|
||||||
|
}
|
||||||
|
component.appendSibling(new ChatComponentText(message).setChatStyle(chatStyle));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void append(String append) {
|
||||||
|
component.appendSibling(new ChatComponentText(append));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
package keystrokesmod.script.classes;
|
||||||
|
|
||||||
|
import org.java_websocket.client.WebSocketClient;
|
||||||
|
import org.java_websocket.handshake.ServerHandshake;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class WebSocket {
|
||||||
|
private final WebSocketClient client;
|
||||||
|
|
||||||
|
public WebSocket(String serverURI) {
|
||||||
|
this.client = createWebSocketClient(serverURI);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WebSocket(String serverUri, Map<String, String> httpHeaders) {
|
||||||
|
this.client = createWebSocketClient(serverUri, httpHeaders);
|
||||||
|
}
|
||||||
|
|
||||||
|
private WebSocketClient createWebSocketClient(String serverUri) {
|
||||||
|
return new WebSocketClient(toURI(serverUri)) {
|
||||||
|
@Override
|
||||||
|
public void onOpen(ServerHandshake handshakedata) {
|
||||||
|
WebSocket.this.onOpen(handshakedata.getHttpStatus(), handshakedata.getHttpStatusMessage());
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onMessage(String message) {
|
||||||
|
WebSocket.this.onMessage(message);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onClose(int code, String reason, boolean remote) {
|
||||||
|
WebSocket.this.onClose(code, reason, remote);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onError(Exception ex) {
|
||||||
|
WebSocket.this.onError(ex);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private WebSocketClient createWebSocketClient(String serverUri, Map<String, String> httpHeaders) {
|
||||||
|
return new WebSocketClient(toURI(serverUri), httpHeaders) {
|
||||||
|
@Override
|
||||||
|
public void onOpen(ServerHandshake handshakedata) {
|
||||||
|
WebSocket.this.onOpen(handshakedata.getHttpStatus(), handshakedata.getHttpStatusMessage());
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onMessage(String message) {
|
||||||
|
WebSocket.this.onMessage(message);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onClose(int code, String reason, boolean remote) {
|
||||||
|
WebSocket.this.onClose(code, reason, remote);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onError(Exception ex) {
|
||||||
|
WebSocket.this.onError(ex);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private static URI toURI(String uri) {
|
||||||
|
try {
|
||||||
|
return new URI(uri);
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onOpen(short status, String message) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMessage(String message) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClose(int code, String reason, boolean remote) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onError(Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean connect(boolean block) {
|
||||||
|
if (block) {
|
||||||
|
try {
|
||||||
|
return client.connectBlocking();
|
||||||
|
}
|
||||||
|
catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
client.connect();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void send(String message) {
|
||||||
|
client.send(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close(boolean block) {
|
||||||
|
if (block) {
|
||||||
|
try {
|
||||||
|
client.closeBlocking();
|
||||||
|
}
|
||||||
|
catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
client.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOpen() {
|
||||||
|
return this.client == null ? false : this.client.isOpen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -43,7 +43,7 @@ public class ModuleUtils {
|
||||||
private long FIREBALL_TIMEOUT = 500L, fireballTime = 0;
|
private long FIREBALL_TIMEOUT = 500L, fireballTime = 0;
|
||||||
public static int inAirTicks, groundTicks, stillTicks;
|
public static int inAirTicks, groundTicks, stillTicks;
|
||||||
public static int fadeEdge;
|
public static int fadeEdge;
|
||||||
public static double offsetValue = 0.0000000000201;
|
public static double offsetValue = 0.0000000000003;
|
||||||
public static boolean isAttacking;
|
public static boolean isAttacking;
|
||||||
private int attackingTicks;
|
private int attackingTicks;
|
||||||
private int unTargetTicks;
|
private int unTargetTicks;
|
||||||
|
|
@ -230,13 +230,14 @@ public class ModuleUtils {
|
||||||
|
|
||||||
if ((canSlow || ModuleManager.scaffold.moduleEnabled && !ModuleManager.tower.canTower()) && !mc.thePlayer.onGround) {
|
if ((canSlow || ModuleManager.scaffold.moduleEnabled && !ModuleManager.tower.canTower()) && !mc.thePlayer.onGround) {
|
||||||
double motionVal = 0.9507832 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006);
|
double motionVal = 0.9507832 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006);
|
||||||
if (mc.thePlayer.hurtTime == 0 && inAirTicks >= 4 && !setSlow) {
|
if (mc.thePlayer.hurtTime == 0 && inAirTicks >= 5 && !setSlow) {
|
||||||
mc.thePlayer.motionX *= motionVal;
|
mc.thePlayer.motionX *= motionVal;
|
||||||
mc.thePlayer.motionZ *= motionVal;
|
mc.thePlayer.motionZ *= motionVal;
|
||||||
setSlow = true;
|
setSlow = true;
|
||||||
//Utils.print("Slow " + motionVal);
|
//Utils.print("Slow " + motionVal);
|
||||||
}
|
}
|
||||||
didSlow = true;
|
didSlow = true;
|
||||||
|
//Utils.print(mc.thePlayer.ticksExisted + " : " + Utils.getHorizontalSpeed());
|
||||||
}
|
}
|
||||||
else if (didSlow) {
|
else if (didSlow) {
|
||||||
canSlow = didSlow = false;
|
canSlow = didSlow = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue