Fix ShieldBypass unable to perform criticals and stuck in blocks (#275)
Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com>
This commit is contained in:
@@ -45,7 +45,7 @@ public class AutoSignMixin extends Module {
|
||||
super(category, name, description);
|
||||
}
|
||||
|
||||
@Inject(method = "onOpenScreen",at = @At("HEAD"))
|
||||
@Inject(method = "onOpenScreen",at = @At(value = "INVOKE", target = "Lmeteordevelopment/meteorclient/mixin/AbstractSignEditScreenAccessor;getSign()Lnet/minecraft/block/entity/SignBlockEntity;"))
|
||||
private void beforeGetSign(OpenScreenEvent event, CallbackInfo info) {
|
||||
if (random.get()) {
|
||||
text = new String[4];
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package anticope.rejects.mixin.meteor.modules;
|
||||
|
||||
import anticope.rejects.modules.ShieldBypass;
|
||||
import anticope.rejects.utils.RejectsUtils;
|
||||
import meteordevelopment.meteorclient.events.Cancellable;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
import meteordevelopment.meteorclient.settings.*;
|
||||
import meteordevelopment.meteorclient.systems.modules.Category;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import meteordevelopment.meteorclient.systems.modules.combat.KillAura;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
@@ -37,9 +40,6 @@ public class KillAuraMixin extends Module {
|
||||
@Shadow
|
||||
@Final
|
||||
private Setting<Boolean> customDelay;
|
||||
@Shadow
|
||||
@Final
|
||||
private Setting<Integer> hitDelay;
|
||||
|
||||
private final Random random = new Random();
|
||||
private Setting<Double> fov;
|
||||
@@ -123,6 +123,19 @@ public class KillAuraMixin extends Module {
|
||||
hitTimer -= random.nextInt(randomDelayMax.get());
|
||||
}
|
||||
|
||||
@Inject(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;attackEntity(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/Entity;)V"), cancellable = true)
|
||||
private void onHit(Entity target, CallbackInfo info) {
|
||||
ShieldBypass shieldBypass = Modules.get().get(ShieldBypass.class);
|
||||
if (shieldBypass.isActive()) {
|
||||
Cancellable dummyEvent = new Cancellable();
|
||||
shieldBypass.bypass(target, dummyEvent);
|
||||
if (dummyEvent.isCancelled()) {
|
||||
hitTimer = 0;
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private double randomOffset() {
|
||||
return Math.random() * 4 - 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user