Начинающий
- Статус
- Оффлайн
- Регистрация
- 21 Окт 2022
- Сообщения
- 343
- Реакции
- 1
скинь эвентAuthor: @Fabos1337
NoSlow FunTime:public class NoSlow extends Module { public static NoSlow getInstance() { return Instance.get(NoSlow.class); } private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); private final StopWatch stopWatch = new StopWatch(); @EventHandler public void onSlowWalk(SlowWalkingEvent e) { if (mc.player == null || mc.player.isElytraFlying()) return; if (!isBlockUnderWithMotion() && mc.player.isOnGround() && !mc.player.movementInput.jump && !mc.player.isPotionActive(Effects.SLOWNESS)) { float boost = mc.player.moveStrafing == 0 || mc.player.moveForward == 0 ? 0.015F : 0F; float speed = mc.player.isPotionActive(Effects.SPEED) ? 0.35F : 0.3f; MoveUtil.setSpeed(speed + boost); if (stopWatch.finished(120) && PlayerUtil.isFuntime()) { BlockPos.getAllInBox(mc.player.getBoundingBox().offset(0, -1e-1, 0)).filter(pos -> !mc.world.getBlockState(pos).isAir()) .forEach(pos -> mc.player.connection.sendPacket(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, pos, Direction.UP))); mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.PRESS_SHIFT_KEY)); scheduler.schedule(() -> mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.RELEASE_SHIFT_KEY)), 1, TimeUnit.MILLISECONDS); stopWatch.reset(); } } } public boolean isBlockUnderWithMotion() { AxisAlignedBB aab = mc.player.getBoundingBox().offset(mc.player.getMotion().x, -1e-1, mc.player.getMotion().z); return mc.world.getCollisionShapes(mc.player, aab).toList().isEmpty(); } }