Overview#
Fx Control is a server-side utility mod designed to give modpack authors absolute control over player experiences. By utilizing a rule-based system defined in JSON files, you can automate the application of potion effects, set players on fire, or restrict block interactions based on a vast array of conditions such as biomes, dimensions, time of day, and even game stages.
In versions 1.18.2 and 1.19.2, Fx Control operates as a standalone mod. However, starting with Minecraft, its functionality has been merged into the In Control! mod. The configuration files are typically located in the config/fxcontrol/ directory (or config/rfcontrol/ in older versions).
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:
- Conditions: Tests that must be true for the rule to execute (e.g., "Is the player in the Nether?").
- Actions: The results of the rule (e.g., "Apply Slowness II").
- Result: Specifically for event files, this determines if the action is allowed or denied.
Conditions#
Conditions are the "if" part of the rule. Multiple conditions in a single rule act as an "AND" operation.
Environmental Conditions
- dimension: A list of dimension IDs (e.g.,
["minecraft:overworld", "minecraft:the_nether"]). - biome: A list of biome registry names (e.g.,
["minecraft:plains"]). - biometags (1.19+): Checks for specific biome tags (e.g.,
"#minecraft:is_forest"). - time: A range of daytime values (0-24000).
- minlight / maxlight: Checks the light level at the player's position.
- minheight / maxheight: Checks the player's Y-coordinate.
- block: The block the player is currently standing on.
Player & Item Conditions
- helditem: Checks the item in the player's main hand or offhand.
- gamestage: Integration with the Game Stages mod; checks if a player has a specific stage.
- baubles: Integration with Baubles; checks for specific equipped items.
- seasons: Integration with Serene Seasons; checks the current season.
Structure Conditions (1.19+)
- structure: Checks if the player is inside a specific structure (e.g.,
"minecraft:fortress"). - hasstructure: A boolean check to see if any structure exists at the location.
- structuretags: Checks for structure tags.
Actions and Results#
Actions define what happens when all conditions are met. Results are used in event-based files to permit or block player actions.
Effect Actions (effects.json)
| Action | Description | Example |
|---|---|---|
potion |
The registry name of the potion effect. | "minecraft:poison" |
amplifier |
The strength of the effect (0 is Level I). | 1 (Level II) |
duration |
How long the effect lasts (in ticks). | 200 (10 seconds) |
fire |
Sets the player on fire for a duration (seconds). | 5 |
damage |
Deals a specific amount of damage to the player. | 2.0 |
message |
Sends a chat message to the player. | "You feel a chill..." |
Event Results
In breakevents.json, placeevents.json, and click files, the result field is mandatory:
- allow: The action is permitted even if vanilla would normally block it.
- deny: The action is blocked (e.g., the block will not break or be placed).
- default: Follows standard vanilla behavior but applies any additional actions defined.
Compatibility#
Fx Control is built to work seamlessly with several popular mods to provide deeper integration for modpack creators:
- Game Stages: Restrict effects or interactions until a player reaches a certain progression milestone.
- Serene Seasons: Apply seasonal hazards, such as slowness during heavy snow in winter.
- Baubles / Curios: Trigger effects based on what accessories the player is wearing.
- The Lost Cities: Create rules that only apply when a player is inside specific building types or city sectors.
- EnigmaScript: Allows for complex scripting within the rule system.
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!"
}
]