Reconnect на гриф риливорлда (noad) функцией. package wtf.expensive.modules.impl.util; import net.minecraft.inventory.container.ClickType; import net.minecraft.scoreboard.ScoreObjective; import wtf.expensive.events.Event; import wtf.expensive.events.impl.player.EventUpdate; import wtf.expensive.modules.Function; import wtf.expensive.modules.FunctionAnnotation; import wtf.expensive.modules.Type; import wtf.expensive.util.misc.TimerUtil; @FunctionAnnotation(name = "Reconnect", type = Type.Util) public class ReconnectFunction extends Function { private String grief; private int oldId; private int step; private final TimerUtil timerUtil = new TimerUtil(); public ReconnectFunction() {} @Override public void onEvent(Event event) { if (event instanceof EventUpdate) { if (step == 0) { timerUtil.reset(); grief = "1"; for (ScoreObjective team : mc.world.getScoreboard().getScoreObjectives()) { String gr = team.getDisplayName().getString(); if (gr.contains("ГРИФ #")) { grief = gr.split("ГРИФ #")[1]; grief = grief.replaceAll(" ",""); } } mc.player.sendChatMessage("/hub"); step = 1; } else if (step == 1) { if (timerUtil.hasTimeElapsed(1000)) { timerUtil.reset(); step = 2; mc.gameSettings.keyBindUseItem.setPressed(true); } } else if (step == 2) { if (timerUtil.hasTimeElapsed(500)) { timerUtil.reset(); step = 3; mc.gameSettings.keyBindUseItem.setPressed(false); } } else if (step == 3) { if (mc.player.openContainer.windowId != 0 && timerUtil.hasTimeElapsed(400)) { timerUtil.reset(); step = 4; oldId = mc.player.openContainer.windowId; mc.playerController.windowClick(oldId, 22, 0, ClickType.PICKUP, mc.player); } } else if (step == 4) { if (timerUtil.hasTimeElapsed(1100) && mc.player.openContainer.windowId != oldId) { timerUtil.reset(); int griefInt = Integer.parseInt(grief); if (griefInt < 8) { mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt, 0, ClickType.PICKUP, mc.player); } else if (griefInt < 15) { mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 2, 0, ClickType.PICKUP, mc.player); } else if (griefInt < 22) { mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 4, 0, ClickType.PICKUP, mc.player); } else if (griefInt < 29) { mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 6, 0, ClickType.PICKUP, mc.player); } else if (griefInt < 36) { mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 8, 0, ClickType.PICKUP, mc.player); } step = 0; toggle(); } } } } }