Начинающий
- Статус
- Оффлайн
- Регистрация
- 3 Май 2024
- Сообщения
- 99
- Реакции
- 1
Увидел в видосе бритвы такую хрень
Ач фт сигма ибы удар по игроку не даст, а вот по мобу с удовольствием пропустит
Ач фт сигма ибы удар по игроку не даст, а вот по мобу с удовольствием пропустит
TriggerBot:
TimerUtil attackDelay = new TimerUtil();
@SubscribeEvent
public void onTick(TickEvent e) {
assert mc.level != null;
for (Entity target : mc.
level.entitiesForRendering()) {
if (target != mc.player) {
if (mc.player.distanceTo(target) <= 3) {
if(target != mc.level.players() ) {
if( target instanceof MobEntity) {
if (mc.player.getAttackStrengthScale(0.85F) == 1 && attackDelay.hasReached(200)) {
mc.gameMode.attack(mc.player, target);
mc.player.swing(Hand.MAIN_HAND);
attackDelay.reset();
}
}
}
}
}
}
}
TimerUtil:
public class TimerUtil {
private long lastMS = -1L;
public TimerUtil() {
this.lastMS = System.currentTimeMillis();
}
public boolean hasReached(double delay) {
return System.currentTimeMillis() - this.lastMS >= delay;
}
public boolean hasReached(boolean active, double delay) {
return active || hasReached(delay);
}
public long getLastMS() {
return lastMS;
}
public void reset() {
this.lastMS = System.currentTimeMillis();
}
public long getTimePassed() {
return System.currentTimeMillis() - lastMS;
}
public long getCurrentTime() {
return System.nanoTime() / 1000000L;
}
public void setTime(long time) {
lastMS = time;
}
}