daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Redstone fence gates
  2. Block block = event.getBlock();
  3. for(BlockFace face: BlockFace.values()) {
  4.     faceBlock = block.getRelative(face);
  5.     if (faceBlock.getType() == Material.FENCE_GATE) {
  6.         byte data = faceBlock.getData();
  7.         if (block.isBlockPowered() || block.isBlockIndirectlyPowered()) {
  8.             if (ra.contains(block.getLocation)) { continue; }
  9.             ra.add(block.getLocation());
  10.             data += 4;
  11.         } else {
  12.             ra.remove(block.getLocation());
  13.             data -= 4;
  14.         }
  15.         faceBlock.setData(data);
  16.     }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top