Game tick scripting doesn't work while tabbed out/chatting.
Closed this issue · 4 comments
I see, strange. I will check
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?
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();
}
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
});