diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/betterp2p/GuiAdvancedMemoryCardMixin.java b/src/main/java/com/nomiceu/nomilabs/mixin/betterp2p/GuiAdvancedMemoryCardMixin.java index 1935d787..e888489f 100644 --- a/src/main/java/com/nomiceu/nomilabs/mixin/betterp2p/GuiAdvancedMemoryCardMixin.java +++ b/src/main/java/com/nomiceu/nomilabs/mixin/betterp2p/GuiAdvancedMemoryCardMixin.java @@ -227,18 +227,18 @@ private void properlyResetScrollbarFilterTyped(char typedChar, int keyCode, Call @Inject(method = "refreshOverlay", at = @At("HEAD")) private void fillLabsCache(CallbackInfo ci) { - LabsClientCache.selectedIsOutput = getSelectedInfo().getOutput(); - - // Reset time - LabsClientCache.lastSelectedRenderChange = System.currentTimeMillis(); - LabsClientCache.renderingSelected = true; - LabsClientCache.inputLoc.clear(); LabsClientCache.outputLoc.clear(); var selected = getSelectedInfo(); if (selected == null || selected.getFrequency() == 0) return; + LabsClientCache.selectedIsOutput = getSelectedInfo().getOutput(); + + // Reset time + LabsClientCache.lastSelectedRenderChange = System.currentTimeMillis(); + LabsClientCache.renderingSelected = true; + infos.getSorted().stream() .filter(info -> info.getFrequency() == selected.getFrequency()) .filter(info -> info.getType() == selected.getType())