I want to change the state of a lever from a plugin. Simply changing bit 0x8 of the data value and calling update() does not quite work - it does change the lever, but does not notify neighbouring blocks of the change, so that adjacent redstone does not get updated. (It probably also doesn't make a redstone update hook call, but I haven't tested that yet).
When the lever is on and an adjacent piece of redstone is off, the next call to update() drops the lever as an item.
block.getWorld.setBlock(block) instead of update results in exactly the same behaviour.
Similar issues might exist for other redstone blocks, but I haven't tested anything else yet.
I want to change the state of a lever from a plugin. Simply changing bit 0x8 of the data value and calling
update()
does not quite work - it does change the lever, but does not notify neighbouring blocks of the change, so that adjacent redstone does not get updated. (It probably also doesn't make a redstone update hook call, but I haven't tested that yet).When the lever is on and an adjacent piece of redstone is off, the next call to
update()
drops the lever as an item.block.getWorld.setBlock(block)
instead ofupdate
results in exactly the same behaviour.Similar issues might exist for other redstone blocks, but I haven't tested anything else yet.