⚒️ Collapsible Game Rules
"Tame the chaos of world creation—every rule, cleanly organized at your fingertips."
📖 Introduction
Minecraft's default Edit Game Rules screen is an intimidating, endless wall of disorganized settings. The moment you install gameplay mods or create a complex world, dozens upon dozens of custom rules get tossed into a flat, sluggish list. Finding a single specific toggle—like keep inventory, mob griefing, or crop ticks—turns into a frustrating marathon of squinting and scrolling.
Collapsible Game Rules completely modernizes the Game Rules screen. It transforms the flat list into an elegant, hierarchical interface with folding category drawers, instant global fold/unfold toggles, real-time search auto-expansion with styled substring highlighting, interactive toggle switches and bounded sliders, dedicated per-category defaults resetting, and persistent layout memory across game sessions. Built from the ground up as a 100% client-side quality-of-life upgrade, it runs with zero server footprint and zero allocation churn on the render path.
[!IMPORTANT] 1 Jar 1 Version Policy: I build 1 dedicated JAR for each Minecraft version (e.g. MC 26.2, MC 26.3). Please download the exact build that matches your Minecraft installation.
Dependency Callout:
- Minecraft Modern Sovereigns (26.2 - 26.3+): Requires both Fabric API AND Dasik Library (
v1.9.0+on MC 26.3,v1.7.0+on MC 26.2).- Zero Server Requirement: This is a 100% client-side visual overhaul. You can install it on your client and join any vanilla, Fabric, Forge, Paper, or Purpur server without needing the mod installed on the server!
✨ Features
📂 Hierarchical Collapsible Categories
- Clean Drawer Layout: Automatically sorts all vanilla and modded game rules into tidy, collapsible category drawers (Player, Mobs, Spawning, World Updates, and modded namespaces).
- Linear Category Tree Builder: Features a high-performance single-pass parser (
CategoryTreeBuilder) and immutableCategoryGroupdata records that cache titles and rule counts in $O(1)$ time, eliminating nested list scanning overhead.
🖱️ Interactive Headers & Expand/Collapse Carats
- Visual State Indicators: Clearly indicates folder states with responsive toggle carats (
▼for expanded,▶for collapsed) alongside exact rule counters. - Effortless Toggle: Click any category header or press Space/Enter while focused to instantly expand or collapse that section. Fold away rules you rarely touch to keep your screen distraction-free.

