mirror of https://github.com/kami-blue/client
dates and stuff
This commit is contained in:
parent
fe8faa3b83
commit
3dcece476e
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.misc;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.event.events.PacketEvent;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
|
@ -13,8 +12,8 @@ import java.util.Random;
|
|||
|
||||
/**
|
||||
* Created by 086 on 22/03/2018.
|
||||
* Updated by Qther on 04/03/20
|
||||
* Updated by S-B99 on 04/03/20
|
||||
* Updated by Qther on 05/03/20
|
||||
* Updated by S-B99 on 05/03/20
|
||||
*/
|
||||
@Module.Info(name = "AutoFish", category = Module.Category.MISC, description = "Automatically catch fish")
|
||||
public class AutoFish extends Module {
|
||||
|
@ -22,6 +21,8 @@ public class AutoFish extends Module {
|
|||
private Setting<Integer> extraDelay = register(Settings.integerBuilder("Catch Delay (ms)").withValue(300).withMinimum(0).withMaximum(1000));
|
||||
private Setting<Integer> variation = register(Settings.integerBuilder("Variation (ms)").withValue(50).withMinimum(0).withMaximum(1000));
|
||||
|
||||
Random random;
|
||||
|
||||
@EventHandler
|
||||
private Listener<PacketEvent.Receive> receiveListener = new Listener<>(e -> {
|
||||
if (e.getPacket() instanceof SPacketSoundEffect) {
|
||||
|
@ -34,14 +35,14 @@ public class AutoFish extends Module {
|
|||
int fishZ = (int) mc.player.fishEntity.posZ;
|
||||
if (kindaEquals(soundX, fishX) && kindaEquals(fishZ, soundZ)) {
|
||||
new Thread(() -> {
|
||||
Random ran = new Random();
|
||||
random = new Random();
|
||||
try {
|
||||
Thread.sleep(extraDelay.getValue() + ran.ints(1, -variation.getValue(), variation.getValue()).findFirst().getAsInt());
|
||||
Thread.sleep(extraDelay.getValue() + random.ints(1, -variation.getValue(), variation.getValue()).findFirst().getAsInt());
|
||||
} catch (InterruptedException ignored) { }
|
||||
mc.rightClickMouse();
|
||||
ran = new Random();
|
||||
random = new Random();
|
||||
try {
|
||||
Thread.sleep(baseDelay.getValue() + ran.ints(1, -variation.getValue(), variation.getValue()).findFirst().getAsInt());
|
||||
Thread.sleep(baseDelay.getValue() + random.ints(1, -variation.getValue(), variation.getValue()).findFirst().getAsInt());
|
||||
} catch (InterruptedException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.player;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.event.events.PacketEvent;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
|
@ -14,11 +13,9 @@ import net.minecraft.util.EnumHand;
|
|||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
//import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Created by 086 on 19/11/2017.
|
||||
* Updated by S-B99 on 08/11/2019
|
||||
* Updated by S-B99 on 05/03/20
|
||||
*/
|
||||
@Module.Info(category = Module.Category.PLAYER, description = "Prevents fall damage", name = "NoFall")
|
||||
public class NoFall extends Module {
|
||||
|
|
Loading…
Reference in New Issue