Origins: Powerful Powers
» Block conditions » Redstone power

Redstone power

origins-powerful-powers:redstone_powerblock conditionalso an entity condition

The redstone signal strength at a block, from 0 to 15.

FieldTypeDefaultDescription
modeString"received"Which signal to read. See below.
directionStringnoneOnly for mode: emitted: the side the signal leaves through, down, up, north, south, west or east. Left out: the strongest side.
comparisonComparisonrequired
compare_toIntegerrequired0 to 15

The three modes are vanilla's three redstone reads:

modeReadsUse it for
receivedthe strongest signal reaching the block from any side"is this block powered?", the way a lamp, piston or door checks
strongthe strongest strong power going into the blockwhether a solid block is powered hard enough to pass power on to wire next to it
emittedwhat the block itself sends outwire, torches, levers, buttons, pressure plates and powered solid blocks
  • A block with nothing powering it reads 0 in every mode.
  • emitted with a direction is 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.

json
{
  "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.

json
{
  "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.

json
{
  "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. received is power coming into that block from its neighbours, so a pressure plate you stand on reads 0 and a strongly powered block under you counts. For the block underneath, use origins:on_block with the block condition, as in the first example.
json
{
  "type": "origins-powerful-powers:redstone_power",
  "comparison": ">=",
  "compare_to": 1
}

Attribute: redstone_power (the same value, for players)