Redstone power
origins-powerful-powers:redstone_powerblock conditionalso an entity condition
The redstone signal strength at a block, from 0 to 15.
| Field | Type | Default | Description |
|---|---|---|---|
mode | String | "received" | Which signal to read. See below. |
direction | String | none | Only for mode: emitted: the side the signal leaves through, down, up, north, south, west or east. Left out: the strongest side. |
comparison | Comparison | required | |
compare_to | Integer | required | 0 to 15 |
The three modes are vanilla's three redstone reads:
mode | Reads | Use it for |
|---|---|---|
received | the strongest signal reaching the block from any side | "is this block powered?", the way a lamp, piston or door checks |
strong | the strongest strong power going into the block | whether a solid block is powered hard enough to pass power on to wire next to it |
emitted | what the block itself sends out | wire, torches, levers, buttons, pressure plates and powered solid blocks |
- A block with nothing powering it reads
0in every mode. emittedwith adirectionis what the neighbour on that side receives from this block. A redstone torch sends 15 to the sides and up, and 0 into the block it's attached to. A strongly powered solid block counts that power as emitted, as vanilla does.- It's read when the condition runs, so it follows redstone the same tick it changes.
Example: "Current sense". While you stand on a powered block, you're faster.
{
"type": "origins:conditioned_attribute",
"condition": {
"type": "origins:on_block",
"block_condition": {
"type": "origins-powerful-powers:redstone_power",
"comparison": ">",
"compare_to": 0
}
},
"modifier": {
"attribute": "minecraft:generic.movement_speed",
"operation": "multiply_base",
"value": 0.3
},
"tick_rate": 1
}Example: any fully powered block within 5 blocks of you.
{
"type": "origins:block_in_radius",
"radius": 5,
"block_condition": {
"type": "origins-powerful-powers:redstone_power",
"comparison": "==",
"compare_to": 15
},
"comparison": ">=",
"compare_to": 1
}Example: a lever that's on, checked from the side the signal leaves through.
{
"type": "origins-powerful-powers:redstone_power",
"mode": "emitted",
"direction": "up",
"comparison": ">",
"compare_to": 0
}As an entity condition
origins-powerful-powers:redstone_powerentity condition
The received signal at the block the entity's feet are in, the same as the block condition with no mode, run on that block. It has only comparison and compare_to (Integer, 0 to 15).
- The feet block is the one the entity stands in.
receivedis power coming into that block from its neighbours, so a pressure plate you stand on reads0and a strongly powered block under you counts. For the block underneath, useorigins:on_blockwith the block condition, as in the first example.
{
"type": "origins-powerful-powers:redstone_power",
"comparison": ">=",
"compare_to": 1
}Attribute: redstone_power (the same value, for players)