Power tags
A power tag is a name for a group of powers, listed in a datapack file. You tag powers from outside, including powers from Origins itself or another pack, and keep "which powers does this apply to?" in one place.
The file
Each pack has one file: data/<namespace>/opp_power_tags.json. It maps a tag name to the powers in it.
{
"movement": [
"mypack:double_jump",
"mypack:wall_climb",
"gravity-shifter:*"
],
"otherpack:unsilenceable": [
"mypack:heartbeat"
]
}*matches any run of characters, sogravity-shifter:*is every power in that pack, andmypack:fire_*is every power whose id starts that way.- A tag name without a namespace gets the pack's own. In
data/mypack/opp_power_tags.json,"movement"is the tagmypack:movement, so two packs can each use short names without colliding. Write the full name, like"otherpack:unsilenceable"above, to add powers to another pack's tag. - Files from every pack are merged. If two packs both add to
otherpack:unsilenceable, the tag holds both lists. Entries for powers from a missing pack match nothing. - Entries are unchecked. A typo matches no powers. Check with
/opp powertag. /reloadreloads the file.
Tags cover powers. To group origins, tag a power each of those origins grants.
Has power tag
origins-powerful-powers:has_power_tagentity condition and bi-entity condition
True when the entity holds a power in that tag.
| Field | Type | Default | Description |
|---|---|---|---|
tag | String | required | The tag name. Without a namespace it gets this power's own namespace, so a power in mypack asking for "movement" means mypack:movement. |
include_inactive | Boolean | false | By default only active powers count (their own condition is true). true counts every power the entity has. |
- Hidden powers count, including the sub-powers of
origins:multiple. - The bi-entity version tests the target.
- It works for any entity that can have powers.
Example: an anti-magic aura. Hits from anyone holding a power tagged mypack:magic hurt you less.
{
"type": "origins:modify_damage_taken",
"bientity_condition": {
"type": "origins-powerful-powers:has_power_tag",
"tag": "mypack:magic"
},
"modifier": {
"operation": "multiply_total_multiplicative",
"value": -0.5
}
}Example: a speed bonus for players without a flight ability.
{
"type": "origins:conditioned_attribute",
"condition": {
"type": "origins-powerful-powers:has_power_tag",
"tag": "mypack:flight",
"inverted": true
},
"modifier": {
"attribute": "minecraft:generic.movement_speed",
"operation": "multiply_base",
"value": 0.15
}
}Listing tagged powers
The power_list power takes a tag field, so a list holds only the holder's powers in that tag:
{
"type": "origins-powerful-powers:power_list",
"variable": "my_magic",
"tag": "mypack:magic",
"only_active": true
}From there, my_magic.size(), for_each and the other list tools work as usual (page 11).
/opp powertag
opp powertag list
opp powertag list <tag>
opp powertag of <power>Shows what the tag files resolved to after loading. Use it to catch typos and overly broad wildcards.
| Subcommand | What it prints | Result |
|---|---|---|
list | every tag and how many loaded powers it covers | the number of tags |
list <tag> | the powers in that tag, and the entries it was written with | how many powers |
of <power> | every tag that power is in | how many tags |
opp powertag list mypack:magic
opp powertag of origins:phantomize