-
Notifications
You must be signed in to change notification settings - Fork 0
Client GameRule and GUI Helpers
Rifa edited this page Aug 9, 2026
·
1 revision
| Helper Class | Environment | Purpose |
|---|---|---|
ClientGameRuleHelper |
Client Singleplayer / Integrated Server | Queries integrated server GameRules on client thread |
ConfigHelper |
Common (Client/Server) | Atomic JSON config loading, saving, and backup swaps |
GuiHelper |
Client | Optional ModMenu / Cloth Config screen helpers |
To allow 100% server-side compatibility without dedicated server crashes, client-side GUI and integrated server helpers use lazy classloading checks (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT).
DynamicGameRuleManager.getInt(level, ruleKey)
โ
โโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
โผ โผ
[ level instanceof ServerLevel ] [ Client Environment ]
โ โ
โผ โผ
Direct Level Lookup ClientGameRuleHelper
(Queries Integrated Server)
ConfigHelper provides robust JSON file persistence with atomic swap logic:
- Writes new configuration data to temporary file
config.json.tmp. - Validates JSON structure and file size.
- Creates automatic backup
config.json.bak. - Performs atomic file swap
config.json.tmp->config.jsonviaFiles.move(..., StandardCopyOption.ATOMIC_MOVE).
Dasik Library | Social AI & Infrastructure Engine
Developed with โค๏ธ by Dasik (Rifaditya) | Licensed under LGPL-3.0
๐ Documentation reflects active repository source code state.
- Hive Mind Social System
- Social Scheduler & Events
- Animal Genetics Engine
- Genetics API & Pedigree
- Genetics Loot Modifiers
- Leader Follower & Flocking
- Dynamic GameRules Manager
- GameRule Codec & Serialization
- Client GameRule & GUI Helpers
- Dynamic Enchantments & Vision
- Stochastic & Math Utilities
- Stale Attribute Purging & Scale
- ModVersionGuard & Startup Safety
- Developer Setup & Building
- Architecture & Package Layout
- Mixin Reference & Hooks
- Behavior Profiles & Conditions
- Consumer Mods Integration Guide