Use FallenInserter to Inspect Method Returns
What FallenInserter Does
FallenInserter is a hook system that intercepts method calls during runtime. It allows custom code to inspect or replace the values that methods return, enabling mods to alter game behavior without rewriting entire methods.
How Hooks Work
When a hooked method executes, FallenInserter pauses execution and runs your custom logic. You can read the original return value, modify it, or substitute it entirely before the game continues.
Common Use Cases
Mods use FallenInserter to:
- Adjust damage calculations based on custom conditions
- Modify loot table results
- Alter attribute values on items or entities
- Intercept enchantment behavior
Configuration
Dependent mods configure FallenInserter hooks in their JSON patch files, specifying target methods and custom handler logic. As a player, you benefit from these hooks automatically when mods are installed.
Troubleshooting
If hooked behavior seems incorrect, verify all dependent mods are updated and compatible with your Fallen Lib version.