-
Notifications
You must be signed in to change notification settings - Fork 0
26.2 Game Rule Presets and Controls
| Parameter | Specification |
|---|---|
| Preset Engine Class | net.instantgratification.collapsiblegamerules.preset.GameRulePresetEngine |
| Preset Data Structure | record Preset(String id, Component displayName, Map<String, Object> ruleValues) |
| Interactive Widgets |
IntegerSliderWidget, BooleanToggleWidget
|
| Slider Helper | net.instantgratification.collapsiblegamerules.util.GameRuleSliderHelper |
| Toggle On Color |
0x4400FF00 (Emerald Green Background) |
| Toggle Off Color |
0x44FF0000 (Ruby Red Background) |
| Built-in Presets |
builder ("๐ฐ Builder Mode"), fast_play ("โก Fast Play"), hardcore ("๐ Hardcore Realism") |
Collapsible Game Rules includes interactive UI controls and built-in Game Rule presets, allowing players to configure complex world settings with single-click profiles or intuitive sliders instead of typing raw integer values into text boxes.
The GameRulePresetEngine provides three pre-configured gameplay presets:
| Preset ID | Display Title | Game Rule | Configured Value | Gameplay Impact |
|---|---|---|---|---|
builder |
๐ฐ Builder Mode |
doDaylightCycledoWeatherCycledoMobSpawningkeepInventorymobGriefingdoFireTick
|
falsefalsefalsetruefalsefalse
|
Ideal for creative building: freezes sun/weather, stops mob spawns, disables creepers/fire spread. |
fast_play |
โก Fast Play |
randomTickSpeedplayersSleepingPercentagekeepInventory
|
100true
|
Fast-paced survival: accelerates crop growth ( |
hardcore |
๐ Hardcore Realism |
naturalRegenerationdoInsomniaplayersSleepingPercentage
|
falsetrue100
|
Extreme survival: disables passive health regen (golden apples/potions required), enforces phantom spawns. |
The IntegerSliderWidget replaces raw numeric text fields with draggable sliders for smooth integer adjustments.
When setting a slider position from an integer value
When computing the resulting integer value from the slider position
| GameRule Key | Minimum ( |
Maximum ( |
Vanilla Default |
|---|---|---|---|
randomTickSpeed |
0 |
100 |
3 |
spawnRadius |
0 |
32 |
10 |
playersSleepingPercentage |
0 |
100 |
100 |
maxEntityCramming |
0 |
100 |
24 |
maxCommandChainLength |
0 |
65536 |
65536 |
commandModificationBlockLimit |
0 |
65536 |
32768 |
The BooleanToggleWidget provides instant visual feedback for binary rules:
-
State: TRUE (
ON): Rendersโ ONinChatFormatting.GREENover a green background fill (0x4400FF00). -
State: FALSE (
OFF): Rendersโ OFFinChatFormatting.REDover a red background fill (0x44FF0000). -
Mouse Press: Single click toggles state and executes the consumer callback
onToggle.accept(newState).
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ ON โ โ โ OFF โ
โ (Green Tint 0x4400FF00)โ โ (Red Tint 0x44FF0000) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ
Collapsible Game Rules โข Built & Maintained by Dasik (Rifaditya)
Released under the GNU General Public License v3.0 (GPL-3.0-or-later)
GitHub Repository โข Modrinth โข CurseForge โข Issue Tracker
๐ Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.
- ๐๏ธ Collapsible Categories
- ๐ Global Actions & Bulk Toggles
- ๐ Smart Search Integration
- โจ๏ธ Keyboard Navigation & Accessibility
- ๐ง State Persistence & JSON Config
- โจ Category Prettification & Naming
- ๐๏ธ Game Rule Presets & Widgets
- ๐ GameRules Reference Table
- ๐ฌ Brigadier Commands & Absence Scope
- ๐ Advancements & Absence Scope
- ๐ฅ๏ธ HUD, Diagnostics & Rendering
- ๐ ๏ธ Developer Setup & Gradle Builds
- ๐งฉ Architecture & Mixin Subsystem
- ๐ DasikLibrary API Integration