OtherDrops

226k Downloads

Extend "powered" detection of blocks to include buttons, etc

Zarius opened this issue ยท 4 comments

commented

Consider a block to be powered if buttons, levers or pressure plates are "north/south/east/west" of the block (and "below" for a plate) and "if block is above a redstone torch".

commented

Um... is it actually necessary to code the logic of when a block is powered? Is there no way to simply get this from the API? If there's no way, perhaps a Bukkit ticket should be submitted about this.

commented

To my understanding only "redstone" type blocks (lamps, doors, noteblock, etc) support isPowered(). Any block that doesn't normally "conduct" is never considered to be powered.

This seemed to be by design although it would be nice to have a method to check if the block has power to it regardless of conductivity.

commented

That's true, only those that conduct have a MaterialData that implements Redstone... still, if there's no way to get whether an arbitrary block is powered, then perhaps a feature request should be made to Bukkit.

commented

agreed, it seems like the kind of thing mods would be able to do, and also the kind of thing they would frequently want to do