Zarius / Bukkit-OtherBlocks

OtherBlocks (now known as OtherDrops) plugin for Bukkit (dev build: https://www.mediafire.com/?i6ows1g6kus2o0l)
http://dev.bukkit.org/server-mods/otherdrops/
GNU General Public License v3.0
17 stars 17 forks source link

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

Open Zarius opened 11 years ago

Zarius commented 11 years ago

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

CelticMinstrel commented 11 years ago

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.

Zarius commented 11 years ago

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.

CelticMinstrel commented 11 years ago

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.

CultistO commented 11 years ago

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