Item Scroller | Forge 1.16.5 Ready

  • Автор темы Автор темы ak1
  • Дата начала Дата начала
Forge Api ;-;
Забаненный
Забаненный
Статус
Оффлайн
Регистрация
3 Май 2023
Сообщения
854
Реакции
19
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Java:
Expand Collapse Copy
    TimerUtil timerUtil = new TimerUtil();
    FloatSetting cooldown = new FloatSetting("Cooldown", 1, 200, 30, 0.01);

    @SubscribeEvent
    public void onUpdate(TickEvent.RenderTickEvent e) {
        if (mc.screen instanceof ContainerScreen &&
                ((ContainerScreen<?>) mc.screen).getSlotUnderMouse() != null &&
                InputMappings.isKeyDown(mc.getWindow().getWindow(), mc.options.keyShift.getKey().getValue()) &&
                GLFW.glfwGetMouseButton(mc.getWindow().getWindow(), GLFW_MOUSE_BUTTON_1) == 1 &&
                timerUtil.hasReached((int) cooldown.getValue())) {

            Slot slot = ((ContainerScreen<?>) mc.screen).getSlotUnderMouse();

            if (slot != null && slot.hasItem()) {
                mc.gameMode.handleInventoryMouseClick(
                        mc.player.containerMenu.containerId,
                        slot.index,
                        0,
                        ClickType.QUICK_MOVE,
                        mc.player
                );
                timerUtil.reset();
            }
        }
    }
 
Java:
Expand Collapse Copy
    TimerUtil timerUtil = new TimerUtil();
    FloatSetting cooldown = new FloatSetting("Cooldown", 1, 200, 30, 0.01);

    @SubscribeEvent
    public void onUpdate(TickEvent.RenderTickEvent e) {
        if (mc.screen instanceof ContainerScreen &&
                ((ContainerScreen<?>) mc.screen).getSlotUnderMouse() != null &&
                InputMappings.isKeyDown(mc.getWindow().getWindow(), mc.options.keyShift.getKey().getValue()) &&
                GLFW.glfwGetMouseButton(mc.getWindow().getWindow(), GLFW_MOUSE_BUTTON_1) == 1 &&
                timerUtil.hasReached((int) cooldown.getValue())) {

            Slot slot = ((ContainerScreen<?>) mc.screen).getSlotUnderMouse();

            if (slot != null && slot.hasItem()) {
                mc.gameMode.handleInventoryMouseClick(
                        mc.player.containerMenu.containerId,
                        slot.index,
                        0,
                        ClickType.QUICK_MOVE,
                        mc.player
                );
                timerUtil.reset();
            }
        }
    }
деф принцип уменьшения кулдауна, под фордж думаю некоторым пригодится
 
Java:
Expand Collapse Copy
    TimerUtil timerUtil = new TimerUtil();
    FloatSetting cooldown = new FloatSetting("Cooldown", 1, 200, 30, 0.01);

    @SubscribeEvent
    public void onUpdate(TickEvent.RenderTickEvent e) {
        if (mc.screen instanceof ContainerScreen &&
                ((ContainerScreen<?>) mc.screen).getSlotUnderMouse() != null &&
                InputMappings.isKeyDown(mc.getWindow().getWindow(), mc.options.keyShift.getKey().getValue()) &&
                GLFW.glfwGetMouseButton(mc.getWindow().getWindow(), GLFW_MOUSE_BUTTON_1) == 1 &&
                timerUtil.hasReached((int) cooldown.getValue())) {

            Slot slot = ((ContainerScreen<?>) mc.screen).getSlotUnderMouse();

            if (slot != null && slot.hasItem()) {
                mc.gameMode.handleInventoryMouseClick(
                        mc.player.containerMenu.containerId,
                        slot.index,
                        0,
                        ClickType.QUICK_MOVE,
                        mc.player
                );
                timerUtil.reset();
            }
        }
    }
ну как будто бесполезно
 
Java:
Expand Collapse Copy
    TimerUtil timerUtil = new TimerUtil();
    FloatSetting cooldown = new FloatSetting("Cooldown", 1, 200, 30, 0.01);

    @SubscribeEvent
    public void onUpdate(TickEvent.RenderTickEvent e) {
        if (mc.screen instanceof ContainerScreen &&
                ((ContainerScreen<?>) mc.screen).getSlotUnderMouse() != null &&
                InputMappings.isKeyDown(mc.getWindow().getWindow(), mc.options.keyShift.getKey().getValue()) &&
                GLFW.glfwGetMouseButton(mc.getWindow().getWindow(), GLFW_MOUSE_BUTTON_1) == 1 &&
                timerUtil.hasReached((int) cooldown.getValue())) {

            Slot slot = ((ContainerScreen<?>) mc.screen).getSlotUnderMouse();

            if (slot != null && slot.hasItem()) {
                mc.gameMode.handleInventoryMouseClick(
                        mc.player.containerMenu.containerId,
                        slot.index,
                        0,
                        ClickType.QUICK_MOVE,
                        mc.player
                );
                timerUtil.reset();
            }
        }
    }
бля братан,смысл слива если каждый 2 пастер напишет
 
Назад
Сверху Снизу