Power redstone

Discussion in 'Plugin Development' started by Cybran, Feb 6, 2011.

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

    Cybran

    How can I power a redstone wire (change its current) or make a redstone power source?
    Given is the block which shall be powered.
     
  2. Offline

    eisental

    As far as I know, it's impossible to change redstone wire current directly. You can use a lever as a power source, and change its block data value.

    Like this:
    Code:
    byte data = leverBlock.getData();
    boolean state = true or false for on and off
    
    if (state) {
            data = (byte)data | 0x8;
    } else {
            data = (byte)data & 0x7;
    }
    
    lever.setData(data);
    
    
    
     
Thread Status:
Not open for further replies.

Share This Page