make nobreakanimation compatible

This commit is contained in:
Bella 2020-02-11 12:00:22 -05:00
parent 2ecf19d397
commit 17f96b1019
4 changed files with 14 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import com.mojang.realmsclient.gui.ChatFormatting;
import me.zeroeightsix.kami.command.Command;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.module.ModuleManager;
import me.zeroeightsix.kami.module.modules.player.NoBreakAnimation;
import me.zeroeightsix.kami.setting.Setting;
import me.zeroeightsix.kami.setting.Settings;
import me.zeroeightsix.kami.util.BlockInteractionHelper;
@ -261,6 +262,9 @@ public class AutoFeetPlace extends Module {
mc.player.swingArm(EnumHand.MAIN_HAND);
mc.rightClickDelayTimer = 4;
if (ModuleManager.getModuleByName("NoBreakAnimation").isEnabled()) {
((NoBreakAnimation) ModuleManager.getModuleByName("NoBreakAnimation")).resetMining();
}
return true;
}

View File

@ -4,6 +4,7 @@ import com.mojang.realmsclient.gui.ChatFormatting;
import me.zeroeightsix.kami.command.Command;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.module.ModuleManager;
import me.zeroeightsix.kami.module.modules.player.NoBreakAnimation;
import me.zeroeightsix.kami.setting.Setting;
import me.zeroeightsix.kami.setting.Settings;
import me.zeroeightsix.kami.util.BlockInteractionHelper;
@ -291,6 +292,10 @@ public class AutoTrap extends Module {
mc.player.connection.sendPacket(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, neighbour, opposite));
}
if (ModuleManager.getModuleByName("NoBreakAnimation").isEnabled()) {
((NoBreakAnimation) ModuleManager.getModuleByName("NoBreakAnimation")).resetMining();
}
return true;
}

View File

@ -3,6 +3,7 @@ package me.zeroeightsix.kami.module.modules.combat;
import me.zeroeightsix.kami.command.Command;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.module.ModuleManager;
import me.zeroeightsix.kami.module.modules.player.NoBreakAnimation;
import me.zeroeightsix.kami.setting.Setting;
import me.zeroeightsix.kami.setting.Settings;
import me.zeroeightsix.kami.util.BlockInteractionHelper;
@ -198,6 +199,9 @@ public class Surround extends Module {
mc.player.connection.sendPacket(new CPacketAnimation(mc.player.getActiveHand()));
placeBlockExecute(blockPos);
}
if (ModuleManager.getModuleByName("NoBreakAnimation").isEnabled()) {
((NoBreakAnimation) ModuleManager.getModuleByName("NoBreakAnimation")).resetMining();
}
}
private int findObiInHotbar() {

View File

@ -67,7 +67,7 @@ public class NoBreakAnimation extends Module {
this.lastFacing = lastFacing;
}
public void resetMining() { // TODO: call in autofeetplace and autotrap when they are merged
public void resetMining() {
isMining = false;
lastPos = null;
lastFacing = null;