Skip to content

Port WorldTabs, deselect-all, and save-performance fix to 1.21.11#2

Closed
Copilot wants to merge 3 commits into
1.21.11from
copilot/port-worldtabs-deselect-all-performance-fix
Closed

Port WorldTabs, deselect-all, and save-performance fix to 1.21.11#2
Copilot wants to merge 3 commits into
1.21.11from
copilot/port-worldtabs-deselect-all-performance-fix

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 18, 2026

Three features present in the 26.1 branch were missing from the 1.21.11 branch. This PR backports all three.

Performance fix — batch saves in Quick Assign

commitQuickAssign previously called save() on every server mutation (O(n) disk writes). assignServer/unassignServer now accept a doSave boolean; the loop passes false and a single save() fires after all mutations.

// Before: N disk writes
TabConfig.getInstance().assignServer(sd.ip, quickAssignTabId);  // saves each time

// After: 1 disk write
TabConfig.getInstance().assignServer(sd.ip, quickAssignTabId, false);
// ...
TabConfig.getInstance().save(); // once, after the loop

Deselect All

  • TabConfig.deselectAllServerTabs(ip) / deselectAllWorldTabs(worldId) — removes all non-locked tab assignments in one save
  • "Deselect All" button added to AssignTabScreen and AssignWorldScreen

WorldTabs

Full tab system for SelectWorldScreen, mirroring the existing server-tab system:

  • WorldTabSessionState — active-tab holder across screen reinits
  • TabConfig — added WorldSortingType enum, world-tab fields (worldTabs, worldTabAssignments, enabled/dropdown/speed/sort/default/remember/assignOnAdd flags), load/save, and full assignment API
  • WorldTabsDropdownController — sliding panel on SelectWorldScreen; uses reflection to filter the WorldSelectionList (mirrors TabDropdownController); supports Alt+W/S tab cycling
  • AssignWorldScreen — checkbox UI to assign/deassign a world to world tabs
  • WorldTabsSettingsScreen — full settings screen: add/rename/delete/reorder tabs plus all toggle/cycle settings
  • ServerTabsClient — hooks SelectWorldScreen; count-based assign-on-add using a tracked Set<String> of known world IDs; resets world-tab session on title screen
  • TitleScreenMixin — injects a ⚙ WorldTabs gear button next to the Singleplayer row (ServerTabs gear remains next to Multiplayer)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.fabricmc.net
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx2G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
    • Triggering command: /usr/bin/curl curl -v REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Port the newly added features from the 26.1 version of the mod to the 1.21.11 version. Specifically, implement the following changes:

  1. Add the WorldTabs feature.
  2. Implement a proper deselect all functionality.
  3. Apply the performance fix which saves all the servers together instead of saving them one by one.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: I have added alot of new features to 26.1 version of the mod, but not 1.21.11. Can you add them? The features mainly being WorldTabs and a proper deselect all and a performance fix which saves all the servers together instead of 1by1. Can you implement these changes to 1.21.11?

Assistant: I am currently waiting for your confirmation in the dialog box to proceed with implementing these features on the 1.21.11 version.

This pull request was created from Copilot chat.

Copilot AI and others added 2 commits April 18, 2026 17:38
Copilot AI changed the title [WIP] Add WorldTabs feature and improve deselect all functionality Port WorldTabs, deselect-all, and save-performance fix to 1.21.11 Apr 18, 2026
Copilot AI requested a review from StratCube2 April 18, 2026 17:41
Copilot stopped work on behalf of StratCube2 due to an error April 18, 2026 18:02
@StratCube2 StratCube2 closed this Apr 18, 2026
@StratCube2 StratCube2 deleted the copilot/port-worldtabs-deselect-all-performance-fix branch April 22, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants