Redstone checking, Thread or Event

Discussion in 'Resources' started by Telgar, Jun 18, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Telgar

    I am writing a plugin (duh) and have a few questions. I have been trying to use the REDSTONE_CHANGE event to monitor redstone power to designated blocks. But this is not very reliable for me, possibly because I dont know much about the event. My first question is, if a block is powered (block.isPowered()), is it also indirectly powered? Also, I dont understand when the event is triggered because simply placing a redstone torch does not trigger it at all, for any blocks.
    My other question is, would it be more reliable to create a separate Thread class to check the redstone power on specific blocks? I saw this in the source from another plugin.

    EDIT: Well I discovered that the REDSTONE_CHANGE event only triggers when a block that transmits or carries a current. So how do I know when a different block, like a sign in my plugin, receives redstone power?
     
Thread Status:
Not open for further replies.

Share This Page