0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Fix AutoMine stopping whenever you open a screen

Fixes #1029
This commit is contained in:
Alexander01998 2024-06-26 11:11:30 +02:00
parent 9b79865cbc
commit 76ec389f00

View File

@ -9,6 +9,7 @@ package net.wurstclient.hacks;
import net.minecraft.block.BlockState;
import net.minecraft.client.network.ClientPlayerInteractionManager;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
@ -53,11 +54,8 @@ public final class AutoMineHack extends Hack implements UpdateListener
{
ClientPlayerInteractionManager im = MC.interactionManager;
if(MC.attackCooldown > 0)
{
im.cancelBlockBreaking();
return;
}
// Ignore the attack cooldown because opening any screen
// will set it to 10k ticks.
if(MC.player.isRiding())
{
@ -91,6 +89,7 @@ public final class AutoMineHack extends Hack implements UpdateListener
if(im.updateBlockBreakingProgress(pos, side))
{
MC.particleManager.addBlockBreakingParticles(pos, side);
MC.player.swingHand(Hand.MAIN_HAND);
MC.options.attackKey.setPressed(true);
}
}