Skip to content

Commit

Permalink
Instead of small redstone torch to highlight active zones, now we hav…
Browse files Browse the repository at this point in the history
…e two big redstone blocks and two torches.

- Less subtle, but really gets the point accross (and doesn't have the won't-work-on-glass problem). :)
  • Loading branch information
taoneill committed Feb 2, 2014
1 parent 0e481bb commit bed0385
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions war/src/main/java/com/tommytony/war/structure/WarHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,24 @@ public void resetZoneSign(Warzone zone) {
block.update(true);

if (zonePlayers > 0) {
// add redstone torch to gate if there are players in it (to highlight active zones)
zoneGate.getRelative(BlockFace.UP, 1).getRelative(left).getRelative(back, 1).setType(Material.REDSTONE_TORCH_ON);
// add redstone blocks and torches to gate if there are players in it (to highlight active zones)
zoneGate.getRelative(BlockFace.UP, 2).getRelative(left).setType(Material.REDSTONE_BLOCK);
zoneGate.getRelative(BlockFace.UP, 2).getRelative(left.getOppositeFace()).setType(Material.REDSTONE_BLOCK);
zoneGate.getRelative(BlockFace.UP, 2).getRelative(left).getRelative(back, 1).setType(Material.TORCH);
zoneGate.getRelative(BlockFace.UP, 2).getRelative(left.getOppositeFace()).getRelative(back, 1).setType(Material.TORCH);
} else {
zoneGate.getRelative(BlockFace.UP, 2).getRelative(left).getRelative(back, 1).setType(Material.AIR);
zoneGate.getRelative(BlockFace.UP, 2).getRelative(left.getOppositeFace()).getRelative(back, 1).setType(Material.AIR);

BlockState topLeftGateBlock = zoneGate.getRelative(BlockFace.UP, 2).getRelative(left).getState();
topLeftGateBlock.setType(War.war.getWarhubMaterials().getGateBlock().getType());
topLeftGateBlock.setData(War.war.getWarhubMaterials().getGateBlock().getData());
topLeftGateBlock.update(true);

BlockState topRightGateBlock = zoneGate.getRelative(BlockFace.UP, 2).getRelative(left.getOppositeFace()).getState();
topRightGateBlock.setType(War.war.getWarhubMaterials().getGateBlock().getType());
topRightGateBlock.setData(War.war.getWarhubMaterials().getGateBlock().getData());
topRightGateBlock.update(true);
}
} else {
War.war.log("Failed to find warhub gate for " + zone.getName() + " warzone.", Level.WARNING);
Expand Down

1 comment on commit bed0385

@taoneill
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this:

image

Please sign in to comment.