Fx Control Mod — Configuration
Configuration Files
The mod's behavior is defined through five primary JSON files. Each file handles a specific type of event or state.
| File Name | Purpose |
|---|---|
effects.json |
Adds potion effects or sets the player on fire based on environmental conditions. |
breakevents.json |
Controls what happens when a player attempts to break a block (can prevent breaking). |
placeevents.json |
Controls what happens when a player attempts to place a block (can prevent placement). |
leftclicks.json |
Manages actions and restrictions when a player left-clicks a block. |
rightclicks.json |
Manages actions and restrictions when a player right-clicks a block. |
Rule Structure
Every rule within these files consists of three main parts: 1. Conditions: Tests that must be true for the rule to execute (e.g., "Is the player in the Nether?"). 2. Actions: The results of the rule (e.g., "Apply Slowness II"). 3. Result: Specifically for event files, this determines if the action is allowed or denied.
Commands
The mod provides administrative commands to help test and reload configurations without restarting the game.
/fxcontrol reload: Reloads all JSON configuration files from the disk. This is essential for testing changes toeffects.jsonor event files./fxcontrol debug: Toggles debug mode. When active, the mod will output detailed information to the server log whenever a rule is evaluated, helping to identify why a specific effect is or isn't triggering.
Example Configurations
Poison in the Nether (effects.json)
This rule applies Poison I to any player in the Nether who is not wearing a full set of gold armor (assuming gold armor is checked via other conditions or NBT).
[
{
"dimension": "minecraft:the_nether",
"potion": "minecraft:poison",
"amplifier": 0,
"duration": 100
}
]
Prevent Breaking Diamond Ore (breakevents.json)
This rule prevents players from breaking Diamond Ore unless they have reached the "expert" game stage.
[
{
"block": "minecraft:diamond_ore",
"gamestage": "expert",
"result": "allow"
},
{
"block": "minecraft:diamond_ore",
"result": "deny",
"message": "You do not have the knowledge to mine this!"
}
]