Fix stuff (#287)
Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com>
This commit is contained in:
@@ -63,7 +63,7 @@ public class AutoGrind extends Module {
|
|||||||
|
|
||||||
if (mc.currentScreen == null) break;
|
if (mc.currentScreen == null) break;
|
||||||
|
|
||||||
InvUtils.quickSwap().slot(i);
|
InvUtils.shiftClick().slot(i);
|
||||||
InvUtils.move().fromId(2).to(i);
|
InvUtils.move().fromId(2).to(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,24 +25,19 @@ public class VehicleOneHit extends Module {
|
|||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
|
||||||
private boolean ignorePackets;
|
|
||||||
|
|
||||||
public VehicleOneHit() {
|
public VehicleOneHit() {
|
||||||
super(MeteorRejectsAddon.CATEGORY, "vehicle-one-hit", "Destroy vehicles with one hit.");
|
super(MeteorRejectsAddon.CATEGORY, "vehicle-one-hit", "Destroy vehicles with one hit.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onPacketSend(PacketEvent.Send event) {
|
private void onPacketSend(PacketEvent.Send event) {
|
||||||
if (ignorePackets
|
if (!(event.packet instanceof PlayerInteractEntityC2SPacket)
|
||||||
|| !(event.packet instanceof PlayerInteractEntityC2SPacket)
|
|
||||||
|| !(mc.crosshairTarget instanceof EntityHitResult ehr)
|
|| !(mc.crosshairTarget instanceof EntityHitResult ehr)
|
||||||
|| (!(ehr.getEntity() instanceof AbstractMinecartEntity) && !(ehr.getEntity() instanceof BoatEntity))
|
|| (!(ehr.getEntity() instanceof AbstractMinecartEntity) && !(ehr.getEntity() instanceof BoatEntity))
|
||||||
) return;
|
) return;
|
||||||
|
|
||||||
ignorePackets = true;
|
|
||||||
for (int i = 0; i < amount.get() - 1; i++) {
|
for (int i = 0; i < amount.get() - 1; i++) {
|
||||||
mc.player.networkHandler.sendPacket(event.packet);
|
mc.player.networkHandler.getConnection().send(event.packet, null);
|
||||||
}
|
}
|
||||||
ignorePackets = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user