{{indexmenu_n>3}} ====== Action Requirements ====== Actions may have requirements they have to pass before executing the action itself. If an action does not pass its requirements it does not have a result, which makes it different from failing the action, despite not doing anything either. Sometimes this difference is used, for example in the [[actions:sequence_handlers:first_to_pass_requirements]] sequence handler and in [[items:dispense_behaviors]]. In other cases this is treated as if the action failed. The conditions use the following loot context parameters with the [[extras:loot_tables:loot_context_types:action]] [[mc>Loot_table#Loot_context_types|loot context type]]: ^ ''this_entity'' | The entity specified in ''context''. Is optional. | ^ ''origin'' | The position specified in ''context''. | ^ ''tool'' | The item stack from the context. Is optional. | ^ ''side'' | The side from the context. Is optional. | ===== Fields ===== ^ Name ^ Description ^ Type ^ Default Value ^ | ''context'' | The context to use for the conditions. | An [[actions:action_contexts#parameter_sets|action context parameter set]] | | | ''conditions'' | The actual conditions to pass. | A [[mc>Predicate|predicate]] | | ===== Example ===== { "context": { "entity": "this", "position": "target" }, "conditions": { "condition": "minecraft:location_check", "predicate": { "block": { "blocks": "minecraft:rooted_dirt" } } } }