edged.
This commit is contained in:
parent
6b3d1b6fec
commit
68da75f08f
|
|
@ -4,6 +4,7 @@ import keystrokesmod.Raven;
|
||||||
import keystrokesmod.clickgui.components.Component;
|
import keystrokesmod.clickgui.components.Component;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.impl.client.Gui;
|
import keystrokesmod.module.impl.client.Gui;
|
||||||
|
import keystrokesmod.module.setting.impl.KeySetting;
|
||||||
import keystrokesmod.utility.Theme;
|
import keystrokesmod.utility.Theme;
|
||||||
import keystrokesmod.utility.profile.ProfileModule;
|
import keystrokesmod.utility.profile.ProfileModule;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
@ -13,47 +14,66 @@ import org.lwjgl.opengl.GL11;
|
||||||
public class BindComponent extends Component {
|
public class BindComponent extends Component {
|
||||||
public boolean isBinding;
|
public boolean isBinding;
|
||||||
private ModuleComponent moduleComponent;
|
private ModuleComponent moduleComponent;
|
||||||
private int bind;
|
private int o;
|
||||||
private int x;
|
private int x;
|
||||||
private int y;
|
private int y;
|
||||||
|
private KeySetting keySetting;
|
||||||
|
|
||||||
public BindComponent(ModuleComponent moduleComponent, int bind) {
|
public BindComponent(ModuleComponent moduleComponent, int o) {
|
||||||
this.moduleComponent = moduleComponent;
|
this.moduleComponent = moduleComponent;
|
||||||
this.x = moduleComponent.categoryComponent.getX() + moduleComponent.categoryComponent.getWidth();
|
this.x = moduleComponent.categoryComponent.getX() + moduleComponent.categoryComponent.getWidth();
|
||||||
this.y = moduleComponent.categoryComponent.getY() + moduleComponent.yPos;
|
this.y = moduleComponent.categoryComponent.getY() + moduleComponent.yPos;
|
||||||
this.bind = bind;
|
this.o = o;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindComponent(ModuleComponent moduleComponent, KeySetting keySetting, int o) {
|
||||||
|
this.moduleComponent = moduleComponent;
|
||||||
|
this.x = moduleComponent.categoryComponent.getX() + moduleComponent.categoryComponent.getWidth();
|
||||||
|
this.y = moduleComponent.categoryComponent.getY() + moduleComponent.yPos;
|
||||||
|
this.keySetting = keySetting;
|
||||||
|
this.o = o;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateHeight(int n) {
|
public void updateHeight(int n) {
|
||||||
this.bind = n;
|
this.o = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
this.drawString(!this.moduleComponent.mod.canBeEnabled() && this.moduleComponent.mod.script == null ? "Module cannot be bound." : this.isBinding ? "Press a key..." : "Current bind: '§e" + (this.moduleComponent.mod.getKeycode() >= 1000 ? "M" + (this.moduleComponent.mod.getKeycode() - 1000) : Keyboard.getKeyName(this.moduleComponent.mod.getKeycode())) + "§r'");
|
if (keySetting == null) {
|
||||||
|
this.drawString(!this.moduleComponent.mod.canBeEnabled() && this.moduleComponent.mod.script == null ? "Module cannot be bound." : this.isBinding ? "Press a key..." : "Current bind: '§e" + (this.moduleComponent.mod.getKeycode() >= 1000 ? "M" + (this.moduleComponent.mod.getKeycode() - 1000) : Keyboard.getKeyName(this.moduleComponent.mod.getKeycode())) + "§r'");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.drawString(this.isBinding ? "Press a key..." : "" + this.keySetting.getName() + ": '§e" + (this.keySetting.getKey() >= 1000 ? "M" + (this.keySetting.getKey() - 1000) : Keyboard.getKeyName(this.keySetting.getKey())) + "§r'");
|
||||||
|
}
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawScreen(int x, int y) {
|
public void drawScreen(int x, int y) {
|
||||||
this.y = this.moduleComponent.categoryComponent.getModuleY() + this.bind;
|
this.y = this.moduleComponent.categoryComponent.getModuleY() + this.o;
|
||||||
this.x = this.moduleComponent.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 button) {
|
||||||
if (this.i(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled()) {
|
if (this.i(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled()) {
|
||||||
if (b == 0) {
|
if (button == 0) {
|
||||||
this.isBinding = !this.isBinding;
|
this.isBinding = !this.isBinding;
|
||||||
}
|
}
|
||||||
else if (b == 1 && this.moduleComponent.mod.moduleCategory() != Module.category.profiles) {
|
else if (button == 1 && this.moduleComponent.mod.moduleCategory() != Module.category.profiles) {
|
||||||
this.moduleComponent.mod.setHidden(!this.moduleComponent.mod.isHidden());
|
this.moduleComponent.mod.setHidden(!this.moduleComponent.mod.isHidden());
|
||||||
if (Raven.currentProfile != null) {
|
if (Raven.currentProfile != null) {
|
||||||
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (b > 1) {
|
else if (button > 1) {
|
||||||
if (this.isBinding) {
|
if (this.isBinding) {
|
||||||
this.moduleComponent.mod.setBind(b + 1000);
|
if (this.keySetting != null) {
|
||||||
|
this.keySetting.setKey(button + 1000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.moduleComponent.mod.setBind(button + 1000);
|
||||||
|
}
|
||||||
if (Raven.currentProfile != null) {
|
if (Raven.currentProfile != null) {
|
||||||
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
||||||
}
|
}
|
||||||
|
|
@ -69,8 +89,14 @@ public class BindComponent extends Component {
|
||||||
if (keybind == Keyboard.KEY_0 || keybind == Keyboard.KEY_ESCAPE) {
|
if (keybind == Keyboard.KEY_0 || keybind == Keyboard.KEY_ESCAPE) {
|
||||||
if (this.moduleComponent.mod instanceof Gui) {
|
if (this.moduleComponent.mod instanceof Gui) {
|
||||||
this.moduleComponent.mod.setBind(54);
|
this.moduleComponent.mod.setBind(54);
|
||||||
} else {
|
}
|
||||||
this.moduleComponent.mod.setBind(0);
|
else {
|
||||||
|
if (this.keySetting != null) {
|
||||||
|
this.keySetting.setKey(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.moduleComponent.mod.setBind(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Raven.currentProfile != null) {
|
if (Raven.currentProfile != null) {
|
||||||
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
||||||
|
|
@ -80,7 +106,12 @@ public class BindComponent extends Component {
|
||||||
if (Raven.currentProfile != null) {
|
if (Raven.currentProfile != null) {
|
||||||
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
||||||
}
|
}
|
||||||
this.moduleComponent.mod.setBind(keybind);
|
if (this.keySetting != null) {
|
||||||
|
this.keySetting.setKey(keybind);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.moduleComponent.mod.setBind(keybind);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isBinding = false;
|
this.isBinding = false;
|
||||||
|
|
@ -92,11 +123,14 @@ public class BindComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
|
if (this.keySetting != null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return 16;
|
return 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawString(String s) {
|
private void drawString(String s) {
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(s, (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2), (float) ((this.moduleComponent.categoryComponent.getY() + this.bind + 3) * 2), !this.moduleComponent.mod.hidden ? Theme.getGradient(Theme.descriptor[0], Theme.descriptor[1], 0) : Theme.getGradient(Theme.hiddenBind[0], Theme.hiddenBind[1], 0));
|
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(s, (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2), (float) ((this.moduleComponent.categoryComponent.getY() + this.o + (this.keySetting == null ? 3 : 4)) * 2), !this.moduleComponent.mod.hidden ? Theme.getGradient(Theme.descriptor[0], Theme.descriptor[1], 0) : Theme.getGradient(Theme.hiddenBind[0], Theme.hiddenBind[1], 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.setting.Setting;
|
import keystrokesmod.module.setting.Setting;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
||||||
|
import keystrokesmod.module.setting.impl.KeySetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.RenderUtils;
|
import keystrokesmod.utility.RenderUtils;
|
||||||
import keystrokesmod.utility.Timer;
|
import keystrokesmod.utility.Timer;
|
||||||
|
|
@ -52,17 +53,25 @@ public class ModuleComponent extends Component {
|
||||||
SliderComponent s = new SliderComponent(n, this, y);
|
SliderComponent s = new SliderComponent(n, this, y);
|
||||||
this.settings.add(s);
|
this.settings.add(s);
|
||||||
y += 12;
|
y += 12;
|
||||||
} else if (v instanceof ButtonSetting) {
|
}
|
||||||
|
else if (v instanceof ButtonSetting) {
|
||||||
ButtonSetting b = (ButtonSetting) v;
|
ButtonSetting b = (ButtonSetting) v;
|
||||||
ButtonComponent c = new ButtonComponent(mod, b, this, y);
|
ButtonComponent c = new ButtonComponent(mod, b, this, y);
|
||||||
this.settings.add(c);
|
this.settings.add(c);
|
||||||
y += 12;
|
y += 12;
|
||||||
} else if (v instanceof DescriptionSetting) {
|
}
|
||||||
|
else if (v instanceof DescriptionSetting) {
|
||||||
DescriptionSetting d = (DescriptionSetting) v;
|
DescriptionSetting d = (DescriptionSetting) v;
|
||||||
DescriptionComponent m = new DescriptionComponent(d, this, y);
|
DescriptionComponent m = new DescriptionComponent(d, this, y);
|
||||||
this.settings.add(m);
|
this.settings.add(m);
|
||||||
y += 12;
|
y += 12;
|
||||||
}
|
}
|
||||||
|
else if (v instanceof KeySetting) {
|
||||||
|
KeySetting setting = (KeySetting) v;
|
||||||
|
BindComponent keyComponent = new BindComponent(this, setting, y);
|
||||||
|
this.settings.add(keyComponent);
|
||||||
|
y += 12;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.settings.add(new BindComponent(this, y));
|
this.settings.add(new BindComponent(this, y));
|
||||||
|
|
@ -79,7 +88,8 @@ public class ModuleComponent extends Component {
|
||||||
co.updateHeight(y);
|
co.updateHeight(y);
|
||||||
if (co instanceof SliderComponent) {
|
if (co instanceof SliderComponent) {
|
||||||
y += 16;
|
y += 16;
|
||||||
} else if (co instanceof ButtonComponent || co instanceof BindComponent || co instanceof DescriptionComponent) {
|
}
|
||||||
|
else if (co instanceof ButtonComponent || co instanceof BindComponent || co instanceof DescriptionComponent) {
|
||||||
y += 12;
|
y += 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import net.minecraft.client.entity.AbstractClientPlayer;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
import net.minecraft.client.entity.EntityPlayerSP;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||||
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.network.play.client.C03PacketPlayer;
|
import net.minecraft.network.play.client.C03PacketPlayer;
|
||||||
import net.minecraft.network.play.client.C0BPacketEntityAction;
|
import net.minecraft.network.play.client.C0BPacketEntityAction;
|
||||||
import net.minecraft.network.play.client.C0CPacketInput;
|
import net.minecraft.network.play.client.C0CPacketInput;
|
||||||
|
|
@ -288,7 +289,7 @@ public abstract class MixinEntityPlayerSP extends AbstractClientPlayer {
|
||||||
this.setSprinting(true);
|
this.setSprinting(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isSprinting() && (!ModuleManager.sprint.omniSprint() && !NoSlow.groundSpeed() && (this.movementInput.moveForward < f || !flag3)) || this.isCollidedHorizontally || (ModuleManager.scaffold != null && ModuleManager.scaffold.isEnabled && (!ModuleManager.scaffold.sprint() || ModuleManager.tower.canTower())) || (ModuleManager.wTap.isEnabled() && WTap.stopSprint)) {
|
if (this.isSprinting() && (!ModuleManager.sprint.omniSprint() && !NoSlow.groundSpeed() && (this.movementInput.moveForward < f || !flag3)) || this.isCollidedHorizontally || this.mc.gameSettings.keyBindSneak.isKeyDown() || (ModuleManager.scaffold != null && ModuleManager.scaffold.isEnabled && (!ModuleManager.scaffold.sprint() || ModuleManager.tower.canTower())) || (ModuleManager.wTap.isEnabled() && WTap.stopSprint)) {
|
||||||
this.setSprinting(false);
|
this.setSprinting(false);
|
||||||
WTap.stopSprint = false;
|
WTap.stopSprint = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package keystrokesmod.mixins.impl.network;
|
||||||
|
|
||||||
|
import keystrokesmod.module.ModuleManager;
|
||||||
|
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||||
|
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(NetHandlerPlayClient.class)
|
||||||
|
public class MixinNetHandlerPlayClient {
|
||||||
|
|
||||||
|
@Inject(method = "handlePlayerPosLook", at = @At("HEAD"))
|
||||||
|
public void handlePlayerPosLookPre(S08PacketPlayerPosLook packetIn, CallbackInfo ci) {
|
||||||
|
ModuleManager.noRotate.handlePlayerPosLookPre();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "handlePlayerPosLook", at = @At("RETURN"))
|
||||||
|
public void handlePlayerPosLook(S08PacketPlayerPosLook packetIn, CallbackInfo ci) {
|
||||||
|
ModuleManager.noRotate.handlePlayerPosLook(packetIn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -88,10 +88,11 @@ public class KillAura extends Module {
|
||||||
private boolean firstCycle;
|
private boolean firstCycle;
|
||||||
private boolean partialDown;
|
private boolean partialDown;
|
||||||
private int partialTicks;
|
private int partialTicks;
|
||||||
|
private int firstEdge;
|
||||||
|
private boolean blocked;
|
||||||
|
|
||||||
// blink related
|
// blink related
|
||||||
private ConcurrentLinkedQueue<Packet> blinkedPackets = new ConcurrentLinkedQueue<>();
|
private ConcurrentLinkedQueue<Packet> blinkedPackets = new ConcurrentLinkedQueue<>();
|
||||||
private ConcurrentLinkedQueue<Packet> regularPackets = new ConcurrentLinkedQueue<>();
|
|
||||||
private AtomicBoolean blinking = new AtomicBoolean(false);
|
private AtomicBoolean blinking = new AtomicBoolean(false);
|
||||||
public boolean lag;
|
public boolean lag;
|
||||||
public boolean swapped;
|
public boolean swapped;
|
||||||
|
|
@ -108,7 +109,7 @@ public class KillAura extends Module {
|
||||||
private int delayTicks = 0;
|
private int delayTicks = 0;
|
||||||
private boolean lastPressedLeft;
|
private boolean lastPressedLeft;
|
||||||
private boolean lastPressedRight;
|
private boolean lastPressedRight;
|
||||||
public boolean fixStates;
|
private boolean sendDig = true;
|
||||||
|
|
||||||
public KillAura() {
|
public KillAura() {
|
||||||
super("KillAura", category.combat);
|
super("KillAura", category.combat);
|
||||||
|
|
@ -177,6 +178,10 @@ public class KillAura extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
|
if (sendDig && !isTargeting) {
|
||||||
|
sendDigPacket();
|
||||||
|
sendDig = false;
|
||||||
|
}
|
||||||
if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
||||||
boolean pressedLeft = Mouse.isButtonDown(0);
|
boolean pressedLeft = Mouse.isButtonDown(0);
|
||||||
if (pressedLeft && !lastPressedLeft) {
|
if (pressedLeft && !lastPressedLeft) {
|
||||||
|
|
@ -234,6 +239,14 @@ public class KillAura extends Module {
|
||||||
handleBlocking(false);
|
handleBlocking(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
double distanceToBB = getDistanceToBoundingBox(target);
|
||||||
|
boolean inBlockRange = distanceToBB <= blockRange.getInput();
|
||||||
|
if ((blinkAutoBlock() && !Utils.holdingSword()) || !inBlockRange) { // for blink autoblocks
|
||||||
|
if (blinking.get() || lag) {
|
||||||
|
resetBlinkState(true);
|
||||||
|
//Utils.print("2");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (delayTicks >= 0) {
|
if (delayTicks >= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -241,20 +254,12 @@ public class KillAura extends Module {
|
||||||
resetYaw();
|
resetYaw();
|
||||||
reset = false;
|
reset = false;
|
||||||
}
|
}
|
||||||
double distanceToBB = getDistanceToBoundingBox(target);
|
|
||||||
boolean inBlockRange = distanceToBB <= blockRange.getInput();
|
|
||||||
if (!autoBlockOverride() || !inBlockRange) { // regular swing & attack if autoblock isnt overriding or isnt in autoblock range
|
if (!autoBlockOverride() || !inBlockRange) { // regular swing & attack if autoblock isnt overriding or isnt in autoblock range
|
||||||
handleSwingAndAttack(distanceToBB, false);
|
handleSwingAndAttack(distanceToBB, false);
|
||||||
}
|
}
|
||||||
if (inBlockRange && autoBlockOverride() && manualBlock()) {
|
if (inBlockRange && autoBlockOverride() && manualBlock()) {
|
||||||
handleAutoBlock(distanceToBB);
|
handleAutoBlock(distanceToBB);
|
||||||
}
|
}
|
||||||
if ((blinkAutoBlock() && !Utils.holdingSword()) || !inBlockRange) { // for blink autoblocks
|
|
||||||
if (blinking.get() || lag) {
|
|
||||||
resetBlinkState(true);
|
|
||||||
//Utils.print("2");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (inBlockRange && manualBlock()) {
|
if (inBlockRange && manualBlock()) {
|
||||||
handleBlocking(true);
|
handleBlocking(true);
|
||||||
}
|
}
|
||||||
|
|
@ -329,7 +334,6 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
if (attackingEntity != null && inRange(target, attackRange.getInput())) {
|
if (attackingEntity != null && inRange(target, attackRange.getInput())) {
|
||||||
isTargeting = true;
|
isTargeting = true;
|
||||||
fixStates = false;
|
|
||||||
}
|
}
|
||||||
else if (isTargeting) {
|
else if (isTargeting) {
|
||||||
isTargeting = false;
|
isTargeting = false;
|
||||||
|
|
@ -378,12 +382,6 @@ public class KillAura extends Module {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
blinkedPackets.add(packet);
|
blinkedPackets.add(packet);
|
||||||
if (packet instanceof C08PacketPlayerBlockPlacement || packet instanceof C09PacketHeldItemChange || packet instanceof C02PacketUseEntity || packet instanceof C07PacketPlayerDigging) {
|
|
||||||
// Nothing
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
regularPackets.add(packet);
|
|
||||||
}
|
|
||||||
e.setCanceled(true);
|
e.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -391,15 +389,17 @@ public class KillAura extends Module {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onMouse(MouseEvent e) {
|
public void onMouse(MouseEvent e) {
|
||||||
if (e.button == 0 || e.button == 1) {
|
if (e.button == 0 || e.button == 1) {
|
||||||
if (!Utils.holdingWeapon() || target == null || rotationMode.getInput() != 0) {
|
if (!Utils.holdingWeapon() || target == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e.setCanceled(true);
|
e.setCanceled(true);
|
||||||
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
||||||
|
//hypixUtils.print("Set false?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCustomMouse(int button, boolean state) {
|
public void onCustomMouse(int button, boolean state) {
|
||||||
if (blinkAutoBlock() || autoBlockMode.getInput() == 3 || rotationMode.getInput() != 0) {
|
if (blinkAutoBlock() || autoBlockMode.getInput() == 3) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (button == 1) {
|
if (button == 1) {
|
||||||
|
|
@ -681,12 +681,6 @@ public class KillAura extends Module {
|
||||||
setKeyBindState(keyCode, blockState, false);
|
setKeyBindState(keyCode, blockState, false);
|
||||||
this.blockingClient = blockState;
|
this.blockingClient = blockState;
|
||||||
break;
|
break;
|
||||||
case 3: // interact a
|
|
||||||
case 4: // interact b
|
|
||||||
case 5: // interact c
|
|
||||||
case 6: // interact d
|
|
||||||
Reflection.setItemInUse(this.blockingClient = blockState);
|
|
||||||
break;
|
|
||||||
case 2: // partial
|
case 2: // partial
|
||||||
if (!blockState) {
|
if (!blockState) {
|
||||||
rightClick(partialDown = false);
|
rightClick(partialDown = false);
|
||||||
|
|
@ -702,6 +696,12 @@ public class KillAura extends Module {
|
||||||
rightClick(partialDown = true);
|
rightClick(partialDown = true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 3: // interact a
|
||||||
|
case 4: // interact b
|
||||||
|
case 5: // hypixel
|
||||||
|
case 6: // hypixel 2
|
||||||
|
Reflection.setItemInUse(this.blockingClient = blockState);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
previousAutoBlockMode = (int) autoBlockMode.getInput();
|
previousAutoBlockMode = (int) autoBlockMode.getInput();
|
||||||
}
|
}
|
||||||
|
|
@ -724,7 +724,7 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean blinkAutoBlock() {
|
public boolean blinkAutoBlock() {
|
||||||
return (autoBlockMode.getInput() == 4 || autoBlockMode.getInput() == 5 || autoBlockMode.getInput() == 6 || autoBlockMode.getInput() == 7);
|
return (autoBlockMode.getInput() == 4 || autoBlockMode.getInput() == 5 || autoBlockMode.getInput() == 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
private float unwrapYaw(float yaw, float prevYaw) {
|
private float unwrapYaw(float yaw, float prevYaw) {
|
||||||
|
|
@ -753,7 +753,6 @@ public class KillAura extends Module {
|
||||||
if (ModuleManager.bedAura.stopAutoblock) {
|
if (ModuleManager.bedAura.stopAutoblock) {
|
||||||
resetBlinkState(false);
|
resetBlinkState(false);
|
||||||
blockingServer = false;
|
blockingServer = false;
|
||||||
lag = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch ((int) autoBlockMode.getInput()) {
|
switch ((int) autoBlockMode.getInput()) {
|
||||||
|
|
@ -764,14 +763,16 @@ public class KillAura extends Module {
|
||||||
interactTicks++;
|
interactTicks++;
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
|
||||||
if (lag) {
|
if (lag) {
|
||||||
sendDigPacket();
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
|
blocked = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
blinking.set(true);
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
|
blocked = true;
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
lag = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -784,18 +785,20 @@ public class KillAura extends Module {
|
||||||
interactTicks++;
|
interactTicks++;
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
|
||||||
if (lag) {
|
if (lag) {
|
||||||
setSwapSlot();
|
setSwapSlot();
|
||||||
swapped = true;
|
swapped = blocked = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (lag) {
|
if (lag) {
|
||||||
setCurrentSlot();
|
setCurrentSlot();
|
||||||
|
swapped = true;
|
||||||
}
|
}
|
||||||
|
blinking.set(true);
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
|
blocked = true;
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
lag = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -808,18 +811,16 @@ public class KillAura extends Module {
|
||||||
interactTicks++;
|
interactTicks++;
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
|
||||||
if (lag) {
|
if (lag) {
|
||||||
setSwapSlot();
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
swapped = true;
|
blocked = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (lag) {
|
blinking.set(true);
|
||||||
setCurrentSlot();
|
|
||||||
}
|
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
|
blocked = true;
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
lag = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -833,18 +834,16 @@ public class KillAura extends Module {
|
||||||
if (!firstCycle) {
|
if (!firstCycle) {
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
|
||||||
if (lag) {
|
if (lag) {
|
||||||
setSwapSlot();
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
swapped = true;
|
blocked = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (lag) {
|
blinking.set(true);
|
||||||
setCurrentSlot();
|
|
||||||
}
|
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
|
blocked = true;
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
lag = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -852,31 +851,28 @@ public class KillAura extends Module {
|
||||||
firstCycle = true;
|
firstCycle = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
|
||||||
if (lag) {
|
if (lag) {
|
||||||
setSwapSlot();
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
swapped = true;
|
blocked = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (lag) {
|
blinking.set(true);
|
||||||
setCurrentSlot();
|
|
||||||
}
|
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
|
blocked = true;
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
|
lag = true;
|
||||||
firstCycle = false;
|
firstCycle = false;
|
||||||
interactTicks = 0;
|
interactTicks = 0;
|
||||||
lag = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1098,20 +1094,27 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetBlinkState(boolean unblock) {
|
public void resetBlinkState(boolean unblock) {
|
||||||
blinking.set(false);
|
|
||||||
blinkedPackets.clear();
|
|
||||||
releasePackets();
|
|
||||||
//Utils.print("blink state reset");
|
//Utils.print("blink state reset");
|
||||||
blockingServer = false;
|
blockingServer = false;
|
||||||
fixStates = true;
|
|
||||||
interactTicks = 0;
|
interactTicks = 0;
|
||||||
|
blinking.set(false);
|
||||||
|
releasePackets();
|
||||||
|
if (Raven.packetsHandler.playerSlot.get() != mc.thePlayer.inventory.currentItem && swapped) {
|
||||||
|
mc.thePlayer.sendQueue.addToSendQueue(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
|
||||||
|
Raven.packetsHandler.playerSlot.set(mc.thePlayer.inventory.currentItem);
|
||||||
|
}
|
||||||
|
else if (unblock && lag && !ModuleManager.scaffold.isEnabled && blocked) {
|
||||||
|
sendDig = true;
|
||||||
|
}
|
||||||
|
swapped = blocked = false;
|
||||||
|
lag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendDigPacket() {
|
public void sendDigPacket() {
|
||||||
if (!Utils.holdingSword()) {
|
if (!Utils.holdingSword()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PacketUtils.sendPacketNoEvent(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
//Utils.print("Unblock");
|
//Utils.print("Unblock");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1121,7 +1124,6 @@ public class KillAura extends Module {
|
||||||
for (Packet packet : blinkedPackets) {
|
for (Packet packet : blinkedPackets) {
|
||||||
Raven.packetsHandler.handlePacket(packet);
|
Raven.packetsHandler.handlePacket(packet);
|
||||||
PacketUtils.sendPacketNoEvent(packet);
|
PacketUtils.sendPacketNoEvent(packet);
|
||||||
regularPackets.clear();
|
|
||||||
//Utils.print("blink packets");
|
//Utils.print("blink packets");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1131,20 +1133,6 @@ public class KillAura extends Module {
|
||||||
Utils.sendModuleMessage(this, "&cThere was an error releasing blinked packets");
|
Utils.sendModuleMessage(this, "&cThere was an error releasing blinked packets");
|
||||||
}
|
}
|
||||||
blinkedPackets.clear();
|
blinkedPackets.clear();
|
||||||
try {
|
|
||||||
synchronized (regularPackets) {
|
|
||||||
for (Packet packet : regularPackets) {
|
|
||||||
Raven.packetsHandler.handlePacket(packet);
|
|
||||||
PacketUtils.sendPacketNoEvent(packet);
|
|
||||||
//Utils.print("regular packets");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
Utils.sendModuleMessage(this, "&cThere was an error releasing regular packets");
|
|
||||||
}
|
|
||||||
regularPackets.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean inRange(final Entity target, final double distance) {
|
private boolean inRange(final Entity target, final double distance) {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
||||||
|
import keystrokesmod.module.setting.impl.KeySetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.Reflection;
|
import keystrokesmod.utility.Reflection;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
|
|
@ -16,6 +17,7 @@ import net.minecraft.network.play.server.*;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
public class LongJump extends Module {
|
public class LongJump extends Module {
|
||||||
private SliderSetting boostSetting;
|
private SliderSetting boostSetting;
|
||||||
|
|
@ -28,7 +30,7 @@ public class LongJump extends Module {
|
||||||
private ButtonSetting stopMovement;
|
private ButtonSetting stopMovement;
|
||||||
private ButtonSetting hideExplosion;
|
private ButtonSetting hideExplosion;
|
||||||
|
|
||||||
private SliderSetting temporaryFlightKey;
|
private KeySetting temporaryFlightKey;
|
||||||
private SliderSetting pitchVal;
|
private SliderSetting pitchVal;
|
||||||
|
|
||||||
private float yaw;
|
private float yaw;
|
||||||
|
|
@ -56,7 +58,7 @@ public class LongJump extends Module {
|
||||||
private String[] modes = new String[]{"Fireball", "Fireball Auto"};
|
private String[] modes = new String[]{"Fireball", "Fireball Auto"};
|
||||||
public LongJump() {
|
public LongJump() {
|
||||||
super("Long Jump", category.movement);
|
super("Long Jump", category.movement);
|
||||||
this.registerSetting(boostSetting = new SliderSetting("Horizontal boost", 1.7, 0.0, 2.0, 0.1));
|
this.registerSetting(boostSetting = new SliderSetting("Horizontal boost", 1.7, 0.0, 2.0, 0.05));
|
||||||
this.registerSetting(verticalMotion = new SliderSetting("Vertical motion", 0, 0.4, 0.9, 0.01));
|
this.registerSetting(verticalMotion = new SliderSetting("Vertical motion", 0, 0.4, 0.9, 0.01));
|
||||||
this.registerSetting(motionDecay = new SliderSetting("Motion decay", 17, 1, 40, 1));
|
this.registerSetting(motionDecay = new SliderSetting("Motion decay", 17, 1, 40, 1));
|
||||||
this.registerSetting(allowStrafe = new ButtonSetting("Allow strafe", false));
|
this.registerSetting(allowStrafe = new ButtonSetting("Allow strafe", false));
|
||||||
|
|
@ -64,24 +66,12 @@ public class LongJump extends Module {
|
||||||
this.registerSetting(stopMovement = new ButtonSetting("Stop movement", false));
|
this.registerSetting(stopMovement = new ButtonSetting("Stop movement", false));
|
||||||
this.registerSetting(hideExplosion = new ButtonSetting("Hide explosion", false));
|
this.registerSetting(hideExplosion = new ButtonSetting("Hide explosion", false));
|
||||||
|
|
||||||
this.registerSetting(temporaryFlightKey = new SliderSetting("Vertical key", 91, keyNames));
|
this.registerSetting(temporaryFlightKey = new KeySetting("Vertical key", Keyboard.KEY_SPACE));
|
||||||
|
|
||||||
//this.registerSetting(new DescriptionSetting("Dev:"));
|
//this.registerSetting(new DescriptionSetting("Dev:"));
|
||||||
//this.registerSetting(pitchVal = new SliderSetting("Stop movement Pitch", 55, 55, 80, 0.1));
|
//this.registerSetting(pitchVal = new SliderSetting("Stop movement Pitch", 55, 55, 80, 0.1));
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] keyNames = {
|
|
||||||
"LMB", "RMB", "MMB",
|
|
||||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
|
|
||||||
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
|
|
||||||
"Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
|
|
||||||
"BACK", "CAPITAL", "COMMA", "DELETE", "DOWN", "END", "ESCAPE", "F1", "F2", "F3", "F4", "F5",
|
|
||||||
"F6", "F7", "HOME", "INSERT", "LBRACKET", "LCONTROL", "LMENU", "LMETA", "LSHIFT", "MINUS",
|
|
||||||
"NUMPAD0", "NUMPAD1", "NUMPAD2", "NUMPAD3", "NUMPAD4", "NUMPAD5", "NUMPAD6", "NUMPAD7",
|
|
||||||
"NUMPAD8", "NUMPAD9", "PERIOD", "RETURN", "RCONTROL", "RSHIFT", "RBRACKET", "SEMICOLON",
|
|
||||||
"SLASH", "SPACE", "TAB", "GRAVE"
|
|
||||||
};
|
|
||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
slotReset = false;
|
slotReset = false;
|
||||||
slotResetTicks = 0;
|
slotResetTicks = 0;
|
||||||
|
|
@ -338,11 +328,7 @@ public class LongJump extends Module {
|
||||||
|
|
||||||
private boolean temporaryFlightKey() {
|
private boolean temporaryFlightKey() {
|
||||||
if (notMoving) return true;
|
if (notMoving) return true;
|
||||||
if (temporaryFlightKey.getInput() > 2) {
|
return temporaryFlightKey.isPressed();
|
||||||
return Utils.keybinds.isKeyDown(getKeyCode(keyNames[(int) temporaryFlightKey.getInput()]));
|
|
||||||
} else {
|
|
||||||
return Utils.keybinds.isMouseDown((int) temporaryFlightKey.getInput());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getKeyCode(String keyName) {
|
private int getKeyCode(String keyName) {
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,7 @@ import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.BlockUtils;
|
import keystrokesmod.utility.*;
|
||||||
import keystrokesmod.utility.ModuleUtils;
|
|
||||||
import keystrokesmod.utility.Reflection;
|
|
||||||
import keystrokesmod.utility.Utils;
|
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.*;
|
||||||
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
|
|
@ -80,7 +77,8 @@ public class NoSlow extends Module {
|
||||||
if (mc.thePlayer.onGround) {
|
if (mc.thePlayer.onGround) {
|
||||||
mc.thePlayer.jump();
|
mc.thePlayer.jump();
|
||||||
break;
|
break;
|
||||||
} else if (ModuleUtils.inAirTicks >= 2) {
|
}
|
||||||
|
else {
|
||||||
mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
|
mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
|
||||||
canFloat = true;
|
canFloat = true;
|
||||||
reSendConsume = false;
|
reSendConsume = false;
|
||||||
|
|
@ -150,20 +148,20 @@ public class NoSlow extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPacketSend(SendPacketEvent e) {
|
public void onPacketSend(SendPacketEvent e) {
|
||||||
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement && mode.getInput() == 4 && getSlowed() != 0.2f && holdingConsumable(((C08PacketPlayerBlockPlacement) e.getPacket()).getStack()) && !BlockUtils.isInteractable(mc.objectMouseOver) && holdingEdible(((C08PacketPlayerBlockPlacement) e.getPacket()).getStack())) {
|
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement && mode.getInput() == 4 && getSlowed() != 0.2f && holdingConsumable(((C08PacketPlayerBlockPlacement) e.getPacket()).getStack()) && !BlockUtils.isInteractable(mc.objectMouseOver) && Utils.holdingEdible(((C08PacketPlayerBlockPlacement) e.getPacket()).getStack())) {
|
||||||
if (ModuleManager.skyWars.isEnabled() && Utils.getSkyWarsStatus() == 1) {
|
if (ModuleManager.skyWars.isEnabled() && Utils.getSkyWarsStatus() == 1 || canFloat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!canFloat) {
|
if (!mc.thePlayer.onGround) {
|
||||||
if (!mc.thePlayer.onGround) {
|
canFloat = true;
|
||||||
canFloat = true;
|
}
|
||||||
} else {
|
else {
|
||||||
if (mc.thePlayer.onGround) {
|
if (mc.thePlayer.onGround) {
|
||||||
mc.thePlayer.jump();
|
mc.thePlayer.jump();
|
||||||
}
|
|
||||||
reSendConsume = true;
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
}
|
||||||
|
reSendConsume = true;
|
||||||
|
canFloat = false;
|
||||||
|
e.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public class Sprint extends Module {
|
||||||
}
|
}
|
||||||
if (ModuleManager.sprint.isEnabled() && ModuleManager.sprint.omniDirectional.getInput() == 2) {
|
if (ModuleManager.sprint.isEnabled() && ModuleManager.sprint.omniDirectional.getInput() == 2) {
|
||||||
if (mc.thePlayer.onGround && mc.thePlayer.moveStrafing == 0 && mc.thePlayer.moveForward <= -0.5 && !Utils.jumpDown()) {
|
if (mc.thePlayer.onGround && mc.thePlayer.moveStrafing == 0 && mc.thePlayer.moveForward <= -0.5 && !Utils.jumpDown()) {
|
||||||
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !ModuleManager.safeWalk.canSafeWalk()) {
|
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !ModuleManager.safeWalk.canSafeWalk() && !ModuleManager.scaffold.isEnabled && !ModuleManager.bhop.isEnabled()) {
|
||||||
float playerYaw = mc.thePlayer.rotationYaw;
|
float playerYaw = mc.thePlayer.rotationYaw;
|
||||||
e.setYaw(playerYaw -= 55);
|
e.setYaw(playerYaw -= 55);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import keystrokesmod.Raven;
|
||||||
import keystrokesmod.event.*;
|
import keystrokesmod.event.*;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.impl.combat.KillAura;
|
|
||||||
import keystrokesmod.module.impl.minigames.BedWars;
|
import keystrokesmod.module.impl.minigames.BedWars;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
|
|
@ -62,6 +61,8 @@ public class BedAura extends Module {
|
||||||
private int defaultOutlineColor = new Color(226, 65, 65).getRGB();
|
private int defaultOutlineColor = new Color(226, 65, 65).getRGB();
|
||||||
private boolean aiming;
|
private boolean aiming;
|
||||||
private int noAutoBlockTicks;
|
private int noAutoBlockTicks;
|
||||||
|
private BlockPos previousBlockBroken;
|
||||||
|
private BlockPos rotateLastBlock;
|
||||||
|
|
||||||
public BedAura() {
|
public BedAura() {
|
||||||
super("BedAura", category.player, 0);
|
super("BedAura", category.player, 0);
|
||||||
|
|
@ -91,6 +92,7 @@ public class BedAura extends Module {
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
reset(true);
|
reset(true);
|
||||||
|
previousBlockBroken = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.HIGHEST) // takes priority over ka & antifireball
|
@SubscribeEvent(priority = EventPriority.HIGHEST) // takes priority over ka & antifireball
|
||||||
|
|
@ -105,9 +107,6 @@ public class BedAura extends Module {
|
||||||
if (Utils.isBedwarsPractice()) {
|
if (Utils.isBedwarsPractice()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ModuleManager.scaffold.isEnabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!mc.thePlayer.capabilities.allowEdit || mc.thePlayer.isSpectator()) {
|
if (!mc.thePlayer.capabilities.allowEdit || mc.thePlayer.isSpectator()) {
|
||||||
reset(true);
|
reset(true);
|
||||||
return;
|
return;
|
||||||
|
|
@ -173,13 +172,17 @@ public class BedAura extends Module {
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
if ((rotate || breakProgress >= 1 || breakProgress == 0) && currentBlock != null) {
|
aiming = false;
|
||||||
float[] rotations = RotationUtils.getRotations(currentBlock, e.getYaw(), e.getPitch());
|
if ((rotate || breakProgress >= 1 || breakProgress == 0) && (currentBlock != null || rotateLastBlock != null)) {
|
||||||
if (!RotationUtils.inRange(currentBlock, range.getInput())) {
|
float[] rotations = RotationUtils.getRotations(currentBlock == null ? rotateLastBlock : currentBlock, e.getYaw(), e.getPitch());
|
||||||
|
if (currentBlock != null && !RotationUtils.inRange(currentBlock, range.getInput())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e.setYaw(RotationUtils.applyVanilla(rotations[0]));
|
e.setYaw(RotationUtils.applyVanilla(rotations[0]));
|
||||||
e.setPitch(rotations[1]);
|
e.setPitch(rotations[1]);
|
||||||
|
if (Raven.debug) {
|
||||||
|
Utils.sendModuleMessage(this, "&7rotating (&3" + mc.thePlayer.ticksExisted + "&7).");
|
||||||
|
}
|
||||||
rotate = false;
|
rotate = false;
|
||||||
if (groundSpoof.isToggled() && !mc.thePlayer.isInWater()) {
|
if (groundSpoof.isToggled() && !mc.thePlayer.isInWater()) {
|
||||||
e.setOnGround(true);
|
e.setOnGround(true);
|
||||||
|
|
@ -206,7 +209,7 @@ public class BedAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetSlot() {
|
private void resetSlot() {
|
||||||
if (Raven.packetsHandler.playerSlot.get() != mc.thePlayer.inventory.currentItem && mode.getInput() == 2) {
|
if (Raven.packetsHandler != null && Raven.packetsHandler.playerSlot != null && Utils.nullCheck() && Raven.packetsHandler.playerSlot.get() != mc.thePlayer.inventory.currentItem && mode.getInput() == 2) {
|
||||||
setPacketSlot(mc.thePlayer.inventory.currentItem);
|
setPacketSlot(mc.thePlayer.inventory.currentItem);
|
||||||
}
|
}
|
||||||
else if (lastSlot != -1) {
|
else if (lastSlot != -1) {
|
||||||
|
|
@ -215,7 +218,7 @@ public class BedAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean cancelKnockback() {
|
public boolean cancelKnockback() {
|
||||||
return cancelKnockback.isToggled() && Utils.usingBedAura();
|
return this.isEnabled() && this.currentBlock != null && this.cancelKnockback.isToggled();
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlockPos[] getBedPos() {
|
private BlockPos[] getBedPos() {
|
||||||
|
|
@ -276,7 +279,8 @@ public class BedAura extends Module {
|
||||||
}
|
}
|
||||||
List<Map.Entry<BlockPos, double[]>> sortedByDistance = sortByDistance(blockMap);
|
List<Map.Entry<BlockPos, double[]>> sortedByDistance = sortByDistance(blockMap);
|
||||||
List<Map.Entry<BlockPos, double[]>> sortedByEfficiency = sortByEfficiency(sortedByDistance);
|
List<Map.Entry<BlockPos, double[]>> sortedByEfficiency = sortByEfficiency(sortedByDistance);
|
||||||
return sortedByEfficiency.isEmpty() ? null : sortedByEfficiency.get(0).getKey();
|
List<Map.Entry<BlockPos, double[]>> sortedByPreviousBlocks = sortByPreviousBlocks(sortedByEfficiency);
|
||||||
|
return sortedByPreviousBlocks.isEmpty() ? null : sortedByPreviousBlocks.get(0).getKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Map.Entry<BlockPos, double[]>> sortByDistance(HashMap<BlockPos, double[]> blockMap) {
|
private List<Map.Entry<BlockPos, double[]>> sortByDistance(HashMap<BlockPos, double[]> blockMap) {
|
||||||
|
|
@ -290,6 +294,21 @@ public class BedAura extends Module {
|
||||||
return blockList;
|
return blockList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Map.Entry<BlockPos, double[]>> sortByPreviousBlocks(List<Map.Entry<BlockPos, double[]>> blockList) {
|
||||||
|
blockList.sort((entry1, entry2) -> {
|
||||||
|
boolean isEntry1Previous = entry1.getKey().equals(previousBlockBroken);
|
||||||
|
boolean isEntry2Previous = entry2.getKey().equals(previousBlockBroken);
|
||||||
|
if (isEntry1Previous && !isEntry2Previous) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (!isEntry1Previous && isEntry2Previous) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
return blockList;
|
||||||
|
}
|
||||||
|
|
||||||
private double getEfficiency(BlockPos pos) {
|
private double getEfficiency(BlockPos pos) {
|
||||||
Block block = BlockUtils.getBlock(pos);
|
Block block = BlockUtils.getBlock(pos);
|
||||||
ItemStack tool = (mode.getInput() == 2 && Utils.getTool(block) != -1) ? mc.thePlayer.inventory.getStackInSlot(Utils.getTool(block)) : mc.thePlayer.getHeldItem();
|
ItemStack tool = (mode.getInput() == 2 && Utils.getTool(block) != -1) ? mc.thePlayer.inventory.getStackInSlot(Utils.getTool(block)) : mc.thePlayer.getHeldItem();
|
||||||
|
|
@ -318,6 +337,7 @@ public class BedAura extends Module {
|
||||||
lastProgress = 0;
|
lastProgress = 0;
|
||||||
stopAutoblock = false;
|
stopAutoblock = false;
|
||||||
noAutoBlockTicks = 0;
|
noAutoBlockTicks = 0;
|
||||||
|
rotateLastBlock = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPacketSlot(int slot) {
|
public void setPacketSlot(int slot) {
|
||||||
|
|
@ -328,10 +348,16 @@ public class BedAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startBreak(BlockPos blockPos) {
|
private void startBreak(BlockPos blockPos) {
|
||||||
|
if (Raven.debug) {
|
||||||
|
Utils.sendModuleMessage(this, "sending c07 &astart &7break &7(&b" + mc.thePlayer.ticksExisted + "&7)");
|
||||||
|
}
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, blockPos, EnumFacing.UP));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, blockPos, EnumFacing.UP));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopBreak(BlockPos blockPos) {
|
private void stopBreak(BlockPos blockPos) {
|
||||||
|
if (Raven.debug) {
|
||||||
|
Utils.sendModuleMessage(this, "sending c07 &cstop &7break &7(&b" + mc.thePlayer.ticksExisted + "&7)");
|
||||||
|
}
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK, blockPos, EnumFacing.UP));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK, blockPos, EnumFacing.UP));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -387,6 +413,7 @@ public class BedAura extends Module {
|
||||||
setPacketSlot(Utils.getTool(block));
|
setPacketSlot(Utils.getTool(block));
|
||||||
}
|
}
|
||||||
stopBreak(blockPos);
|
stopBreak(blockPos);
|
||||||
|
previousBlockBroken = currentBlock;
|
||||||
reset(false);
|
reset(false);
|
||||||
Iterator<Map.Entry<BlockPos, Float>> iterator = breakProgressMap.entrySet().iterator();
|
Iterator<Map.Entry<BlockPos, Float>> iterator = breakProgressMap.entrySet().iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
|
|
@ -398,6 +425,8 @@ public class BedAura extends Module {
|
||||||
if (!disableBreakEffects.isToggled()) {
|
if (!disableBreakEffects.isToggled()) {
|
||||||
mc.playerController.onPlayerDestroyBlock(blockPos, EnumFacing.UP);
|
mc.playerController.onPlayerDestroyBlock(blockPos, EnumFacing.UP);
|
||||||
}
|
}
|
||||||
|
rotate = true;
|
||||||
|
rotateLastBlock = previousBlockBroken;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -410,11 +439,17 @@ public class BedAura extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
double progress = vanillaProgress = (float) (BlockUtils.getBlockHardness(block, (mode.getInput() == 2 && Utils.getTool(block) != -1) ? mc.thePlayer.inventory.getStackInSlot(Utils.getTool(block)) : mc.thePlayer.getHeldItem(), false, ignoreSlow.isToggled() || groundSpoof.isToggled()) * breakSpeed.getInput());
|
double progress = vanillaProgress = (float) (BlockUtils.getBlockHardness(block, (mode.getInput() == 2 && Utils.getTool(block) != -1) ? mc.thePlayer.inventory.getStackInSlot(Utils.getTool(block)) : mc.thePlayer.getHeldItem(), false, ignoreSlow.isToggled() || groundSpoof.isToggled()) * breakSpeed.getInput());
|
||||||
if (lastProgress != 0 && breakProgress >= lastProgress) {
|
if (lastProgress != 0 && breakProgress >= lastProgress - vanillaProgress) {
|
||||||
// tick before we break so here we've gotta stop autoblocking
|
// tick before we break so here we've gotta stop autoblocking
|
||||||
if (mode.getInput() == 2 && ModuleManager.killAura.autoBlockOverride()) {
|
if (mode.getInput() == 2 && ModuleManager.killAura.autoBlockOverride()) {
|
||||||
|
if (Raven.debug) {
|
||||||
|
Utils.sendModuleMessage(this, "&7stopping autoblock &7(&b" + mc.thePlayer.ticksExisted + "&7)");
|
||||||
|
}
|
||||||
stopAutoblock = true; // if blocking then return and stop autoblocking
|
stopAutoblock = true; // if blocking then return and stop autoblocking
|
||||||
}
|
}
|
||||||
|
if (breakProgress >= lastProgress) {
|
||||||
|
rotate = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
breakProgress += progress;
|
breakProgress += progress;
|
||||||
breakProgressMap.put(blockPos, breakProgress);
|
breakProgressMap.put(blockPos, breakProgress);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package keystrokesmod.module.impl.player;
|
package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
import keystrokesmod.event.PreMotionEvent;
|
import keystrokesmod.event.PreMotionEvent;
|
||||||
|
import keystrokesmod.event.PreUpdateEvent;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
|
|
@ -41,8 +42,8 @@ public class NoFall extends Module {
|
||||||
Utils.resetTimer();
|
Utils.resetTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
if (reset()) {
|
if (reset()) {
|
||||||
Utils.resetTimer();
|
Utils.resetTimer();
|
||||||
initialY = mc.thePlayer.posY;
|
initialY = mc.thePlayer.posY;
|
||||||
|
|
@ -57,13 +58,13 @@ public class NoFall extends Module {
|
||||||
double predictedY = mc.thePlayer.posY + mc.thePlayer.motionY;
|
double predictedY = mc.thePlayer.posY + mc.thePlayer.motionY;
|
||||||
double distanceFallen = initialY - predictedY;
|
double distanceFallen = initialY - predictedY;
|
||||||
edging = "";
|
edging = "";
|
||||||
if (mc.thePlayer.motionY >= -0.9) {
|
if (mc.thePlayer.motionY >= -1.1) {
|
||||||
dynamic = 3;
|
dynamic = 3;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.motionY < -0.9) {
|
if (mc.thePlayer.motionY < -1.1) {
|
||||||
dynamic = 3.5;
|
dynamic = 3.5;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.motionY < -1.7) {
|
if (mc.thePlayer.motionY < -1.8) {
|
||||||
dynamic = 4;
|
dynamic = 4;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.motionY < -2.4) {
|
if (mc.thePlayer.motionY < -2.4) {
|
||||||
|
|
@ -71,26 +72,32 @@ public class NoFall extends Module {
|
||||||
}
|
}
|
||||||
if (isFalling || mode.getInput() == 2) {
|
if (isFalling || mode.getInput() == 2) {
|
||||||
switch ((int) mode.getInput()) {
|
switch ((int) mode.getInput()) {
|
||||||
case 0:
|
|
||||||
e.setOnGround(true);
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
if (distanceFallen >= dynamic) {
|
if (distanceFallen >= dynamic) {
|
||||||
Utils.getTimer().timerSpeed = (float) 0.72;
|
Utils.getTimer().timerSpeed = (float) 0.72;
|
||||||
PacketUtils.sendPacketNoEvent(new C03PacketPlayer(true));
|
mc.getNetHandler().addToSendQueue(new C03PacketPlayer(true));
|
||||||
initialY = mc.thePlayer.posY;
|
initialY = mc.thePlayer.posY;
|
||||||
edging = "nofall packet";
|
edging = "nofall packet";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
|
||||||
e.setOnGround(false);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
edging += " " + dynamic;
|
edging += " " + dynamic;
|
||||||
//Utils.print("" + mc.thePlayer.ticksExisted + " " + mc.thePlayer.motionY + " " + edging);
|
//Utils.print("" + mc.thePlayer.ticksExisted + " " + mc.thePlayer.motionY + " " + edging);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
|
switch ((int) mode.getInput()) {
|
||||||
|
case 0:
|
||||||
|
e.setOnGround(true);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
e.setOnGround(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getInfo() {
|
public String getInfo() {
|
||||||
return modes[(int) mode.getInput()];
|
return modes[(int) mode.getInput()];
|
||||||
|
|
|
||||||
|
|
@ -1,107 +1,37 @@
|
||||||
package keystrokesmod.module.impl.player;
|
package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
import keystrokesmod.Raven;
|
|
||||||
import keystrokesmod.event.ReceivePacketEvent;
|
|
||||||
import keystrokesmod.event.SendPacketEvent;
|
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.utility.PacketUtils;
|
|
||||||
import keystrokesmod.utility.Utils;
|
|
||||||
import net.minecraft.network.INetHandler;
|
|
||||||
import net.minecraft.network.Packet;
|
|
||||||
import net.minecraft.network.play.client.C03PacketPlayer;
|
|
||||||
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
|
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
|
||||||
import net.minecraft.util.Vec3;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
|
|
||||||
public class NoRotate extends Module {
|
public class NoRotate extends Module {
|
||||||
private S08Info s08PacketData;
|
private float prevPitch = 0f;
|
||||||
private int receivedTick;
|
private float prevYaw = 0f;
|
||||||
|
|
||||||
private Packet sentPacket;
|
|
||||||
private Packet recievedPacket;
|
|
||||||
|
|
||||||
public NoRotate() {
|
public NoRotate() {
|
||||||
super("NoRotate", category.player);
|
super("NoRotate", category.player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
public void handlePlayerPosLookPre() {
|
||||||
public void onReceivePacket(ReceivePacketEvent e) {
|
if (!this.isEnabled()) {
|
||||||
if (e.getPacket() instanceof S08PacketPlayerPosLook && mc.thePlayer != null && ((S08PacketPlayerPosLook) e.getPacket()).getPitch() != 0) {
|
return;
|
||||||
if (e.getPacket() == recievedPacket) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
e.setCanceled(true);
|
|
||||||
S08PacketPlayerPosLook p = (S08PacketPlayerPosLook) e.getPacket();
|
|
||||||
recievedPacket = (new S08PacketPlayerPosLook(p.getX(), p.getY(), p.getZ(), mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, p.func_179834_f()));
|
|
||||||
//((S08PacketPlayerPosLook) recievedPacket).processPacket(mc.getNetHandler());
|
|
||||||
checkThreadAndEnqueue(recievedPacket);
|
|
||||||
s08PacketData = getPosAndRotation(p);
|
|
||||||
receivedTick = mc.thePlayer.ticksExisted;
|
|
||||||
}
|
}
|
||||||
|
if (mc.thePlayer == null || (mc.thePlayer.rotationPitch % 1 == 0f && mc.thePlayer.rotationYaw % 1 == 0f)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
prevPitch = mc.thePlayer.rotationPitch % 360;
|
||||||
|
prevYaw = mc.thePlayer.rotationYaw % 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
public void handlePlayerPosLook(S08PacketPlayerPosLook packet) {
|
||||||
public void onSendPacket(SendPacketEvent e) {
|
if (!this.isEnabled()) {
|
||||||
if (s08PacketData != null && mc.thePlayer != null && e.getPacket() instanceof C03PacketPlayer.C06PacketPlayerPosLook) {
|
return;
|
||||||
if (Utils.timeBetween(mc.thePlayer.ticksExisted, receivedTick) >= 3) {
|
|
||||||
s08PacketData = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (e.getPacket() == sentPacket) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
C03PacketPlayer.C06PacketPlayerPosLook p = (C03PacketPlayer.C06PacketPlayerPosLook) e.getPacket();
|
|
||||||
e.setCanceled(true);
|
|
||||||
sentPacket = (new C03PacketPlayer.C06PacketPlayerPosLook(p.getPositionX(), p.getPositionY(), p.getPositionZ(), s08PacketData.yaw, s08PacketData.pitch, p.isOnGround()));
|
|
||||||
mc.getNetHandler().addToSendQueue(sentPacket);
|
|
||||||
if (Raven.debug) {
|
|
||||||
Utils.sendModuleMessage(this, "&7spoofing c06 immediately.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
if (packet.getPitch() % 1.0f == 0.0f || mc.thePlayer == null) {
|
||||||
|
return;
|
||||||
public S08Info getPosAndRotation(final S08PacketPlayerPosLook packet) {
|
|
||||||
double x = packet.getX();
|
|
||||||
double y = packet.getY();
|
|
||||||
double z = packet.getZ();
|
|
||||||
float yaw = packet.getYaw();
|
|
||||||
float pitch = packet.getPitch();
|
|
||||||
if (packet.func_179834_f().contains(S08PacketPlayerPosLook.EnumFlags.X)) {
|
|
||||||
x += mc.thePlayer.posX;
|
|
||||||
}
|
|
||||||
if (packet.func_179834_f().contains(S08PacketPlayerPosLook.EnumFlags.Y)) {
|
|
||||||
y += mc.thePlayer.posY;
|
|
||||||
}
|
|
||||||
if (packet.func_179834_f().contains(S08PacketPlayerPosLook.EnumFlags.Z)) {
|
|
||||||
z += mc.thePlayer.posZ;
|
|
||||||
}
|
|
||||||
if (packet.func_179834_f().contains(S08PacketPlayerPosLook.EnumFlags.X_ROT)) {
|
|
||||||
pitch += mc.thePlayer.rotationPitch;
|
|
||||||
}
|
|
||||||
if (packet.func_179834_f().contains(S08PacketPlayerPosLook.EnumFlags.Y_ROT)) {
|
|
||||||
yaw += mc.thePlayer.rotationYaw;
|
|
||||||
}
|
|
||||||
return new S08Info(new Vec3(x, y, z), yaw, pitch);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends INetHandler> void checkThreadAndEnqueue(Packet<T> packet) {
|
|
||||||
if (!mc.isCallingFromMinecraftThread()) {
|
|
||||||
mc.addScheduledTask(() -> packet.processPacket((T) mc.getNetHandler()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class S08Info {
|
|
||||||
Vec3 position;
|
|
||||||
float yaw, pitch;
|
|
||||||
|
|
||||||
public S08Info(Vec3 position, float yaw, float pitch) {
|
|
||||||
this.position = position;
|
|
||||||
this.yaw = yaw;
|
|
||||||
this.pitch = pitch;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean samePos(Vec3 position) {
|
|
||||||
return this.position.xCoord == position.xCoord && this.position.yCoord == position.yCoord && this.position.zCoord == position.zCoord;
|
|
||||||
}
|
}
|
||||||
|
mc.thePlayer.prevRotationYaw = prevYaw;
|
||||||
|
mc.thePlayer.prevRotationPitch = prevPitch;
|
||||||
|
mc.thePlayer.rotationPitch = prevPitch;
|
||||||
|
mc.thePlayer.rotationYaw = prevYaw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@ public class Scaffold extends Module {
|
||||||
private int blockSlot = -1;
|
private int blockSlot = -1;
|
||||||
private boolean modifyPitch;
|
private boolean modifyPitch;
|
||||||
private boolean flipRotation;
|
private boolean flipRotation;
|
||||||
private long lastSwap;
|
private long lastSwap, lastSwap2;
|
||||||
|
|
||||||
private boolean floatJumped;
|
private boolean floatJumped;
|
||||||
private boolean floatStarted;
|
private boolean floatStarted;
|
||||||
|
|
@ -193,7 +193,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Float
|
//Float
|
||||||
if (sprint.getInput() == 2 && mc.thePlayer.motionY <= -0.0784 && !usingFastScaffold() && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.isEnabled()) {
|
if (sprint.getInput() == 2 && !usingFastScaffold() && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.isEnabled()) {
|
||||||
floatWasEnabled = true;
|
floatWasEnabled = true;
|
||||||
if (!floatStarted) {
|
if (!floatStarted) {
|
||||||
if (onGroundTicks > 8 && mc.thePlayer.onGround) {
|
if (onGroundTicks > 8 && mc.thePlayer.onGround) {
|
||||||
|
|
@ -240,35 +240,83 @@ public class Scaffold extends Module {
|
||||||
e.setYaw(blockRotations[0]);
|
e.setYaw(blockRotations[0]);
|
||||||
e.setPitch(blockRotations[1]);
|
e.setPitch(blockRotations[1]);
|
||||||
|
|
||||||
|
float yawBackwards = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
||||||
|
float main = MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw);
|
||||||
|
float mainOffset = MathHelper.wrapAngleTo180_float(yawBackwards - lastBlockYaw);
|
||||||
|
float mainOffset2 = MathHelper.wrapAngleTo180_float(yawBackwards - lastBlockYaw);
|
||||||
|
float minOffset = 25;
|
||||||
if (rotation.getInput() == 2) {
|
if (rotation.getInput() == 2) {
|
||||||
e.setYaw(offsetRotation());
|
if (blockRotations != null) {
|
||||||
|
lastBlockYaw = blockRotations[0];
|
||||||
float main = MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw);
|
if (!flipRotation) {
|
||||||
if (main >= 0) {
|
if (main >= 0) {
|
||||||
if (flipRotation) e.setYaw(offsetRotation() + (!Utils.scaffoldDiagonal(false) ? 244.625F : 274.625F));
|
//Utils.print("Main1");
|
||||||
//Utils.print("1 " + mainOffset);
|
if (mainOffset >= 0) mainOffset = 0;
|
||||||
}
|
if (mainOffset <= -minOffset) mainOffset = -minOffset;
|
||||||
else if (main <= -0) {
|
} else if (main <= -0) {
|
||||||
if (flipRotation) e.setYaw(offsetRotation() - (!Utils.scaffoldDiagonal(false) ? 244.625F : 274.625F));
|
//Utils.print("Main2");
|
||||||
//Utils.print("2 " + mainOffset);
|
if (mainOffset <= -0) mainOffset = -0;
|
||||||
}
|
if (mainOffset >= minOffset) mainOffset = minOffset;
|
||||||
if (System.currentTimeMillis() - lastSwap > 250) {
|
}
|
||||||
if (main >= 0 && mainOffset >= 0 && mainOffset <= 20 || main <= -0 && mainOffset <= -0 && mainOffset >= -20) {
|
|
||||||
flipRotation = true;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
flipRotation = false;
|
if (main >= 0) {
|
||||||
|
//Utils.print("Main1");
|
||||||
|
//Utils.print("1 " + mainOffset);
|
||||||
|
if (mainOffset <= -0) mainOffset2 = -0;
|
||||||
|
if (mainOffset >= minOffset) mainOffset2 = minOffset;
|
||||||
|
} else if (main <= -0) {
|
||||||
|
//Utils.print("Main2");
|
||||||
|
//Utils.print("2 " + mainOffset);
|
||||||
|
if (mainOffset >= 0) mainOffset2 = 0;
|
||||||
|
if (mainOffset <= -minOffset) mainOffset2 = -minOffset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lastSwap = System.currentTimeMillis();
|
|
||||||
//Utils.print("flip " + mainOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*if (e.getPitch() >= 50 && !ModuleManager.tower.canTower() && mc.thePlayer.motionY <= 0.42F) {
|
|
||||||
e.setPitch(e.getPitch() + 8);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
e.setPitch(e.getPitch() + 5);
|
lastBlockYaw = ((IAccessorEntityPlayerSP) mc.thePlayer).getLastReportedYaw();
|
||||||
|
if (main >= 0) {
|
||||||
|
mainOffset = -35;
|
||||||
|
}
|
||||||
|
else if (main <= -0) {
|
||||||
|
mainOffset = 35;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e.setYaw(offsetRotation());
|
||||||
|
if (main >= 0) {
|
||||||
|
if (flipRotation) {
|
||||||
|
e.setYaw(offsetRotation() + (!Utils.scaffoldDiagonal(false) ? straightRot * 2 : diagRot * 2));
|
||||||
|
//Utils.print("1 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (main <= -0) {
|
||||||
|
if (flipRotation) {
|
||||||
|
e.setYaw(offsetRotation() - (!Utils.scaffoldDiagonal(false) ? straightRot * 2 : diagRot * 2));
|
||||||
|
//Utils.print("2 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (System.currentTimeMillis() - lastSwap > 300) {
|
||||||
|
if (main >= 0 && mainOffset >= 0 || main <= -0 && mainOffset <= -0) {
|
||||||
|
flipRotation = true;
|
||||||
|
} else {
|
||||||
|
flipRotation = false;
|
||||||
|
}
|
||||||
|
lastSwap = System.currentTimeMillis();
|
||||||
|
//Utils.print("flip " + mainOffset);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!flipRotation) {
|
||||||
|
e.setYaw(e.getYaw() - mainOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/*if (main >= 0) {
|
||||||
|
e.setYaw(e.getYaw() - mainOffset2);
|
||||||
|
} else if (main <= -0) {
|
||||||
|
e.setYaw(e.getYaw() + mainOffset2);
|
||||||
}*/
|
}*/
|
||||||
|
e.setYaw(e.getYaw() - mainOffset2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rotation.getInput() == 1) {
|
if (rotation.getInput() == 1) {
|
||||||
|
|
@ -307,52 +355,21 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private float yaw;
|
private float yaw;
|
||||||
float newYaw;
|
|
||||||
float mainOffset;
|
|
||||||
|
|
||||||
boolean hasEdged;
|
float straightRot = 130.625F;
|
||||||
|
float diagRot = 136.625F;
|
||||||
|
|
||||||
private float offsetRotation() {
|
private float offsetRotation() {
|
||||||
float yawBackwards = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
|
||||||
float motionYaw = getMotionYaw();
|
|
||||||
float main = MathHelper.wrapAngleTo180_float(motionYaw - yaw);
|
|
||||||
|
|
||||||
if (blockRotations != null) {
|
|
||||||
lastBlockYaw = blockRotations[0];
|
|
||||||
mainOffset = MathHelper.wrapAngleTo180_float(yawBackwards - lastBlockYaw);
|
|
||||||
float minOffset = 28;
|
|
||||||
if (main >= 0) {
|
|
||||||
//Utils.print("Main1");
|
|
||||||
if (mainOffset >= 0) mainOffset = 0;
|
|
||||||
if (mainOffset <= -minOffset) mainOffset = -minOffset;
|
|
||||||
}
|
|
||||||
if (main <= -0) {
|
|
||||||
//Utils.print("Main2");
|
|
||||||
if (mainOffset <= -0) mainOffset = -0;
|
|
||||||
if (mainOffset >= minOffset) mainOffset = minOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
lastBlockYaw = ((IAccessorEntityPlayerSP) mc.thePlayer).getLastReportedYaw();
|
|
||||||
if (main >= 0) {
|
|
||||||
mainOffset = -25;
|
|
||||||
}
|
|
||||||
else if (main <= -0) {
|
|
||||||
mainOffset = 25;
|
|
||||||
}
|
|
||||||
lastSwap = System.currentTimeMillis();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Utils.isMoving() || Utils.getHorizontalSpeed(mc.thePlayer) == 0.0D) {
|
if (!Utils.isMoving() || Utils.getHorizontalSpeed(mc.thePlayer) == 0.0D) {
|
||||||
return yaw;
|
return yaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
float lastYaw = lastBlockYaw;
|
float newYaw = getMotionYaw() - (!Utils.scaffoldDiagonal(false) ? straightRot : diagRot) * Math.signum(
|
||||||
float newYaw = getMotionYaw() - (!Utils.scaffoldDiagonal(false) ? 128.625F : 138.625F) * Math.signum(
|
|
||||||
MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw)
|
MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw)
|
||||||
);
|
);
|
||||||
yaw = applyGcd(
|
yaw = applyGcd(
|
||||||
lastYaw + MathHelper.wrapAngleTo180_float(newYaw - lastYaw) - mainOffset
|
lastBlockYaw + MathHelper.wrapAngleTo180_float(newYaw - lastBlockYaw)
|
||||||
);
|
);
|
||||||
return yaw;
|
return yaw;
|
||||||
}
|
}
|
||||||
|
|
@ -410,7 +427,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disabledModule) {
|
if (disabledModule) {
|
||||||
if (ModuleManager.tower.canTower() && ModuleManager.tower.dCount == 0 || floatStarted) {
|
if (ModuleManager.tower.canTower() && (ModuleManager.tower.dCount == 0 || !Utils.isMoving()) || floatStarted) {
|
||||||
dontDisable = true;
|
dontDisable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -155,10 +155,8 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
slowTicks = 0;
|
slowTicks = 0;
|
||||||
}
|
}
|
||||||
if (towerMove.getInput() == 2) {
|
hasTowered = tower = firstJump = startedTowerInAir = setLowMotion = speed = false;
|
||||||
hasTowered = tower = firstJump = startedTowerInAir = setLowMotion = speed = false;
|
cMotionTicks = placeTicks = 0;
|
||||||
cMotionTicks = placeTicks = 0;
|
|
||||||
}
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
if (canTower() && !Utils.keysDown()) {
|
if (canTower() && !Utils.keysDown()) {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class Nametags extends Module {
|
||||||
|
|
||||||
public Nametags() {
|
public Nametags() {
|
||||||
super("Nametags", category.render, 0);
|
super("Nametags", category.render, 0);
|
||||||
this.registerSetting(scale = new SliderSetting("Scale", 1.0, 0.5, 5.0, 0.1));
|
this.registerSetting(scale = new SliderSetting("Scale", 1.0, 0.1, 5.0, 0.1));
|
||||||
this.registerSetting(autoScale = new ButtonSetting("Auto-scale", true));
|
this.registerSetting(autoScale = new ButtonSetting("Auto-scale", true));
|
||||||
this.registerSetting(drawBackground = new ButtonSetting("Draw background", true));
|
this.registerSetting(drawBackground = new ButtonSetting("Draw background", true));
|
||||||
this.registerSetting(onlyRenderName = new ButtonSetting("Only render name", false));
|
this.registerSetting(onlyRenderName = new ButtonSetting("Only render name", false));
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package keystrokesmod.module.setting.impl;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import keystrokesmod.module.setting.Setting;
|
||||||
|
import org.lwjgl.input.Keyboard;
|
||||||
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
|
public class KeySetting extends Setting {
|
||||||
|
private int key;
|
||||||
|
|
||||||
|
public KeySetting(String name, int key) {
|
||||||
|
super(name);
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getKey() {
|
||||||
|
return this.key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return super.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey(int key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPressed() {
|
||||||
|
if (this.getKey() == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.getKey() >= 1000) {
|
||||||
|
return Mouse.isButtonDown(this.getKey() - 1000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return Keyboard.isKeyDown(this.getKey());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadProfile(JsonObject data) {
|
||||||
|
if (data.has(getName()) && data.get(getName()).isJsonPrimitive()) {
|
||||||
|
int keyValue = this.key;
|
||||||
|
try {
|
||||||
|
keyValue = data.getAsJsonPrimitive(getName()).getAsInt();
|
||||||
|
}
|
||||||
|
catch (Exception ignored) {}
|
||||||
|
this.key = keyValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -81,25 +81,6 @@ public class ModuleUtils {
|
||||||
isBreakingTick = 0;
|
isBreakingTick = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ModuleManager.killAura.fixStates) {
|
|
||||||
if (!ModuleManager.killAura.isTargeting && ModuleManager.killAura.lag && !ModuleManager.scaffold.isEnabled) {
|
|
||||||
if (!Utils.holdingSword() && ModuleManager.killAura.swapped) {
|
|
||||||
PacketUtils.sendPacketNoEvent(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
|
|
||||||
ModuleManager.killAura.swapped = false;
|
|
||||||
} else {
|
|
||||||
if (Utils.holdingSword()) {
|
|
||||||
PacketUtils.sendPacketNoEvent(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
|
||||||
ModuleManager.killAura.swapped = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ModuleManager.killAura.swapped = false;
|
|
||||||
}
|
|
||||||
ModuleManager.killAura.fixStates = false;
|
|
||||||
ModuleManager.killAura.lag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ModuleManager.killAura.justUnTargeted) {
|
if (ModuleManager.killAura.justUnTargeted) {
|
||||||
if (++ModuleManager.killAura.unTargetTicks >= 2) {
|
if (++ModuleManager.killAura.unTargetTicks >= 2) {
|
||||||
ModuleManager.killAura.unTargetTicks = 0;
|
ModuleManager.killAura.unTargetTicks = 0;
|
||||||
|
|
@ -146,7 +127,7 @@ public class ModuleUtils {
|
||||||
}
|
}
|
||||||
if (ModuleManager.bhop.rotateYawOption.isToggled()) {
|
if (ModuleManager.bhop.rotateYawOption.isToggled()) {
|
||||||
if (ModuleManager.bhop.setRotation) {
|
if (ModuleManager.bhop.setRotation) {
|
||||||
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow()) {
|
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !ModuleManager.scaffold.isEnabled) {
|
||||||
float playerYaw = mc.thePlayer.rotationYaw;
|
float playerYaw = mc.thePlayer.rotationYaw;
|
||||||
e.setYaw(playerYaw -= 55);
|
e.setYaw(playerYaw -= 55);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,22 @@ public class Utils {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean holdingEdible(ItemStack stack) {
|
||||||
|
if (stack.getItem() instanceof ItemFood && mc.thePlayer.getFoodStats().getFoodLevel() == 20) {
|
||||||
|
ItemFood food = (ItemFood) stack.getItem();
|
||||||
|
boolean alwaysEdible = false;
|
||||||
|
try {
|
||||||
|
alwaysEdible = Reflection.alwaysEdible.getBoolean(food);
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Utils.sendMessage("&cError checking food edibility, check logs.");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return alwaysEdible;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean removeEnemy(String name) {
|
public static boolean removeEnemy(String name) {
|
||||||
if (enemies.remove(name.toLowerCase())) {
|
if (enemies.remove(name.toLowerCase())) {
|
||||||
Utils.sendMessage("&7Removed &cenemy&7: &b" + name);
|
Utils.sendMessage("&7Removed &cenemy&7: &b" + name);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import keystrokesmod.module.impl.render.HUD;
|
||||||
import keystrokesmod.module.impl.render.TargetHUD;
|
import keystrokesmod.module.impl.render.TargetHUD;
|
||||||
import keystrokesmod.module.setting.Setting;
|
import keystrokesmod.module.setting.Setting;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
import keystrokesmod.module.setting.impl.KeySetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.script.Manager;
|
import keystrokesmod.script.Manager;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
|
|
@ -95,9 +96,13 @@ public class ProfileManager {
|
||||||
for (Setting setting : module.getSettings()) {
|
for (Setting setting : module.getSettings()) {
|
||||||
if (setting instanceof ButtonSetting && !((ButtonSetting) setting).isMethodButton) {
|
if (setting instanceof ButtonSetting && !((ButtonSetting) setting).isMethodButton) {
|
||||||
moduleInformation.addProperty(setting.getName(), ((ButtonSetting) setting).isToggled());
|
moduleInformation.addProperty(setting.getName(), ((ButtonSetting) setting).isToggled());
|
||||||
} else if (setting instanceof SliderSetting) {
|
}
|
||||||
|
else if (setting instanceof SliderSetting) {
|
||||||
moduleInformation.addProperty(setting.getName(), ((SliderSetting) setting).getInput());
|
moduleInformation.addProperty(setting.getName(), ((SliderSetting) setting).getInput());
|
||||||
}
|
}
|
||||||
|
else if (setting instanceof KeySetting) {
|
||||||
|
moduleInformation.addProperty(setting.getName(), ((KeySetting) setting).getKey());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return moduleInformation;
|
return moduleInformation;
|
||||||
}
|
}
|
||||||
|
|
@ -308,4 +313,4 @@ public class ProfileManager {
|
||||||
public void failedMessage(String reason, String name) {
|
public void failedMessage(String reason, String name) {
|
||||||
Utils.sendMessage("&cFailed to " + reason + ": &b" + name);
|
Utils.sendMessage("&cFailed to " + reason + ": &b" + name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
"client.MixinWorld",
|
"client.MixinWorld",
|
||||||
"render.MixinGuiChat",
|
"render.MixinGuiChat",
|
||||||
"render.MixinGuiScreen",
|
"render.MixinGuiScreen",
|
||||||
"entity.IAccessorEntityPlayerSP"
|
"entity.IAccessorEntityPlayerSP",
|
||||||
|
"network.MixinNetHandlerPlayClient"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue