Ejemplo n.º 1
0
 /**
  * Ignores signs of current-tick redstone changes caused by the lever
  *
  * @param lever to ignore
  */
 public void ignoreOutputLever(Block lever) {
   // Ignore signs that are attached to the block the lever is attached to
   Block att = BlockUtil.getAttachedBlock(lever);
   for (BlockFace face : FaceUtil.ATTACHEDFACES) {
     Block signblock = att.getRelative(face);
     if (MaterialUtil.ISSIGN.get(signblock)
         && BlockUtil.getAttachedFace(signblock) == face.getOppositeFace()) {
       if (ignoredSigns.isEmpty()) {
         // clear this the next tick
         CommonUtil.nextTick(
             new Runnable() {
               public void run() {
                 ignoredSigns.clear();
               }
             });
       }
       ignoredSigns.add(signblock);
     }
   }
 }