diff --git a/bin/main/callback.html b/bin/main/callback.html
new file mode 100644
index 00000000..ad541ea1
--- /dev/null
+++ b/bin/main/callback.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+ Close this window and return to Minecraft!
+
+
+
+
+
+
+ Close this window and return to Minecraft!
+
+
+
+
\ No newline at end of file
diff --git a/bin/main/mcmod.info b/bin/main/mcmod.info
new file mode 100644
index 00000000..7f2251d1
--- /dev/null
+++ b/bin/main/mcmod.info
@@ -0,0 +1,10 @@
+[
+ {
+ "name": "Myau",
+ "version": "${version}",
+ "mcversion": "1.8.9",
+ "authorList": [
+ "ksyz"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/bin/main/mixins.myau.json b/bin/main/mixins.myau.json
new file mode 100644
index 00000000..e7993545
--- /dev/null
+++ b/bin/main/mixins.myau.json
@@ -0,0 +1,7 @@
+{
+ "package": "${basePackage}.mixin",
+ "plugin": "${basePackage}.init.FMLLoadingPlugin",
+ "refmap": "mixins.${modid}.refmap.json",
+ "minVersion": "0.7",
+ "compatibilityLevel": "JAVA_8"
+}
diff --git a/bin/main/ssl.jks b/bin/main/ssl.jks
new file mode 100644
index 00000000..0286754e
Binary files /dev/null and b/bin/main/ssl.jks differ
diff --git a/bin/main/version.json b/bin/main/version.json
new file mode 100644
index 00000000..3e640ab7
--- /dev/null
+++ b/bin/main/version.json
@@ -0,0 +1,3 @@
+{
+ "version": "${version}"
+}
\ No newline at end of file
diff --git a/src/main/java/myau/Myau.java b/src/main/java/myau/Myau.java
index a9301345..6cbeac9e 100644
--- a/src/main/java/myau/Myau.java
+++ b/src/main/java/myau/Myau.java
@@ -69,6 +69,7 @@ public void init() {
moduleManager.modules.put(AutoAnduril.class, new AutoAnduril());
moduleManager.modules.put(AutoHeal.class, new AutoHeal());
moduleManager.modules.put(AutoTool.class, new AutoTool());
+ moduleManager.modules.put(Backtrack.class, new Backtrack());
moduleManager.modules.put(BedNuker.class, new BedNuker());
moduleManager.modules.put(BedESP.class, new BedESP());
moduleManager.modules.put(BedTracker.class, new BedTracker());
@@ -76,8 +77,10 @@ public void init() {
moduleManager.modules.put(Chams.class, new Chams());
moduleManager.modules.put(ChestESP.class, new ChestESP());
moduleManager.modules.put(ChestStealer.class, new ChestStealer());
+ moduleManager.modules.put(Clutch.class, new Clutch());
moduleManager.modules.put(Eagle.class, new Eagle());
moduleManager.modules.put(ESP.class, new ESP());
+ moduleManager.modules.put(FakeLag.class, new FakeLag());
moduleManager.modules.put(FastPlace.class, new FastPlace());
moduleManager.modules.put(Freeze.class, new Freeze());
moduleManager.modules.put(Fly.class, new Fly());
@@ -120,6 +123,7 @@ public void init() {
moduleManager.modules.put(Sprint.class, new Sprint());
moduleManager.modules.put(TargetHUD.class, new TargetHUD());
moduleManager.modules.put(TargetStrafe.class, new TargetStrafe());
+ moduleManager.modules.put(Timer.class, new Timer());
moduleManager.modules.put(Tracers.class, new Tracers());
moduleManager.modules.put(Trajectories.class, new Trajectories());
moduleManager.modules.put(Velocity.class, new Velocity());
diff --git a/src/main/java/myau/mixin/IAccessorMinecraft.java b/src/main/java/myau/mixin/IAccessorMinecraft.java
index 87b1f9c1..1c373fbb 100644
--- a/src/main/java/myau/mixin/IAccessorMinecraft.java
+++ b/src/main/java/myau/mixin/IAccessorMinecraft.java
@@ -7,6 +7,7 @@
import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
+import org.spongepowered.asm.mixin.gen.Invoker;
@SideOnly(Side.CLIENT)
@Mixin({Minecraft.class})
@@ -22,4 +23,13 @@ public interface IAccessorMinecraft {
@Accessor("rightClickDelayTimer")
void setRightClickDelayTimer(int integer);
-}
+
+ @Accessor("leftClickCounter")
+ void setLeftClickCounter(int value);
+
+ @Invoker("clickMouse")
+ void callClickMouse();
+
+ @Invoker("rightClickMouse")
+ void callRightClickMouse();
+}
\ No newline at end of file
diff --git a/src/main/java/myau/mixin/MixinEntityPlayerSP.java b/src/main/java/myau/mixin/MixinEntityPlayerSP.java
index 4a39be73..00454e02 100644
--- a/src/main/java/myau/mixin/MixinEntityPlayerSP.java
+++ b/src/main/java/myau/mixin/MixinEntityPlayerSP.java
@@ -10,6 +10,7 @@
import myau.management.RotationState;
import myau.module.modules.AntiDebuff;
import myau.module.modules.NoSlow;
+import myau.module.modules.Timer;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.potion.Potion;
import net.minecraft.util.BlockPos;
@@ -44,6 +45,20 @@ public abstract class MixinEntityPlayerSP extends MixinEntityPlayer {
@Shadow
public float prevRenderArmYaw;
+ @Inject(
+ method = {"onUpdate"},
+ at = {@At("HEAD")},
+ cancellable = true
+ )
+ private void freezeUpdate(CallbackInfo callbackInfo) {
+ Timer timer = Myau.moduleManager != null
+ ? (Timer) Myau.moduleManager.modules.get(Timer.class)
+ : null;
+ if (timer != null && timer.isFreezing()) {
+ callbackInfo.cancel();
+ }
+ }
+
@Inject(
method = {"onUpdate"},
at = {@At("HEAD")}
@@ -164,4 +179,4 @@ private boolean checkPotion(EntityPlayerSP entityPlayerSP, Potion potion) {
}
return ((IAccessorEntityLivingBase) entityPlayerSP).getActivePotionsMap().containsKey(potion.id);
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/myau/mixin/MixinMinecraft.java b/src/main/java/myau/mixin/MixinMinecraft.java
index f6fa618a..e612334e 100644
--- a/src/main/java/myau/mixin/MixinMinecraft.java
+++ b/src/main/java/myau/mixin/MixinMinecraft.java
@@ -94,13 +94,16 @@ private void updateFramebufferSize(CallbackInfo callbackInfo) {
cancellable = true
)
private void clickMouse(CallbackInfo callbackInfo) {
- if (Myau.moduleManager != null && Myau.moduleManager.modules.get(NoHitDelay.class).isEnabled()) {
- this.leftClickCounter = 0;
- }
- LeftClickMouseEvent event = new LeftClickMouseEvent();
- EventManager.call(event);
- if (event.isCancelled()) {
- callbackInfo.cancel();
+ // Only fire event when actually clicking (not on cooldown)
+ if (this.leftClickCounter <= 0) {
+ if (Myau.moduleManager != null && Myau.moduleManager.modules.get(NoHitDelay.class).isEnabled()) {
+ this.leftClickCounter = 0;
+ }
+ LeftClickMouseEvent event = new LeftClickMouseEvent();
+ EventManager.call(event);
+ if (event.isCancelled()) {
+ callbackInfo.cancel();
+ }
}
}
@@ -110,10 +113,14 @@ private void clickMouse(CallbackInfo callbackInfo) {
cancellable = true
)
private void rightClickMouse(CallbackInfo callbackInfo) {
- RightClickMouseEvent event = new RightClickMouseEvent();
- EventManager.call(event);
- if (event.isCancelled()) {
- callbackInfo.cancel();
+ // Only fire event when actually clicking (not on cooldown)
+ IAccessorMinecraft accessor = (IAccessorMinecraft) this;
+ if (accessor.getRightClickDelayTimer() <= 0) {
+ RightClickMouseEvent event = new RightClickMouseEvent();
+ EventManager.call(event);
+ if (event.isCancelled()) {
+ callbackInfo.cancel();
+ }
}
}
@@ -159,4 +166,4 @@ private void changeCurrentItem(InventoryPlayer inventoryPlayer, int slot) {
inventoryPlayer.changeCurrentItem(slot);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/myau/mixin/MixinTimer.java b/src/main/java/myau/mixin/MixinTimer.java
new file mode 100644
index 00000000..e7061ea4
--- /dev/null
+++ b/src/main/java/myau/mixin/MixinTimer.java
@@ -0,0 +1,26 @@
+package myau.mixin;
+
+import net.minecraft.util.Timer;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@SideOnly(Side.CLIENT)
+@Mixin(value = {Timer.class}, priority = 9999)
+public abstract class MixinTimer {
+
+ @Shadow
+ public float timerSpeed;
+
+ @Inject(
+ method = {"updateTimer"},
+ at = @At("HEAD")
+ )
+ private void updateTimer(CallbackInfo ci) {
+ this.timerSpeed = myau.module.modules.Timer.getRequestedSpeed();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/myau/module/modules/Backtrack.java b/src/main/java/myau/module/modules/Backtrack.java
new file mode 100644
index 00000000..f3ae6cc7
--- /dev/null
+++ b/src/main/java/myau/module/modules/Backtrack.java
@@ -0,0 +1,363 @@
+package myau.module.modules;
+
+import myau.Myau;
+import myau.event.EventTarget;
+import myau.event.types.EventType;
+import myau.event.types.Priority;
+import myau.events.AttackEvent;
+import myau.events.PacketEvent;
+import myau.events.Render3DEvent;
+import myau.events.TickEvent;
+import myau.mixin.IAccessorRenderManager;
+import myau.module.Module;
+import myau.property.properties.BooleanProperty;
+import myau.property.properties.FloatProperty;
+import myau.property.properties.IntProperty;
+import myau.util.RenderUtil;
+import myau.util.RotationUtil;
+import myau.util.TeamUtil;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.Packet;
+import net.minecraft.network.play.server.S12PacketEntityVelocity;
+import net.minecraft.network.play.server.S14PacketEntity;
+import net.minecraft.network.play.server.S18PacketEntityTeleport;
+import net.minecraft.network.play.server.S19PacketEntityHeadLook;
+import net.minecraft.network.play.server.S0FPacketSpawnMob;
+import net.minecraft.network.play.server.S27PacketExplosion;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+public class Backtrack extends Module {
+
+ private static final Minecraft mc = Minecraft.getMinecraft();
+
+ public final FloatProperty range;
+ public final BooleanProperty adaptive;
+ public final IntProperty normalDelay;
+ public final IntProperty adaptiveDelay;
+ public final BooleanProperty releaseOnHit;
+ public final BooleanProperty interruptLagRange;
+ public final BooleanProperty players;
+ public final BooleanProperty teams;
+ public final BooleanProperty botCheck;
+ public final BooleanProperty esp;
+
+ private final ConcurrentLinkedQueue> incomingQueue = new ConcurrentLinkedQueue<>();
+
+ private Vec3 trackedPosition = null;
+ private EntityLivingBase target;
+ private EntityLivingBase lastAttacked;
+ private long lastAttackTime = 0L;
+ private static final long COMBAT_LOCK_MS = 3000L;
+ private AxisAlignedBB realAABB;
+ private long backtrackStartTime = 0L;
+ private boolean lagRangeInterrupted = false;
+
+ public Backtrack() {
+ super("Backtrack", false);
+ this.range = new FloatProperty("range", 3.5F, 1.0F, 8.0F);
+ this.adaptive = new BooleanProperty("adaptive", true);
+ this.normalDelay = new IntProperty("normal-delay", 100, 50, 1000, () -> !this.adaptive.getValue());
+ this.adaptiveDelay = new IntProperty("adaptive-delay", 100, 50, 1000, this.adaptive::getValue);
+ this.releaseOnHit = new BooleanProperty("release-on-hit", true);
+ this.interruptLagRange = new BooleanProperty("interrupt-lagrange", true);
+ this.players = new BooleanProperty("players", true);
+ this.teams = new BooleanProperty("teams", true);
+ this.botCheck = new BooleanProperty("bot-check", true);
+ this.esp = new BooleanProperty("esp", true);
+ }
+
+ @Override
+ public void onEnabled() {
+ incomingQueue.clear();
+ trackedPosition = null;
+ realAABB = null;
+ backtrackStartTime = 0L;
+ target = null;
+ lastAttacked = null;
+ lastAttackTime = 0L;
+ lagRangeInterrupted = false;
+ }
+
+ @Override
+ public void onDisabled() {
+ setLagRangeEnabled(true);
+ releaseIncoming();
+ incomingQueue.clear();
+ trackedPosition = null;
+ realAABB = null;
+ target = null;
+ lastAttacked = null;
+ lastAttackTime = 0L;
+ }
+
+ private int currentMaxDelay() {
+ return adaptive.getValue() ? adaptiveDelay.getValue() : normalDelay.getValue();
+ }
+
+ private LagRange getLagRange() {
+ Module m = Myau.moduleManager.getModule(LagRange.class);
+ return (m instanceof LagRange) ? (LagRange) m : null;
+ }
+
+ private void setLagRangeEnabled(boolean enabled) {
+ if (!interruptLagRange.getValue()) return;
+ LagRange lr = getLagRange();
+ if (lr == null) return;
+ if (enabled && lagRangeInterrupted) {
+ lagRangeInterrupted = false;
+ lr.setEnabled(true);
+ } else if (!enabled && !lagRangeInterrupted && lr.isEnabled()) {
+ lagRangeInterrupted = true;
+ lr.setEnabled(false);
+ }
+ }
+
+ private boolean isInCombat() {
+ if (lastAttacked == null || lastAttacked != target || lastAttacked.isDead) return false;
+ return System.currentTimeMillis() - lastAttackTime <= COMBAT_LOCK_MS;
+ }
+
+ private boolean canBacktrack() {
+ if (target == null || target.isDead) return false;
+ if (trackedPosition == null) return false;
+ if (distanceTo(trackedPosition) > range.getValue()) return false;
+ if (backtrackStartTime > 0 && System.currentTimeMillis() - backtrackStartTime > currentMaxDelay()) return false;
+ double distReal = distanceTo(trackedPosition);
+ double distCurrent = mc.thePlayer.getDistanceToEntity(target);
+ return adaptive.getValue() ? distReal > distCurrent : distReal > distCurrent + 0.1;
+ }
+
+ private boolean shouldQueueIncoming(Packet> p) {
+ if (p instanceof S12PacketEntityVelocity) return false;
+ if (p instanceof S27PacketExplosion) return false;
+ if (p instanceof S0FPacketSpawnMob) return false;
+ if (p instanceof S14PacketEntity) {
+ Entity e = ((S14PacketEntity) p).getEntity(mc.theWorld);
+ return e != null && e == target;
+ }
+ if (p instanceof S18PacketEntityTeleport) return ((S18PacketEntityTeleport) p).getEntityId() == target.getEntityId();
+ if (p instanceof S19PacketEntityHeadLook) return ((S19PacketEntityHeadLook) p).getEntity(mc.theWorld) == target;
+ return false;
+ }
+
+ private void releaseIncoming() {
+ if (mc.getNetHandler() == null) return;
+ Packet> p;
+ while ((p = incomingQueue.poll()) != null) processPacketUnchecked(p);
+ backtrackStartTime = 0L;
+ }
+
+ @SuppressWarnings("unchecked")
+ private static void processPacketUnchecked(Packet packet) {
+ packet.processPacket((T) Minecraft.getMinecraft().getNetHandler());
+ }
+
+ private void releaseAll() {
+ releaseIncoming();
+ }
+
+ private void updateRealPosition(Packet> packet) {
+ if (target == null) return;
+
+ if (packet instanceof S14PacketEntity) {
+ S14PacketEntity p = (S14PacketEntity) packet;
+ Entity e = p.getEntity(mc.theWorld);
+ if (e == null || e != target) return;
+
+ Vec3 base = (trackedPosition != null) ? trackedPosition
+ : new Vec3(target.posX, target.posY, target.posZ);
+
+ double dx = p.func_149062_c() / 32.0;
+ double dy = p.func_149061_d() / 32.0;
+ double dz = p.func_149064_e() / 32.0;
+ trackedPosition = base.addVector(dx, dy, dz);
+
+ } else if (packet instanceof S18PacketEntityTeleport) {
+ S18PacketEntityTeleport p = (S18PacketEntityTeleport) packet;
+ if (p.getEntityId() != target.getEntityId()) return;
+
+ trackedPosition = new Vec3(p.getX() / 32.0, p.getY() / 32.0, p.getZ() / 32.0);
+ }
+
+ if (trackedPosition != null) {
+ double hw = target.width / 2.0;
+ realAABB = new AxisAlignedBB(
+ trackedPosition.xCoord - hw, trackedPosition.yCoord,
+ trackedPosition.zCoord - hw,
+ trackedPosition.xCoord + hw, trackedPosition.yCoord + target.height,
+ trackedPosition.zCoord + hw
+ );
+ }
+ }
+
+ @EventTarget
+ public void onAttack(AttackEvent event) {
+ if (!isEnabled() || mc.thePlayer == null) return;
+ if (event.getTarget() instanceof EntityLivingBase) {
+ lastAttacked = (EntityLivingBase) event.getTarget();
+ lastAttackTime = System.currentTimeMillis();
+ }
+ }
+
+ @EventTarget
+ public void onPacket(PacketEvent event) {
+ if (!isEnabled() || mc.thePlayer == null || mc.theWorld == null) return;
+ Module scaffold = Myau.moduleManager.getModule(Scaffold.class);
+ if (scaffold != null && scaffold.isEnabled()) {
+ setLagRangeEnabled(true);
+ releaseAll();
+ incomingQueue.clear();
+ return;
+ }
+ if (event.getType() == EventType.RECEIVE) {
+ handleIncoming(event);
+ }
+ }
+
+ private void handleIncoming(PacketEvent event) {
+ Packet> packet = event.getPacket();
+ updateRealPosition(packet);
+ if (target == null) return;
+ if (canBacktrack() && shouldQueueIncoming(packet)) {
+ if (backtrackStartTime == 0L) backtrackStartTime = System.currentTimeMillis();
+ incomingQueue.add(packet);
+ event.setCancelled(true);
+ } else if (!canBacktrack() && !incomingQueue.isEmpty()) {
+ releaseIncoming();
+ }
+ }
+
+ @EventTarget(Priority.LOW)
+ public void onTick(TickEvent event) {
+ if (!isEnabled() || mc.thePlayer == null || mc.theWorld == null) return;
+ if (event.getType() == EventType.PRE) tickPre();
+ }
+
+ private void tickPre() {
+ EntityLivingBase newTarget = resolveTarget();
+ if (newTarget != target) {
+ setLagRangeEnabled(true);
+ releaseAll();
+ realAABB = null;
+ trackedPosition = null;
+ }
+ target = newTarget;
+
+ if (target == null) {
+ setLagRangeEnabled(true);
+ return;
+ }
+
+ if (trackedPosition == null) {
+ trackedPosition = new Vec3(
+ MathHelper.floor_double(target.posX * 32.0) / 32.0,
+ MathHelper.floor_double(target.posY * 32.0) / 32.0,
+ MathHelper.floor_double(target.posZ * 32.0) / 32.0
+ );
+ double hw = target.width / 2.0;
+ realAABB = new AxisAlignedBB(
+ trackedPosition.xCoord - hw, trackedPosition.yCoord,
+ trackedPosition.zCoord - hw,
+ trackedPosition.xCoord + hw, trackedPosition.yCoord + target.height,
+ trackedPosition.zCoord + hw
+ );
+ }
+
+ boolean shouldRelease = false;
+ if (mc.thePlayer.hurtTime == mc.thePlayer.maxHurtTime && mc.thePlayer.maxHurtTime > 0) shouldRelease = true;
+ if (distanceTo(trackedPosition) > range.getValue()) shouldRelease = true;
+ if (backtrackStartTime > 0 && System.currentTimeMillis() - backtrackStartTime > currentMaxDelay()) shouldRelease = true;
+ if (releaseOnHit.getValue() && target.hurtTime == 1) shouldRelease = true;
+
+ if (shouldRelease) {
+ setLagRangeEnabled(true);
+ releaseAll();
+ return;
+ }
+
+ if (isInCombat() && !incomingQueue.isEmpty()) {
+ setLagRangeEnabled(false);
+ } else if (!isInCombat() || incomingQueue.isEmpty()) {
+ setLagRangeEnabled(true);
+ }
+ }
+
+ @EventTarget(Priority.HIGH)
+ public void onRender3D(Render3DEvent event) {
+ if (!isEnabled() || !esp.getValue()) return;
+ if (target == null || realAABB == null) return;
+ AxisAlignedBB visual = target.getEntityBoundingBox();
+ double dx = realAABB.minX - visual.minX;
+ double dy = realAABB.minY - visual.minY;
+ double dz = realAABB.minZ - visual.minZ;
+ if (Math.abs(dx) < 0.01 && Math.abs(dy) < 0.01 && Math.abs(dz) < 0.01) return;
+ Color color = (target instanceof EntityPlayer)
+ ? TeamUtil.getTeamColor((EntityPlayer) target, 1.0F)
+ : new Color(255, 60, 60);
+ IAccessorRenderManager rm = (IAccessorRenderManager) mc.getRenderManager();
+ AxisAlignedBB aabb = new AxisAlignedBB(
+ realAABB.minX - rm.getRenderPosX(),
+ realAABB.minY - rm.getRenderPosY(),
+ realAABB.minZ - rm.getRenderPosZ(),
+ realAABB.maxX - rm.getRenderPosX(),
+ realAABB.maxY - rm.getRenderPosY(),
+ realAABB.maxZ - rm.getRenderPosZ()
+ );
+ RenderUtil.enableRenderState();
+ RenderUtil.drawFilledBox(aabb, color.getRed(), color.getGreen(), color.getBlue());
+ RenderUtil.disableRenderState();
+ }
+
+ private EntityLivingBase resolveTarget() {
+ KillAura ka = (KillAura) Myau.moduleManager.modules.get(KillAura.class);
+ if (ka != null && ka.isEnabled() && ka.getTarget() != null) return ka.getTarget();
+ if (lastAttacked != null && !lastAttacked.isDead
+ && System.currentTimeMillis() - lastAttackTime <= COMBAT_LOCK_MS
+ && mc.thePlayer.getDistanceToEntity(lastAttacked) <= range.getValue() * 2.0F) {
+ return lastAttacked;
+ }
+ ArrayList candidates = new ArrayList<>();
+ for (Entity entity : mc.theWorld.loadedEntityList) {
+ if (!(entity instanceof EntityLivingBase)) continue;
+ EntityLivingBase e = (EntityLivingBase) entity;
+ if (isValidTarget(e) && mc.thePlayer.getDistanceToEntity(e) <= range.getValue()) candidates.add(e);
+ }
+ if (candidates.isEmpty()) return null;
+ candidates.sort((a, b) -> Float.compare(RotationUtil.angleToEntity(a), RotationUtil.angleToEntity(b)));
+ return candidates.get(0);
+ }
+
+ private boolean isValidTarget(EntityLivingBase e) {
+ if (!mc.theWorld.loadedEntityList.contains(e)) return false;
+ if (e == mc.thePlayer || e == mc.thePlayer.ridingEntity) return false;
+ if (e == mc.getRenderViewEntity() || e == mc.getRenderViewEntity().ridingEntity) return false;
+ if (e.deathTime > 0) return false;
+ if (e instanceof EntityPlayer) {
+ if (!players.getValue()) return false;
+ EntityPlayer p = (EntityPlayer) e;
+ if (TeamUtil.isFriend(p)) return false;
+ if (teams.getValue() && TeamUtil.isSameTeam(p)) return false;
+ if (botCheck.getValue() && TeamUtil.isBot(p)) return false;
+ return true;
+ }
+ return false;
+ }
+
+ private double distanceTo(Vec3 v) {
+ return mc.thePlayer.getDistance(v.xCoord, v.yCoord, v.zCoord);
+ }
+
+ @Override
+ public String[] getSuffix() {
+ return new String[]{ currentMaxDelay() + "ms" };
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/myau/module/modules/BedESP.java b/src/main/java/myau/module/modules/BedESP.java
index 1a417241..a31e66c6 100644
--- a/src/main/java/myau/module/modules/BedESP.java
+++ b/src/main/java/myau/module/modules/BedESP.java
@@ -9,9 +9,8 @@
import myau.property.properties.*;
import myau.property.properties.BooleanProperty;
import myau.property.properties.ModeProperty;
-import net.minecraft.block.BlockBed;
+import net.minecraft.block.*;
import net.minecraft.block.BlockBed.EnumPartType;
-import net.minecraft.block.BlockObsidian;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.util.AxisAlignedBB;
@@ -30,6 +29,9 @@ public class BedESP extends Module {
public final ColorProperty customColor;
public final PercentProperty opacity;
public final BooleanProperty outline;
+ public final FloatProperty outlineWidth;
+ public final BooleanProperty expose;
+ public final ColorProperty exposeColor;
public final BooleanProperty obsidian;
private Color getColor() {
@@ -44,26 +46,51 @@ private Color getColor() {
}
private void drawObsidianBox(AxisAlignedBB axisAlignedBB) {
+ int red = 170;
+ int green = 0;
+ int blue = 170;
+
if (this.outline.getValue()) {
- RenderUtil.drawBoundingBox(axisAlignedBB, 170, 0, 170, 255, 1.5F);
+ RenderUtil.drawBoundingBox(axisAlignedBB, red, green, blue, 255, this.outlineWidth.getValue());
}
- RenderUtil.drawFilledBox(axisAlignedBB, 170, 0, 170);
+ RenderUtil.drawFilledBox(axisAlignedBB, red, green, blue);
}
private void drawObsidian(BlockPos blockPos) {
+ int red = 170;
+ int green = 0;
+ int blue = 170;
+
if (this.outline.getValue()) {
- RenderUtil.drawBlockBoundingBox(blockPos, 1.0, 170, 0, 170, 255, 1.5F);
+ RenderUtil.drawBlockBoundingBox(blockPos, 1.0, red, green, blue, 255, this.outlineWidth.getValue());
}
- RenderUtil.drawBlockBox(
- blockPos, 1.0, 170, 0, 170
- );
+ RenderUtil.drawBlockBox(blockPos, 1.0, red, green, blue);
}
+ private boolean isBlockExposed(BlockPos headPos, BlockPos footPos) {
+ for (EnumFacing facing : Arrays.asList(EnumFacing.NORTH, EnumFacing.EAST, EnumFacing.SOUTH, EnumFacing.WEST)) {
+ BlockPos headOffset = headPos.offset(facing);
+ BlockPos footOffset = footPos.offset(facing);
+
+ if (mc.theWorld.isAirBlock(headOffset) || mc.theWorld.isAirBlock(footOffset)) {
+ return true;
+ }
+ }
+ if (mc.theWorld.isAirBlock(headPos.up()) || mc.theWorld.isAirBlock(footPos.up())) {
+ return true;
+ }
+ return false;
+ }
+
+
public BedESP() {
super("BedESP", false);
this.customColor = new ColorProperty("custom-color", (int) 8085714755840333141L, () -> this.color.getValue() == 0);
this.opacity = new PercentProperty("opacity", 25);
this.outline = new BooleanProperty("outline", false);
+ this.outlineWidth = new FloatProperty("outline-width", 1.5F, 0.5F, 5.0F, () -> this.outline.getValue());
+ this.expose = new BooleanProperty("expose", false, () -> this.outline.getValue());
+ this.exposeColor = new ColorProperty("expose-color", 0x00D1A4, () -> this.outline.getValue() && this.expose.getValue());
this.obsidian = new BooleanProperty("obsidian", true);
}
@@ -81,12 +108,17 @@ public void onRender3D(Render3DEvent event) {
BlockPos opposite = blockPos.offset(state.getValue(BlockBed.FACING).getOpposite());
IBlockState oppositeState = mc.theWorld.getBlockState(opposite);
if (oppositeState.getBlock() instanceof BlockBed && oppositeState.getValue(BlockBed.PART) == EnumPartType.FOOT) {
+ boolean bedExposed = this.expose.getValue() && this.isBlockExposed(blockPos, opposite);
+
if (this.obsidian.getValue()) {
for (EnumFacing facing : Arrays.asList(EnumFacing.UP, EnumFacing.NORTH, EnumFacing.EAST, EnumFacing.SOUTH, EnumFacing.WEST)) {
BlockPos offsetX = blockPos.offset(facing);
BlockPos offsetZ = opposite.offset(facing);
- boolean xObsidian = mc.theWorld.getBlockState(offsetX).getBlock() instanceof BlockObsidian;
- boolean zObsidian = mc.theWorld.getBlockState(offsetZ).getBlock() instanceof BlockObsidian;
+ IBlockState stateX = mc.theWorld.getBlockState(offsetX);
+ IBlockState stateZ = mc.theWorld.getBlockState(offsetZ);
+ boolean xObsidian = stateX.getBlock() instanceof BlockObsidian;
+ boolean zObsidian = stateZ.getBlock() instanceof BlockObsidian;
+
if (xObsidian && zObsidian) {
this.drawObsidianBox(
new AxisAlignedBB(
@@ -123,15 +155,24 @@ public void onRender3D(Render3DEvent event) {
-((IAccessorRenderManager) mc.getRenderManager()).getRenderPosY(),
-((IAccessorRenderManager) mc.getRenderManager()).getRenderPosZ()
);
- Color color = this.getColor();
+
+ Color fillColor = this.getColor();
+
if (this.outline.getValue()) {
- RenderUtil.drawBoundingBox(aabb, color.getRed(), color.getGreen(), color.getBlue(), 255, 1.5F);
+ Color outlineColor;
+ if (bedExposed) {
+ outlineColor = new Color(this.exposeColor.getValue());
+ } else {
+ outlineColor = ((HUD) Myau.moduleManager.modules.get(HUD.class)).getColor(System.currentTimeMillis());
+ }
+ RenderUtil.drawBoundingBox(aabb, outlineColor.getRed(), outlineColor.getGreen(), outlineColor.getBlue(), 255, this.outlineWidth.getValue());
}
+
RenderUtil.drawFilledBox(
aabb,
- color.getRed(),
- color.getGreen(),
- color.getBlue()
+ fillColor.getRed(),
+ fillColor.getGreen(),
+ fillColor.getBlue()
);
}
} else {
@@ -148,4 +189,4 @@ public void onEnabled() {
mc.renderGlobal.loadRenderers();
}
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/myau/module/modules/ChestESP.java b/src/main/java/myau/module/modules/ChestESP.java
index c25f4f50..4fe5fcfc 100644
--- a/src/main/java/myau/module/modules/ChestESP.java
+++ b/src/main/java/myau/module/modules/ChestESP.java
@@ -45,9 +45,9 @@ public void onRender(Render3DEvent event) {
maxX = maxZ = 0.9375;
if (block instanceof BlockChest) {
if (block.canProvidePower()) {
- color = new Color(this.trappedChest.getValue(), true);
+ color = new Color(this.trappedChest.getValue());
} else {
- color = new Color(this.chest.getValue(), true);
+ color = new Color(this.chest.getValue());
}
EnumFacing facing = mc.theWorld.getBlockState(chest.getPos()).getValue(BlockChest.FACING);
switch (facing) {
@@ -83,9 +83,8 @@ public void onRender(Render3DEvent event) {
continue;
}
} else {
- color = new Color(this.enderChest.getValue(), true);
+ color = new Color(this.enderChest.getValue());
}
- if (color.getAlpha() == 0) continue;
AxisAlignedBB aabb = new AxisAlignedBB(
(double) chest.getPos().getX() + minX,
(double) chest.getPos().getY() + 0.0,
@@ -100,7 +99,7 @@ public void onRender(Render3DEvent event) {
-((IAccessorRenderManager) mc.getRenderManager()).getRenderPosZ()
);
RenderUtil.drawBoundingBox(
- aabb, color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha(), 1.5F
+ aabb, color.getRed(), color.getGreen(), color.getBlue(), 255, 1.5F
);
if (this.tracers.getValue()) {
Vec3 vec;
@@ -167,4 +166,4 @@ public void onRender(Render3DEvent event) {
RenderUtil.disableRenderState();
}
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/myau/module/modules/Clutch.java b/src/main/java/myau/module/modules/Clutch.java
new file mode 100644
index 00000000..12dd092e
--- /dev/null
+++ b/src/main/java/myau/module/modules/Clutch.java
@@ -0,0 +1,499 @@
+package myau.module.modules;
+
+import myau.event.EventTarget;
+import myau.event.types.EventType;
+import myau.event.types.Priority;
+import myau.events.*;
+import myau.management.RotationState;
+import myau.module.Module;
+import myau.property.properties.BooleanProperty;
+import myau.property.properties.FloatProperty;
+import myau.property.properties.IntProperty;
+import myau.property.properties.ModeProperty;
+import myau.util.MoveUtil;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.*;
+
+import java.util.*;
+
+public class Clutch extends Module {
+ private static final Minecraft mc = Minecraft.getMinecraft();
+ private final Map BLOCK_SCORE = new HashMap<>();
+
+ private float serverYaw;
+ private float serverPitch;
+ private float aimYaw;
+ private float aimPitch;
+ private boolean hasAim;
+ private boolean resetting;
+ private BlockPos targetBlock;
+ private EnumFacing targetFacing;
+ private Vec3 targetHitVec;
+ private boolean placeQueued;
+ private int lastSlot = -1;
+ private int plannedSlot = -1;
+ private boolean slotSwapped = false;
+ private int clutchBlocksPlaced = 0;
+ private int lastPlacedX = Integer.MIN_VALUE;
+ private int lastPlacedY = Integer.MIN_VALUE;
+ private int lastPlacedZ = Integer.MIN_VALUE;
+ private BlockPos lockedBlock = null;
+ private EnumFacing lockedFacing = null;
+ private float lockedAimYaw;
+ private float lockedAimPitch;
+
+ private static final double HW = 0.3;
+ private static final double[][] CORNERS = {{-HW, -HW}, {HW, -HW}, {-HW, HW}, {HW, HW}};
+ private static final double INSET = 0.05;
+ private static final double STEP = 0.2;
+ private static final double JIT = STEP * 0.1;
+
+ public final FloatProperty reach = new FloatProperty("reach", 4.5f, 0.5f, 6.0f);
+ public final IntProperty speed = new IntProperty("speed", 8, 1, 100);
+ public final IntProperty snapbackSpeed = new IntProperty("snapback-speed", 12, 1, 100);
+ public final IntProperty maxBlocks = new IntProperty("max-blocks", 10, 0, 50);
+ public final IntProperty rotationTolerance = new IntProperty("rotation-tolerance", 25, 5, 100);
+ public final BooleanProperty simulateFuture = new BooleanProperty("simulate-future-pos", true);
+ public final ModeProperty moveFix = new ModeProperty("move-fix", 1, new String[]{"NONE", "SILENT"});
+
+ public Clutch() {
+ super("Clutch", false);
+ BLOCK_SCORE.put("obsidian", 0);
+ BLOCK_SCORE.put("end_stone", 1);
+ BLOCK_SCORE.put("planks", 2);
+ BLOCK_SCORE.put("log", 2);
+ BLOCK_SCORE.put("log2", 2);
+ BLOCK_SCORE.put("glass", 3);
+ BLOCK_SCORE.put("stained_glass", 3);
+ BLOCK_SCORE.put("stainedGlass", 3);
+ BLOCK_SCORE.put("hardened_clay", 4);
+ BLOCK_SCORE.put("stained_hardened_clay", 4);
+ BLOCK_SCORE.put("hardenedClay", 4);
+ BLOCK_SCORE.put("stainedHardenedClay", 4);
+ BLOCK_SCORE.put("clay", 4);
+ BLOCK_SCORE.put("stone", 5);
+ BLOCK_SCORE.put("cloth", 5);
+ }
+
+ @Override
+ public void onEnabled() {
+ if (mc.thePlayer == null) return;
+ serverYaw = mc.thePlayer.rotationYaw;
+ serverPitch = mc.thePlayer.rotationPitch;
+ aimYaw = serverYaw;
+ aimPitch = serverPitch;
+ hasAim = false;
+ resetting = false;
+ clutchBlocksPlaced = 0;
+ lastSlot = mc.thePlayer.inventory.currentItem;
+ targetBlock = null;
+ targetFacing = null;
+ targetHitVec = null;
+ placeQueued = false;
+ slotSwapped = false;
+ plannedSlot = -1;
+ lockedBlock = null;
+ lockedFacing = null;
+ }
+
+ @Override
+ public void onDisabled() {
+ if (mc.thePlayer == null) return;
+ restoreSlot();
+ targetBlock = null;
+ targetFacing = null;
+ targetHitVec = null;
+ hasAim = false;
+ resetting = false;
+ lockedBlock = null;
+ lockedFacing = null;
+ }
+
+ @EventTarget(Priority.HIGH)
+ public void onUpdate(UpdateEvent event) {
+ if (!isEnabled()) return;
+ if (event.getType() != EventType.PRE) return;
+ if (mc.thePlayer == null || mc.theWorld == null) return;
+ if (mc.currentScreen != null) return;
+
+ serverYaw = event.getYaw();
+ serverPitch = event.getPitch();
+
+ if (mc.thePlayer.onGround) clutchBlocksPlaced = 0;
+
+ BlockPos belowFeet = new BlockPos(
+ MathHelper.floor_double(mc.thePlayer.posX),
+ MathHelper.floor_double(mc.thePlayer.posY) - 1,
+ MathHelper.floor_double(mc.thePlayer.posZ)
+ );
+
+ if (!isReplaceable(belowFeet)) {
+ clearAim();
+ return;
+ }
+
+ plannedSlot = findBestBlockSlot();
+ if (plannedSlot == -1) {
+ clearAim();
+ return;
+ }
+
+ if (mc.thePlayer.inventory.currentItem != plannedSlot) {
+ if (!slotSwapped) lastSlot = mc.thePlayer.inventory.currentItem;
+ mc.thePlayer.inventory.currentItem = plannedSlot;
+ slotSwapped = true;
+ }
+
+ ItemStack held = mc.thePlayer.inventory.getCurrentItem();
+ if (held == null || !(held.getItem() instanceof ItemBlock)) {
+ clearAim();
+ return;
+ }
+
+ // Validate existing lock before searching for a new one
+ boolean lockValid = lockedBlock != null && lockedFacing != null && isLockedTargetValid();
+ if (!lockValid) {
+ lockedBlock = null;
+ lockedFacing = null;
+ findClutchTarget();
+ }
+
+ if (targetBlock != null && targetHitVec != null) {
+ aimYaw = lockedAimYaw;
+ aimPitch = lockedAimPitch;
+ hasAim = true;
+ resetting = false;
+ }
+
+ if (resetting) {
+ float[] sm = smoothStep(mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, true);
+ if (Math.abs(sm[0] - mc.thePlayer.rotationYaw) < 0.5f && Math.abs(sm[1] - mc.thePlayer.rotationPitch) < 0.5f) {
+ resetting = false;
+ } else {
+ event.setRotation(sm[0], sm[1], 4);
+ if (moveFix.getValue() != 0) event.setPervRotation(sm[0], 4);
+ }
+ return;
+ }
+
+ if (hasAim && targetBlock != null) {
+ float[] sm = smoothStep(aimYaw, aimPitch, false);
+ event.setRotation(sm[0], sm[1], 4);
+ if (moveFix.getValue() != 0) event.setPervRotation(sm[0], 4);
+
+ if (withinTolerance(sm[0], sm[1])) {
+ int max = maxBlocks.getValue();
+ if (max == 0 || clutchBlocksPlaced < max) {
+ MovingObjectPosition mop = rayTrace(sm[0], sm[1], reach.getValue());
+ if (mop != null
+ && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK
+ && mop.getBlockPos().equals(targetBlock)
+ && mop.sideHit == targetFacing) {
+ targetHitVec = mop.hitVec;
+ placeQueued = true;
+ }
+ }
+ }
+ }
+
+ if (placeQueued) {
+ placeQueued = false;
+ doPlace();
+ }
+ }
+
+ @EventTarget
+ public void onMoveInput(MoveInputEvent event) {
+ if (!isEnabled()) return;
+ if (moveFix.getValue() == 1
+ && RotationState.isActived()
+ && RotationState.getPriority() == 4
+ && MoveUtil.isForwardPressed()) {
+ MoveUtil.fixStrafe(RotationState.getSmoothedYaw());
+ }
+ }
+
+ @EventTarget
+ public void onSwap(SwapItemEvent event) {
+ if (isEnabled()) {
+ lastSlot = event.setSlot(lastSlot);
+ event.setCancelled(true);
+ }
+ }
+
+ private boolean isLockedTargetValid() {
+ if (isReplaceable(lockedBlock)) return false;
+ MovingObjectPosition mop = rayTrace(lockedAimYaw, lockedAimPitch, reach.getValue());
+ if (mop == null || mop.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK) return false;
+ if (!mop.getBlockPos().equals(lockedBlock)) return false;
+ if (mop.sideHit != lockedFacing) return false;
+ targetHitVec = mop.hitVec;
+ targetBlock = lockedBlock;
+ targetFacing = lockedFacing;
+ return true;
+ }
+
+ private void findClutchTarget() {
+ double px = mc.thePlayer.posX, py = mc.thePlayer.posY, pz = mc.thePlayer.posZ;
+ Vec3 eye = mc.thePlayer.getPositionEyes(1.0f);
+ double reachD = reach.getValue();
+
+ double futureX = px, futureY = py, futureZ = pz;
+ if (simulateFuture.getValue()) {
+ double mx = mc.thePlayer.motionX, my = mc.thePlayer.motionY, mz = mc.thePlayer.motionZ;
+ for (int t = 0; t < 20; t++) {
+ my = (my - 0.08) * 0.98;
+ futureY += my;
+ futureX += mx * 0.91;
+ futureZ += mz * 0.91;
+ if (futureY < py - 2 || my >= 0) break;
+ }
+ }
+
+ int feetX = MathHelper.floor_double(px);
+ int feetY = MathHelper.floor_double(py);
+ int feetZ = MathHelper.floor_double(pz);
+
+ List