Shader (Power Type)
Applies a post-processing shader to the vision of the entity that has the power.
Applies a post-processing shader to the vision of the entity that has the power.
Type ID: apoli:shader
For more information about post-processing shaders, visit Minecraft Wiki: Shaders (Before 1.9)
Fields
| Field | Type | Default | Description |
|---|---|---|---|
shader | Identifier | Specifies the location of the shader resource file to use. | |
toggleable | Boolean | true | Determines if the applied shader can be toggled. |
priority | Integer | 0 | Which shader wins when the entity holds more than one Shader power at once. Highest priority is applied; ties are broken arbitrarily. |
Behaviour
Only one post-processing shader can be active at a time, so Apoli picks the highest-priority Shader power whose condition currently passes and loads that one. The choice is re-evaluated every tick, so a shader gated behind a condition switches on and off with it, and removing the last matching power restores the normal view.
The choice is made on the server and sent to the client, so any entity condition works here — including ones that read state the client does not have, like apoli:inventory over a power inventory, apoli:advancement, apoli:scoreboard or apoli:command.
If the entity is spectating something else, the shader comes from whatever it is spectating, not from the spectator.
A shader file that fails to load (missing file, malformed JSON) is reported once and then ignored, so a typo does not spam the log every frame. Fix the file and reload resources (F3+T) to retry it.
Both sides need Apoli: the server decides which shader applies and the client binds it. A client that is never told about the shader simply does not show it — nothing crashes, the effect just never appears.
Examples
{
"type": "apoli:shader",
"shader": "minecraft:shaders/post/pencil.json"
} This example makes the player view the world as a pencil sketch!
{
"type": "apoli:shader",
"shader": "minecraft:shaders/post/sobel.json",
"toggleable": false,
"priority": 10,
"condition": {
"type": "apoli:power_active",
"power": "example:night_sight"
}
} The sobel shader is only applied while the example:night_sight power is active, it outranks any other Shader power the entity holds, and the player cannot toggle it off.