Closed EmotionalLove closed 7 years ago
package nova.modules;
import net.minecraft.client.Minecraft; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import nova.Command; import nova.events.EventHandler; import nova.events.PlayerTickEvent;
import java.util.Random;
/**
public class ModuleAntiAfk extends ModuleBase{
private BlockPos block; private Random random; private BlockPos nextBlock; private Long currentMS; private Long lastMs; public ModuleAntiAfk(nova.Nova Nova, Minecraft mc) { int timerchat = 0; @EventHandler public void onUpdate(PlayerTickEvent e) { if (this.isEnabled) { timerchat++; currentMS = System.currentTimeMillis(); if(currentMS >= lastMs + 3000|| nextBlock == null) { if(block == null) onEnable(); nextBlock = block.add(random.nextInt(3) - 1, 0, random.nextInt(3) - 1); lastMs = System.currentTimeMillis(); } faceBlockClientHorizontally(nextBlock); mc.gameSettings.keyBindForward.pressed = getHorizontalPlayerBlockDistance(nextBlock) > 0.75; if (timerchat >= 250) { mc.player.sendChatMessage ("> AFK!") timerchat =0; } }
modifications to the onUpdate() and the class declaration
This is not an issue
package nova.modules;
import net.minecraft.client.Minecraft; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import nova.Command; import nova.events.EventHandler; import nova.events.PlayerTickEvent;
import java.util.Random;
/**
public class ModuleAntiAfk extends ModuleBase{
modifications to the onUpdate() and the class declaration