File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
invui/src/main/java/xyz/xenondevs/invui/window Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ non-sealed abstract class AbstractWindow<M extends CustomContainerMenu> implemen
9898 .collect (Collectors .toCollection (ArrayList ::new ));
9999
100100 serverWindowState .observeWeak (this , thisRef -> {
101- thisRef .handleTick (); // important: flush item updates and send packets
101+ thisRef .updateAndFlush (); // important: flush item updates and send packets
102102 thisRef .menu .sendPing (serverWindowState .get ());
103103 });
104104
@@ -196,14 +196,17 @@ public void notifyUpdate(int slot) {
196196 }
197197
198198 public void handleTick () {
199+ updateAndFlush ();
200+ windowTick ++;
201+ }
202+
203+ private void updateAndFlush () {
199204 updateSlots ();
200205
201206 if (titleSupplier instanceof AnimatedTitle )
202207 updateTitle ();
203208
204209 menu .sendChangesToRemote ();
205-
206- windowTick ++;
207210 }
208211
209212 @ Override
You can’t perform that action at this time.
0 commit comments