Origins (1.8.1)
Curse Maven Snippet
What's new
### Added
- **`icon` accepts a texture.** An origin can now point at an image instead of an item:
```json
{
"icon": {
"texture": "example:textures/gui/origins/merling.png",
"width": 32,
"height": 32
}
}
```
`width` and `height` describe the **source file**, not the drawn size. The image is always scaled into the 16×16 icon slot, so a 32×32 PNG needs them set or it is drawn cropped. Both default to `16`. This removes the usual workaround of registering an item that exists purely to be a picture in the selection screen. A texture icon is a plain image: no enchantment glint, no item tooltip, no durability bar, use the item form when you want those.
- **Origins and layers are Apoli power sources.** An origin id now resolves to the powers it grants, and a layer id to the powers of every origin in it, which makes these work:
```mcfunction
power grantall @s example:phoenix
power revokeall @s example:phoenix
```
```json
{
"type": "apoli:grant_all_powers",
"from": "example:phoenix"
}
```
- **`origin` and `origin_layer` entity selector options.** Filter players by their origin anywhere a selector is accepted like commands, predicates, `/execute`, advancement rewards:
```mcfunction
say @a[origin=example:phoenix]
say @a[origin=!example:human]
execute as @a[origin_layer=origins:origin] run say I have picked something
```
Both accept `!` for negation and tab-complete their values. Apoli registers the option names and Origins supplies the behavior, so Apoli itself never depends on Origins.
### Changed
- The two existing `icon` forms: a bare item id, and a full item stack object are unchanged. Existing origins load exactly as before.
### Notes
- Revoking a power an origin granted is still temporary — the origin re-applies its powers on relog, `/reload`, or a layer revalidation. Change the player's origin if you want it to stick.
This mod has no additional files

