Zergatul / cheatutils

MIT License
33 stars 11 forks source link

Game tick scripting doesn't work while tabbed out/chatting. #53

Closed normalUserKarn closed 5 months ago

Zergatul commented 7 months ago

I see, strange. I will check

Zergatul commented 7 months ago

This was done intentionally. If you write script which checks if some key is pressed, you don't want it to run while you type in the chat and can accidentally press this key.

What are you trying to achieve?

normalUserKarn commented 7 months ago

i wanted to bypass flying is not enabled with this if(armorOverlay.isEnabled()&&!shulkerTooltip.isEnabled()){ int i = variables.getInteger("mi"); int x = variables.getInteger("mx"); i++; variables.setInteger("mi", i); if(flyHack.isEnabled()&&!shulkerTooltip.isEnabled()&&i>25){ flyHack.disable(); variables.setInteger("mi", 0);x++;variables.setInteger("mx", x); if(x>3){ if(!player.isOnGround() ){ } variables.setInteger("mx", 0); } }else if(armorOverlay.isEnabled()){ flyHack.enable(); } }else{ flyHack.disable(); }

Zergatul commented 5 months ago

Event Scipting module in the latest versions of mod allows to run code every game tick, even with opened chat or other GUIs.

events.onTickEnd(() => {
    // your code
});