- Статус
- Оффлайн
- Регистрация
- 3 Май 2023
- Сообщения
- 854
- Реакции
- 19
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Java:
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();
}
}
}