@Override protected void mouseClicked(int screenX, int screenY, int key) { super.mouseClicked(screenX, screenY, key); // inited and left click and on a button if (initialized && key == 0 && clickOnButton(screenX, screenY)) { stateFromButtons(); PacketCarriageUpdate.send(cde, state); } }
// This shouldn't be needed now, but whatever public void onGuiClosed() { if (initialized) { stateFromButtons(); PacketCarriageUpdate.send(cde, state); } }