dates and stuff

This commit is contained in:
Bella 2020-03-05 11:25:12 -05:00
parent fe8faa3b83
commit 3dcece476e
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
2 changed files with 9 additions and 11 deletions

View File

@ -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();
}

View File

@ -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 {