-
Notifications
You must be signed in to change notification settings - Fork 2
Actions
Actions determine what you can do in a given profession. They encompass an action type, a set of conditions, and given rewards for successfully completing that action.
Professions comes with 13 builtin actions currently. Block Break, Place Block, TNT Destroy, Kill Entity, Fishing, Crafting, Taking items out of furnaces, smelting items in furnaces, brewing, enchanting, breeding, taming, and trading with villagers.
An action goes in the "actions" array in the datapack and can be defined like so
{
"action": "professions:break_block",
"conditions": [],
"rewards": [
{
"reward": "professions:occupation_exp",
"amount": 1.0
},
{
"reward": "professions:payment",
"amount": 1.0,
"currency": "eights_economy:dollars"
}
],
"blocks": [
"#minecraft:terracotta"
]
}
"action" refers to the internal action name of one of the 13 types. Those types all use "professions:<type>"
The types include "break_block"
, "place_block"
, "tnt_destroy"
, "kill_entity"
, "catch_fish"
, "craft_item"
, "take_smelted_item"
, "on_item_smelted"
, "brew"
, "enchant"
, "breed"
, "tame"
, "villager_trade"
Read more about conditions here
Read more about rewards here