World State
Location
Entity State (Context)
What is the Minecraft Predicate Debugger?
The Minecraft Predicate Debugger is a production-ready tool designed to help data pack creators, map makers, and server admins validate and simulate their predicate JSON logic.
Instead of launching the game, reloading data packs, and running /execute if predicate hundreds of times, you can now simulate the game state directly in your browser.
How It Works
Predicates (found in `data/namespace/predicates/`) use JSON to test specific conditions in the Minecraft world. This tool works by parsing that JSON and running it against a "Mock World" that you control.
- Input: Paste your JSON file into the editor.
- Configure: Set the "raining" toggle to true, change the "biome" to `minecraft:desert`, or adjust the time.
- Analyze: The tool runs the logic tree (handling nested `any_of` and `all_of` gates) and shows you exactly why a condition passed or failed.
Common Use Cases
Why is my weather check failing?
A common mistake is checking for rain in a biome where it doesn't rain (like Deserts or Savannas). Use the location settings to test if your location check conflicts with your weather check.
How do I debug "any_of" vs "all_of"?
Nested logic is hard to visualize. Our debugger breaks down the tree, showing you which branch of an OR gate passed, so you know if your fallback logic is working.
Tips for Better Data Packs
- Inverted Logic: Be careful with double negatives. Use the "inverted" logic sparingly or check the explanation output to ensure `inverted: false` means what you think it means.
- Performance: Predicates are faster than checking NBT in commands. Use `entity_properties` flags (is_sneaking) instead of slow NBT checks whenever possible.
- Context Matters: Remember that some predicates (like `damage_source_properties`) require a specific context (like a player hurting a mob) and will always fail if run from a generic command block.
Read Also: