Skip to content

⚙️ Configuration & GameRules (Minecraft 26.3)

📌 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.

1. Official Infobox

ParameterTechnical Details
Subsystem NameConfiguration & Dynamic GameRule System
Config File.minecraft/config/potion-stacker.json
Config Version1 (public static final int VERSION = 1;)
Config ManagerPotionStackerConfig.java (backed by ConfigHelper)
GUI ProviderYetAnotherConfigLib v3 (YaclScreenHelper.java)
ModMenu BridgeModMenuIntegration.java (GuiHelper.getOptionalYaclFactory)
GameRule Categorypotion-stacker-addon:potion-stacker-addon
Player Freedom Range$1 \dots 2{,}147{,}483{,}647$ (Integer.MAX_VALUE)
Warning ThresholdValues $> 39{,}768{,}215$ trigger safe ceiling warning

2. Step-by-Step Player & Administrator Workflow

  1. Editing Global Defaults (Title Screen):

    • Navigate to Mods -> Potion Stacker Addon -> Configure (or click the gear icon).
    • The YACL interface allows configuring Potion Limit and Stew & Soup Limit.
    • Global configuration changes saved here define the initial default GameRules for newly created worlds.
  2. Configuring Active Worlds via Commands:

    • To change limits in an existing singleplayer world or dedicated server, run: /gamerule potion-stacker-addon:potion_limit <value>/gamerule potion-stacker-addon:stew_limit <value>
    • Changes apply immediately without server restart.
  3. In-Game GameRules GUI:

    • When creating or editing a world, click Edit Game Rules.
    • Scroll to the Potion Stacker Addon category.
    • Mutate values directly with full integer validation.

3. Mathematical Formulas & Range Governance

The Player Agency & Anti-Nanny Invariant

In accordance with our core design constitution, Potion Stacker Addon never imposes artificial gameplay ceilings or restrictive arbitrary caps. The valid mathematical domain is: $$D = { x \in \mathbb{Z} \mid 1 \le x \le 2^{31}-1 }$$

Large Chest Capacity & Integer Overflow Math

A double chest consists of 54 slots. The safe ceiling $S_{\text{safe}}$ before total container item count overflows a signed 32-bit integer is: $$S_{\text{safe}} = \left\lfloor \frac{2^{31}-1}{54} \right\rfloor = 39{,}768{,}215$$

When an administrator inputs a value $v > 39{,}768{,}215$, YACL displays the contextual warning: $$\text{Warning}(v): \text{"⚠️ Large stack counts can cause container integer overflows!"}$$ However, players retain full liberty to proceed if desired.


4. Visual ASCII Configuration Flowchart

   [ User Edits Config in Main Menu ]
                   |
                   v
   Saves to .minecraft/config/potion-stacker.json
                   |
         +---------+---------+
         |                   |
         v                   v
  [ New World Created ]  [ Existing World Loaded ]
         |                   |
   isInitialized = false     isInitialized = true
         |                   |
   Apply config values       Load saved GameRules from
   directly to GameRules     level.dat (Config does NOT overwrite)
         |                   |
         +---------+---------+
                   |
                   v
         [ In-Game World Active ]
                   |
                   v
   Operator runs /gamerule potion-stacker-addon:potion_limit
                   |
                   v
   Mutates live world state & broadcasts S2C sync packet

5. JSON Configuration Schema

File Location: .minecraft/config/potion-stacker.json

json
{
  "configVersion": 1,
  "potionLimit": 16,
  "stewLimit": 16
}
JSON FieldTypeDefaultRationale
configVersioninteger1Schema version tracking for backward-compatible migrations
potionLimitinteger16Baseline default stack limit for all potion items
stewLimitinteger16Baseline default stack limit for stews and soups

6. Exhaustive Reference Matrix

IdentifierTypeDefaultRangeIn-Game Command
potion-stacker-addon:potion_limitInteger16$1 \dots 2{,}147{,}483{,}647$/gamerule potion-stacker-addon:potion_limit <int>
potion-stacker-addon:stew_limitInteger16$1 \dots 2{,}147{,}483{,}647$/gamerule potion-stacker-addon:stew_limit <int>

Localization Keys (lang/en_us.json):

  • config.potion-stacker-addon.title: Potion Stacker Addon
  • config.potion-stacker-addon.category.general: General Settings
  • config.potion-stacker-addon.group.categories: Potion Stacking Configuration
  • config.potion-stacker-addon.option.potion_limit: Potion Limit
  • config.potion-stacker-addon.option.stew_limit: Stew & Soup Limit
  • gamerule.category.potion-stacker-addon.potion-stacker-addon: Potion Stacker Addon
  • gamerule.potion-stacker-addon.potion_limit: Potion Limit
  • gamerule.potion-stacker-addon.stew_limit: Stew & Soup Limit

7. Developer & Config Hooks

GameRule Registration with DasikLibrary (PotionStackerFabric.java):

java
POTION_LIMIT = DynamicGameRuleManager.integerRule(MOD_ID + ":potion_limit", CUSTOM_CATEGORY, PotionStackerConfig.get().potionLimit)
    .name("Potion Limit")
    .description("Maximum stack size for potions. Default: 16")
    .range(1, Integer.MAX_VALUE)
    .register();

YACL Controller Builder (YaclScreenHelper.java):

java
.controller(opt -> IntegerFieldControllerBuilder.create(opt)
    .min(1)
    .max(Integer.MAX_VALUE)
)

Official documentation & web portal for Dasik Igaijinn mods.