🌐 Global Actions: Expand All, Collapse All & Dev Support
- One-Click Mastery: A dedicated sticky top control bar provides
[ Expand All ](▼) and[ Collapse All ](▶) cards. - Rapid Navigation: Expand every single category when you want to audit your entire configuration, or collapse everything with a single tap to view a high-level table of contents.
- Integrated Support Button: Quick-access
☕Ko-fi plate allows supporting ongoing mod development directly from the game rules toolbar.
🔍 Smart Vanilla Search Integration & Substring Highlighting
- Seamless Vanilla Compatibility: Type keywords directly into Minecraft's native search bar.
- Dynamic Unfolding: As you type, any category containing matching rules automatically unfolds with match badges (
[● X matches]), while non-matching categories collapse. Clear the search bar to immediately restore your previous layout! - High-Contrast Highlighting: Substring queries in rule labels and descriptions are highlighted with bright yellow formatting (
SearchHighlightHelper) for instant visual scanning.
↺ Per-Category Defaults Reset Plate
- Isolated Reset: Each category header features a compact
↺icon plate with dedicated hover tooltips (gui.collapsible-game-rules.reset_category). - Precision Resetting: Reset an entire category's rules back to vanilla or mod defaults in one swift action without accidentally wiping custom tweaks made in other categories.
🎚️ Modern Toggle Switches & Bounded Sliders
- Glassmorphic Toggles: High-contrast Emerald
[● ON]and Ruby[OFF ●]pill buttons for boolean rules with zero allocation overhead per render frame. - Bounded Sliders: Intuitive numeric sliders for key rules (tick speed, entity cramming, sleeping percentage, spawn radius, nether portal delays) with graceful unbounded fallbacks.
🧠 Persistent Layout Memory Across Sessions
- Session Continuity: Never repeat your collapsing preferences. Layout states are tracked via translation keys and saved locally to
config/collapsible-game-rules-state.json. - Language Resilient: Because state is saved by translation key rather than localized text, switching language packs will never corrupt or reset your collapsed folders.
- Zero Disk Thrashing: State is committed to disk only when exiting the screen (
isDirtyflag), ensuring zero stutter while clicking through menus.
🧩 Universal Modded GameRule Compatibility & Prettification
- Automatic Discovery: Directly hooks Minecraft's native Game Rules map. Custom rules registered by other mods or datapacks are automatically grouped into clean folders out of the box.
- Namespace Prettification: Intelligent fallback formatting cleans up unlocalized mod strings (e.g. converting
gamerule.category.better-bats.better_batsinto a beautiful, readableBetter Batsheader). - Dasik Library Integration: Deep first-class metadata synchronization for all dynamic rules generated through
DasikLibrary'sDynamicGameRuleManager.
🛡️ 100% Client-Side Architecture & Zero Server Footprint
- Runs entirely on your local client machine.
- Safe for singleplayer worlds, LAN games, and all multiplayer servers (vanilla, Paper, Purpur, Fabric).
📊 Quick Reference & Mechanics Matrix
| Feature Dimension | Vanilla Game Rules Screen | Collapsible Game Rules |
|---|---|---|
| Visual Structure | Giant, flat scrolling list | Collapsible hierarchical category drawers |
| Navigation Speed | Endless manual scrolling | One-click folding & unfolding |
| Global Controls | None | [ Expand All ] & [ Collapse All ] Toolbar |
| Rule Resetting | Global world reset only | Dedicated per-category ↺ Reset Plate |
| Search Interaction | Filters flat list; hard to track | Auto-expands drawers with yellow highlights |
| Layout Persistence | Resets on every screen close | Persistent JSON memory (collapsible-game-rules-state.json) |
| Modded Rule Support | Flat, unorganized mod dumping | Auto-grouped with Namespace Prettification |
| Server Footprint | N/A | 100% Client-Side (Zero server install required) |
| Hot-Path Rendering | Repeated nested scanning | $O(N)$ Linear Tree Builder & 0B/frame caching |
🚀 In-Game Controls & Quick Start
Collapsible Game Rules is ready to use immediately upon installation. Operate the interface with intuitive mouse and keyboard controls:
| Input Action | Target Element | Functionality |
|---|---|---|
| Left-Click | Category Header Bar | Expands or collapses the selected category drawer. |
| Left-Click | [ Expand All ] Button |
Expands all category drawers simultaneously. |
| Left-Click | [ Collapse All ] Button |
Collapses all categories and resets scroll to the top. |
| Left-Click | ☕ Ko-fi Button |
Opens creator support link in external browser. |
| Left-Click | ↺ Reset Plate |
Resets all game rules within that category to default values. |
Right Arrow (→) |
Highlighted Category | Keyboard shortcut to expand the selected category. |
Left Arrow (←) |
Highlighted Category | Keyboard shortcut to collapse the selected category. |
| Enter / Space | Highlighted Category | Keyboard shortcut to toggle the selected category. |
| Search Input | Vanilla Search Bar | Real-time filtering with automatic expansion of matching categories. |
⚙️ Configuration & Persistence Architecture
[!IMPORTANT] 💡 Config vs. In-Game GameRules: The layout file only defines UI expansion states. In-game rule values are saved directly to your world save (
level.dat/game_rules.dat).
Collapsible Game Rules automatically saves your UI drawer layout to:
config/collapsible-game-rules-state.json
Schema Overview:
{
"schemaVersion": 1,
"expandedCategories": [
"gamerule.category.player",
"gamerule.category.spawning",
"gamerule.category.updates"
]
}
- Automatic Migration: Older unversioned configurations are safely upgraded to
schemaVersion: 1automatically upon launch. - Fail-Safe Recovery: If corrupted JSON syntax is detected, the mod logs a descriptive warning and gracefully initializes clean defaults without crashing the game.
- Optimized I/O: Disk writes only occur when you close the screen after making changes, ensuring 60+ FPS smoothness in menu screens.
📖 In-Depth How-To & Operational Playbook
1. Accessing the Modern Game Rules Screen
- World Creation: Navigate to Singleplayer ➔ Create New World ➔ Game Rules tab.
- Existing Worlds: From the world selection menu, select your world ➔ click Edit ➔ click Edit Game Rules (or access via pause menu settings where supported).
- The modern collapsible interface loads instantly with all categories neatly organized.
2. Streamlining Heavy Modpack Setup
- In large modpacks with dozens of mods installed, click
[ Collapse All ]at the top. - The entire screen condenses into a tidy list of category headers.
- Open only the category you need (e.g.
Spawningor your specific mod category). - Tweak your desired rule values without getting lost in hundreds of unrelated options.
3. Finding Settings with Smart Search
- Click the vanilla search bar at the top of the screen.
- Type any keyword (e.g.
tick,drop, orfire). - Only categories containing matching rules will remain visible, with matched terms highlighted in yellow and drawers automatically unfolded to display results.
- When you delete your search text, your custom expanded/collapsed view is restored.
4. Precision Resetting for a Single Category
- If you experimented with complex mob or spawning rules and want to revert them without touching player tweaks, locate the Mobs category header.
- Hover over the
↺plate on the right side of the header. - Click the plate. All rules in that category revert to their official default values instantly!
5. Multi-Session Persistence
- Once you configure your ideal layout (e.g. leaving
PlayerandUpdatesopen while keepingMisccollapsed), click Done. - Collapsible Game Rules commits your preferences to
collapsible-game-rules-state.json. - Every time you create a new world or edit settings, your preferred layout is ready.
🧩 Recommended Sister Mods
If you enjoy Collapsible Game Rules, these companion mods plug in seamlessly:
- 🧠 Dasik Library: The core universal foundation powering dynamic GameRule registration and auto-translation injection.
- 📦 Stack Size Adjuster: Customize item stack limits up to extreme quantities, with clean GameRules organized directly inside Collapsible Game Rules.
- 🌿 Natural Reproduction: Autonomous 27-species wildlife breeding and genetics configured through native categorized GameRules.
🌟 Explore my profile for more vanilla-friendly enhancements and standalone tools.
💬 Join the Community & Get Support
Looking for help, want to test early beta builds, or vote on upcoming features? Join my official Discord community!
☕ Support
If you enjoy the ecosystem, consider fueling future updates!
[!NOTE]
📜 Credits & Modpack Permissions
| Role / Property | Author / Link |
|---|---|
| Creator / Author | Dasik (Rifaditya) |
| Community | Official Discord |
| Collection | Universal UI Overhaul |
| License | GNU General Public License v3.0 (GPLv3) |
| Source Code | GitHub - Rifaditya/Collapsible-Game-Rule-Screen |
| Issue Tracker | GitHub Issues |
| Documentation / Wiki | GitHub Wiki |
[!IMPORTANT] 📦 Modpack Permissions & Distribution: You are fully welcome to include this mod in any modpack on any platform! However, the mod file must be downloaded directly through official distribution channels (Modrinth or CurseForge). Re-uploading, mirroring, or redistributing the original mod JAR to third-party mirror sites, scraper portals, or unauthorized launchers is strictly prohibited.
⚖️ License & Fork Guidelines (No Zero-Change Re-uploads): This project is open-source under the GNU GPLv3. You are fully encouraged to inspect the code, learn from it, and fork the repository to create genuine modifications, substantial feature expansions, or community ports—provided your project remains open-source under GPLv3 with proper attribution. However, straight 1:1 re-uploads, clone forks with no meaningful functional changes, or re-publishing identical builds under different project names (e.g. to farm downloads or rewards) are strictly forbidden.
Made with ❤️ for the Minecraft community
Part of the Universal UI Overhaul
How to Install Collapsible gamerules screen (Mod)
Collapsible gamerules screen by dasikigaijin is verified for Fabric across Minecraft versions 26.1, 26.1-pre-1, 26.1-pre-2, 26.1-pre-3, 26.1-rc-1, 26.1-rc-2, 26.1-rc-3, 26.1-snapshot-1 (latest release: 1.0.48+26.3, file size: 109 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (26.1, 26.1-pre-1, 26.1-pre-2, 26.1-pre-3, 26.1-rc-1, 26.1-rc-2, 26.1-rc-3, 26.1-snapshot-1) and platform (Fabric).
- Make sure you have the compatible loader or environment installed for Fabric.
- Move the downloaded Collapsible gamerules screen file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 4d ago | 1 | ||||
| 12d ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 3mo ago | 1 | ||||
| 3mo ago | 1 | ||||
| 3mo ago | 1 | ||||
| 3mo ago | 1 | ||||
| 3mo ago | 1 | ||||
| 3mo ago | 1 | ||||
| 3mo ago | 1 | ||||
| 4mo ago | 1 | ||||
| 4mo ago | 1 | ||||
| 4mo ago | 1 | ||||
| 4mo ago | 1 | ||||
| 4mo ago | 1 | ||||
| 6mo ago | 1 | ||||
| 7mo ago | 1 | ||||
| 8mo ago | 1 | ||||
| 8mo ago | 1 | ||||
| 8mo ago | 1 | ||||
| 9mo ago | 1 | ||||
| 9mo ago | 1 |
- Packaged baseline static refmap eliminating FabricLoader startup warning in published JARs, and added automated Pillar 5 refmap contract test.
- Links & Resources**:
- [Issue Tracker](https://github.com/Rifaditya/Collapsible-Game-Rule-Screen/issues)
- [Source Code](https://github.com/Rifaditya/Collapsible-Game-Rule-Screen)
- [Wiki & Documentation](https://dasik-mc-studio.pages.dev/collapsible-gamerules/)
- [Support on Ko-fi](https://ko-fi.com/dasikigaijin)
- [Discord Community](https://discord.gg/VSHP6mw4qY)
- Autonomous 5-Pillar Testing Harness Adoption**: Implemented comprehensive testing suite covering fuzzing, concurrent multi-threaded safety, search highlight invariants, and client UI state machine simulation.
- Obsolete Artifact Cleanliness**: Purged deprecated and unused
ModVersionGuard.javaand its unit test suite, eliminating historical dead code. - Thread Safety Fortification**: Guarded
GameRuleStateConfigwith synchronized persistence locks and encapsulated set operations to eliminate concurrent modification risks during background file I/O. - Client State Machine Simulation**: Added robust test harness verifying category expand/collapse state consistency, filter query highlighting, and idempotent state persistence.
- Links & Resources**:
- [Issue Tracker](https://github.com/Rifaditya/Collapsible-Game-Rule-Screen/issues)
- [Source Code](https://github.com/Rifaditya/Collapsible-Game-Rule-Screen)
- [Wiki & Documentation](https://dasik-mc-studio.pages.dev/collapsible-gamerules/)
- [Support on Ko-fi](https://ko-fi.com/dasikigaijin)
- [Discord Community](https://discord.gg/VSHP6mw4qY)
- Official Minecraft 26.3 Release Compatibility**: Full native support for the stable Minecraft 26.3 release runtime.
- Modern Input & Keyboard Navigation Architecture**: Updated key navigation to align natively with Minecraft 26.3's unified input subsystem for keyboard shortcuts and arrow-key category expanding/collapsing.
- Universal Dasik Library 1.9.2 Alignment**: Updated dependencies to consume the latest DasikLibrary APIs.
- Links & Resources**:
- [Issue Tracker](https://github.com/Rifaditya/Collapsible-Game-Rule-Screen/issues)
- [Source Code](https://github.com/Rifaditya/Collapsible-Game-Rule-Screen)
- [Wiki & Documentation](https://dasik-mc-studio.pages.dev/collapsible-gamerules/)
- [Support on Ko-fi](https://ko-fi.com/dasikigaijin)
- [Discord Community](https://discord.gg/VSHP6mw4qY)
- Category Reset Input Dispatch (
CollapsibleCategoryRuleEntry)**: Wired mouse click hitbox detection on the↺ Resetbutton plate, reverting all modified rules within the category back to their default values in-place without screen stutter. - Dynamic Live Modification Tracking**: Integrated
ResettableRuleEntryinterface acrossBooleanRuleEntryMixinandIntegerRuleEntryMixin, enabling real-time detection of modified rules as players toggle switches or drag sliders. - Live Reversion & Widget Synchronization**: Instantly syncs slider positions, toggle switches, text input boxes, and underlying
GameRulesto default values upon reset, dynamically clearing the↺ Resetbutton and restoring[X rules]badges. - Immediate Audio Feedback & Persistence**: Plays
SoundEvents.UI_BUTTON_CLICKat pitch1.0F, flushes category state viaGameRuleStateConfig.saveIfDirty(), and enriches screen reader narration with reset action hints.
- Category Reset Button UI (
CollapsibleCategoryRuleEntry)**: Rendered a subtle, elegant↺ Resetbutton plate in warm gold left of the rule count badge when a category contains modified rules (modifiedCount > 0). - Dynamic Title Clearance & Layout**: Automatically offsets category title clearance to guarantee zero visual collisions between expanding titles, marquee scrolling text, and the reset button.
- Visual Hover Illumination & Inert Fallthrough**: Added smooth glassmorphic plate hover highlights with border framing (
0x44FFAA00), keeping clicks visually inert in preparation for action wiring in Step 18.
- Category Reset Engine (
CategoryResetHelper)**: Implemented headless logic for comparing current game rule values (boolean, integer, and serialized string) against vanilla defaults to accurately detect category modification state. - Zero-Allocation State Evaluation**: Designed pure functional comparison checks and count boundary clamping (
clampModifiedCount) to maintain 0B heap allocation on UI tick paths. - Comprehensive Automated Tests**: Added complete JUnit 5 test suite in
CategoryResetHelperTestcovering boolean/integer deviations, trimmed strings, null-safe equality, and boundary clamping.
- Rule Tooltip & Description Search Highlighting**: Extended search highlighting to rule tooltips and description text via
RuleEntryAccessor, allowing players to instantly see why a rule matched even when the matched query resides in its description. - Visual Sequence Highlighting (
highlightSequence)**: Added character stream reconstruction and span partitioning toSearchHighlightHelperforFormattedCharSequenceinstances with zero-allocation fast-pathing on non-matches. - RuleEntry Mutator Accessor**: Implemented
RuleEntryAccessorexposing safe getters and@Mutablesetters forAbstractGameRulesScreen$RuleEntry.tooltip.
- Rule Label Search Highlighting**: Integrated
SearchHighlightHelperintoGameRuleEntryMixinto visually highlight matching substrings of game rule titles with high-contrast yellow styling (ChatFormatting.YELLOW) during active search queries. - Search Query Accessor**: Created
AbstractGameRulesScreenAccessorto seamlessly access active search box text across game rule entries. - Dynamic Split Preservation**: Automatically recalculates and formats multi-line wrapped text labels while preserving original formatting and layout boundaries.
- Search Highlight Engine**: Implemented
SearchHighlightHelperto partition search text into high-contrast highlighted spans (ChatFormatting.YELLOW), laying the architectural foundation for in-screen query highlighting. - Zero-Allocation Fast Paths**: Added instant fast-fail rejection for null, empty, or non-matching queries returning the original component directly with 0B heap allocation.
- Automated Test Coverage**: Added comprehensive JUnit 5 test suite in
SearchHighlightHelperTestverifying case-insensitive matching, prefix/suffix spans, multiple occurrences, and component identity preservation.
- Live Search Category Match Badges**: Dynamically switches category header badges to display live query match counts (
[● 1 match]or[● X matches]) in vibrant aqua (ChatFormatting.AQUA) during active search queries, providing instant category-level result feedback. - Dynamic Accessibility Narration**: Synchronized category screen reader narration (
NarratedElementType.USAGE) to announce live match counts when navigating filtered results with keyboard navigation. - Zero-Allocation Data Model Caching**: Integrated
withMatchCount(int)andcreateMatchBadge(int)within immutableCategoryGrouprecords, pre-caching visual components during list population to maintain 0B/frame heap allocation during active search scrolling.
- Interactive Integer Sliders (
IntegerRuleEntryMixin)**: Replaced vanilla text edit boxes with interactiveIntegerSliderWidgetfor bounded integer game rules (random_tick_speed,respawn_radius,players_sleeping_percentage,max_entity_cramming, etc.). - Graceful Unbounded Fallback**: Automatically preserves vanilla
EditBoxfor unbounded rules (max_command_sequence_length,max_command_forks, etc.), ensuring full player flexibility for arbitrary numeric entry. - Discrete Step Snapping & Value Sync**: Snaps slider position and handle cleanly to configured step intervals (e.g. 5% increments for
players_sleeping_percentage), seamlessly updating vanilla game rules viainput.setValue(). - Bounded Integer Slider Metadata & Helper Registry**: Created
GameRuleSliderHelperdefining safe numerical bounds, step intervals, and unit formatters for standard vanilla integer rules with comprehensive automated JUnit 5 test coverage. - Modern Boolean Toggle Switch Hook (
BooleanRuleEntryMixin)**: WiredBooleanToggleWidgetintoBooleanRuleEntry, replacing vanilla checkboxes with the modern emerald/ruby toggle switch across all boolean game rules with precision right-alignment (getContentRight() - 45). - Superclass Shadow Mixin Fix**: Eliminated superclass
@Shadowcalls onextractLabelandchildren, permanently fixing theInvalidMixinExceptionthat caused the screen to freeze on"Retrieving game rules... o O o".
- Modernize Boolean Toggle Switch Widget**: Overhauled
BooleanToggleWidgetwith emerald green[● ON]and ruby red[OFF ●]high-contrast pill aesthetics, translucent ambient background glow, and subtle outer pill borders (0x22FFFFFF). - Accent Indicator Thumbs & Audio**: Added vivid left/right accent indicators (
0xFF00FF66on ON,0xFFFF3333on OFF) and native UI button click audio cues (UI_BUTTON_CLICK). - Zero-Allocation Rendering**: Pre-cached static state component labels (
ON_LABELandOFF_LABEL) ensuring 0B heap allocation per render frame.
- Immediate Global Action Config Persistence**: Global
Expand AllandCollapse Allactions now invokeGameRuleStateConfig.saveIfDirty()immediately upon activation, guaranteeing world rule view preferences persist directly to disk without relying solely on screen close events. - Enhanced Screen Reader Narration (A11y)**: Added
NarratedElementType.USAGEinstructions inGlobalActionsRuleEntryinforming accessibility tools and screen readers of card positions (Expand All: Left card. Collapse All: Right card.) with zero frame-level allocations.
- Global Action Bounded Hitbox Input Validation**: Confined mouse click hitboxes in
GlobalActionsRuleEntrystrictly within card coordinate bounds, completely ignoring accidental clicks in the 6px center gap, padding, or outer margins. - UI Button Audio Feedback**: Valid card clicks trigger standard UI button click audio (
UI_BUTTON_CLICK), eliminating silent clicks or false audio triggers on empty margins. - Footer Separator Alignment**: Aligned the subtle separating hairline directly under the toolbar cards (
leftX - 4torightX + 4) with soft opacity (0x22AAAAAA) matching category card separators.
- Global Action Toolbar Symmetrical Card Geometry & Accents**: Refactored the top global actions toolbar from a raw split text row into two balanced, symmetrical glassmorphic action cards separated by a 6px central gap.
- Directional Icons & Category-Matching Accent Bars**: Features centered directional icons (
▼ Expand Alland▶ Collapse All) with a warm gold 2px accent strip for the Expand card and a crisp lime 2px accent strip for the Collapse card, matching category card aesthetics. - Dynamic Card Hover Elevation**: Card backgrounds illuminate cleanly on hover (
0x24FFFFFF) with text highlights (0xFFFFFFAA) and 0B heap allocation per frame.