Хочу представить переделанный GodMode-RW под exp 2.0 ready package fun.sorrydlc.modules.impl.util; import fun.sorrydlc.events.Event; import fun.sorrydlc.events.impl.player.EventUpdate; import fun.sorrydlc.modules.Function; import fun.sorrydlc.modules.FunctionAnnotation; import fun.sorrydlc.modules.Type; import fun.sorrydlc.util.ClientUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.inventory.ChestScreen; import net.minecraft.client.gui.screen.inventory.InventoryScreen; import net.minecraft.inventory.container.ClickType; import net.minecraft.inventory.container.Slot; import java.util.Timer; import java.util.TimerTask; @FunctionAnnotation(name = "GodMode-RW", type = Type.Util) public class GodModeRW extends Function { public GodModeRW() { } public void onEvent(Event event) { if (event instanceof EventUpdate) { } } private final Minecraft mc = Minecraft.getInstance(); private Timer timer; public void onEnable() { super.onEnable(); if (mc.player != null) { if (!ClientUtil.isPvP()) { mc.player.sendChatMessage("/menu"); } timer = new Timer(); timer.schedule(new MenuInteractionTask(), 200); } } public void onDisable() { super.onDisable(); if (timer != null) { timer.cancel(); timer = null; } } private class MenuInteractionTask extends TimerTask { public void run() { if (!ClientUtil.isConnectedToServer("reallyworld")) { ClientUtil.sendMesage("Данная функция работает только на ReallyWorld"); toggle(); } else { if (mc.currentScreen instanceof ChestScreen) { ChestScreen chestScreen = (ChestScreen) mc.currentScreen; if (ClientUtil.isPvP()) { Slot slot = chestScreen.getContainer().inventorySlots.get((1 * 9) + 4); mc.playerController.windowClick( chestScreen.getContainer().windowId, slot.slotNumber, 0, ClickType.PICKUP, mc.player ); } else { Slot slot = chestScreen.getContainer().inventorySlots.get((2 * 9) + 3); if (slot != null) { mc.playerController.windowClick(chestScreen.getContainer().windowId,slot.slotNumber,0,ClickType.PICKUP,mc.player ); } timer.schedule(new MenuInteractionTask(), 200); } } else { if (!ClientUtil.isPvP()) { if (!(mc.currentScreen instanceof InventoryScreen)) { mc.player.sendChatMessage("/menu"); timer.schedule(new MenuInteractionTask(), 1000); } } } } } } }