mirror of
https://github.com/taoneill/war.git
synced 2024-11-30 06:03:23 +01:00
Basic support for RB 1.4.5-R1.0.
Backward compatible with 1.4.5-R0.2 and previous. Switched version to War v1.7.4-PREVIEW. Lobbies and warhubs should line up properly now, at least. Commands such as '/setzonelobby east' still use the wrong directions.
This commit is contained in:
parent
381047f915
commit
0245476130
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<groupId>com.tommytony</groupId>
|
<groupId>com.tommytony</groupId>
|
||||||
<artifactId>war</artifactId>
|
<artifactId>war</artifactId>
|
||||||
<version>1.7.3</version>
|
<version>1.7.4-PREVIEW</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>War</name>
|
<name>War</name>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.4.5-R0.2</version>
|
<version>1.4.5-R1.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -22,6 +22,7 @@ import com.tommytony.war.config.TeamKind;
|
|||||||
import com.tommytony.war.config.TeamSpawnStyle;
|
import com.tommytony.war.config.TeamSpawnStyle;
|
||||||
import com.tommytony.war.structure.Bomb;
|
import com.tommytony.war.structure.Bomb;
|
||||||
import com.tommytony.war.structure.Cake;
|
import com.tommytony.war.structure.Cake;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.utility.SignHelper;
|
import com.tommytony.war.utility.SignHelper;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
@ -166,16 +167,16 @@ public class Team {
|
|||||||
// SMALL style
|
// SMALL style
|
||||||
if (yaw >= 0 && yaw < 90) {
|
if (yaw >= 0 && yaw < 90) {
|
||||||
signData = 10;
|
signData = 10;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.NORTH).getRelative(BlockFace.WEST);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.NORTH()).getRelative(Direction.WEST());
|
||||||
} else if (yaw >= 90 && yaw <= 180) {
|
} else if (yaw >= 90 && yaw <= 180) {
|
||||||
signData = 14;
|
signData = 14;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.NORTH).getRelative(BlockFace.EAST);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.NORTH()).getRelative(Direction.EAST());
|
||||||
} else if (yaw >= 180 && yaw < 270) {
|
} else if (yaw >= 180 && yaw < 270) {
|
||||||
signData = 2;
|
signData = 2;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.SOUTH).getRelative(BlockFace.EAST);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.SOUTH()).getRelative(Direction.EAST());
|
||||||
} else if (yaw >= 270 && yaw <= 360) {
|
} else if (yaw >= 270 && yaw <= 360) {
|
||||||
signData = 6;
|
signData = 6;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.SOUTH).getRelative(BlockFace.WEST);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.SOUTH()).getRelative(Direction.WEST());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// outer ring (FLAT or BIG)
|
// outer ring (FLAT or BIG)
|
||||||
@ -203,10 +204,10 @@ public class Team {
|
|||||||
BlockFace facing = null;
|
BlockFace facing = null;
|
||||||
BlockFace opposite = null;
|
BlockFace opposite = null;
|
||||||
if (yaw >= 0 && yaw < 90) {
|
if (yaw >= 0 && yaw < 90) {
|
||||||
facing = BlockFace.NORTH_WEST;
|
facing = Direction.NORTH_WEST();
|
||||||
opposite = BlockFace.SOUTH_EAST;
|
opposite = Direction.SOUTH_EAST();
|
||||||
signData = 10;
|
signData = 10;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.WEST, 2);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.NORTH(), 2).getRelative(Direction.WEST(), 2);
|
||||||
|
|
||||||
if (style.equals(TeamSpawnStyle.BIG)) {
|
if (style.equals(TeamSpawnStyle.BIG)) {
|
||||||
// rim
|
// rim
|
||||||
@ -236,10 +237,10 @@ public class Team {
|
|||||||
this.setBlock(x + 2, y + 3, z - 2, this.kind);
|
this.setBlock(x + 2, y + 3, z - 2, this.kind);
|
||||||
}
|
}
|
||||||
} else if (yaw >= 90 && yaw <= 180) {
|
} else if (yaw >= 90 && yaw <= 180) {
|
||||||
facing = BlockFace.NORTH_EAST;
|
facing = Direction.NORTH_EAST();
|
||||||
opposite = BlockFace.SOUTH_WEST;
|
opposite = Direction.SOUTH_WEST();
|
||||||
signData = 14;
|
signData = 14;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.EAST, 2);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.NORTH(), 2).getRelative(Direction.EAST(), 2);
|
||||||
if (style.equals(TeamSpawnStyle.BIG)) {
|
if (style.equals(TeamSpawnStyle.BIG)) {
|
||||||
// rim
|
// rim
|
||||||
this.setBlock(x + 1, y, z - 2, this.kind);
|
this.setBlock(x + 1, y, z - 2, this.kind);
|
||||||
@ -268,10 +269,10 @@ public class Team {
|
|||||||
this.setBlock(x + 2, y + 3, z + 2, this.kind);
|
this.setBlock(x + 2, y + 3, z + 2, this.kind);
|
||||||
}
|
}
|
||||||
} else if (yaw >= 180 && yaw < 270) {
|
} else if (yaw >= 180 && yaw < 270) {
|
||||||
facing = BlockFace.SOUTH_EAST;
|
facing = Direction.SOUTH_EAST();
|
||||||
opposite = BlockFace.NORTH_WEST;
|
opposite = Direction.NORTH_WEST();
|
||||||
signData = 2;
|
signData = 2;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.EAST, 2);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.SOUTH(), 2).getRelative(Direction.EAST(), 2);
|
||||||
if (style.equals(TeamSpawnStyle.BIG)) {
|
if (style.equals(TeamSpawnStyle.BIG)) {
|
||||||
// rim
|
// rim
|
||||||
this.setBlock(x + 2, y, z + 1, this.kind);
|
this.setBlock(x + 2, y, z + 1, this.kind);
|
||||||
@ -300,10 +301,10 @@ public class Team {
|
|||||||
this.setBlock(x - 2, y + 3, z + 2, this.kind);
|
this.setBlock(x - 2, y + 3, z + 2, this.kind);
|
||||||
}
|
}
|
||||||
} else if (yaw >= 270 && yaw <= 360) {
|
} else if (yaw >= 270 && yaw <= 360) {
|
||||||
facing = BlockFace.SOUTH_WEST;
|
facing = Direction.SOUTH_WEST();
|
||||||
opposite = BlockFace.NORTH_EAST;
|
opposite = Direction.NORTH_EAST();
|
||||||
signData = 6;
|
signData = 6;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.WEST, 2);
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.SOUTH(), 2).getRelative(Direction.WEST(), 2);
|
||||||
if (style.equals(TeamSpawnStyle.BIG)) {
|
if (style.equals(TeamSpawnStyle.BIG)) {
|
||||||
// rim
|
// rim
|
||||||
this.setBlock(x - 1, y, z + 2, this.kind);
|
this.setBlock(x - 1, y, z + 2, this.kind);
|
||||||
@ -600,8 +601,8 @@ public class Team {
|
|||||||
BlockFace facing = null;
|
BlockFace facing = null;
|
||||||
BlockFace opposite = null;
|
BlockFace opposite = null;
|
||||||
if ((yaw >= 0 && yaw < 45) || (yaw >= 315 && yaw <= 360)) {
|
if ((yaw >= 0 && yaw < 45) || (yaw >= 315 && yaw <= 360)) {
|
||||||
facing = BlockFace.WEST;
|
facing = Direction.WEST();
|
||||||
opposite = BlockFace.EAST;
|
opposite = Direction.EAST();
|
||||||
current = this.warzone.getWorld().getBlockAt(x, y, z - 1);
|
current = this.warzone.getWorld().getBlockAt(x, y, z - 1);
|
||||||
current.setType(stand);
|
current.setType(stand);
|
||||||
current.setData(standData);
|
current.setData(standData);
|
||||||
@ -609,8 +610,8 @@ public class Team {
|
|||||||
current.setType(stand);
|
current.setType(stand);
|
||||||
current.setData(standData);
|
current.setData(standData);
|
||||||
} else if (yaw >= 45 && yaw < 135) {
|
} else if (yaw >= 45 && yaw < 135) {
|
||||||
facing = BlockFace.NORTH;
|
facing = Direction.NORTH();
|
||||||
opposite = BlockFace.SOUTH;
|
opposite = Direction.SOUTH();
|
||||||
current = this.warzone.getWorld().getBlockAt(x + 1, y, z);
|
current = this.warzone.getWorld().getBlockAt(x + 1, y, z);
|
||||||
current.setType(stand);
|
current.setType(stand);
|
||||||
current.setData(standData);
|
current.setData(standData);
|
||||||
@ -618,8 +619,8 @@ public class Team {
|
|||||||
current.setType(stand);
|
current.setType(stand);
|
||||||
current.setData(standData);
|
current.setData(standData);
|
||||||
} else if (yaw >= 135 && yaw < 225) {
|
} else if (yaw >= 135 && yaw < 225) {
|
||||||
facing = BlockFace.EAST;
|
facing = Direction.EAST();
|
||||||
opposite = BlockFace.WEST;
|
opposite = Direction.WEST();
|
||||||
current = this.warzone.getWorld().getBlockAt(x, y, z + 1);
|
current = this.warzone.getWorld().getBlockAt(x, y, z + 1);
|
||||||
current.setType(stand);
|
current.setType(stand);
|
||||||
current.setData(standData);
|
current.setData(standData);
|
||||||
@ -627,8 +628,8 @@ public class Team {
|
|||||||
current.setType(stand);
|
current.setType(stand);
|
||||||
current.setData(standData);;
|
current.setData(standData);;
|
||||||
} else if (yaw >= 225 && yaw < 315) {
|
} else if (yaw >= 225 && yaw < 315) {
|
||||||
facing = BlockFace.SOUTH;
|
facing = Direction.SOUTH();
|
||||||
opposite = BlockFace.NORTH;
|
opposite = Direction.NORTH();
|
||||||
current = this.warzone.getWorld().getBlockAt(x - 1, y, z);
|
current = this.warzone.getWorld().getBlockAt(x - 1, y, z);
|
||||||
current.setType(stand);
|
current.setType(stand);
|
||||||
current.setData(standData);
|
current.setData(standData);
|
||||||
|
@ -40,6 +40,7 @@ import com.tommytony.war.structure.HubLobbyMaterials;
|
|||||||
import com.tommytony.war.structure.WarzoneMaterials;
|
import com.tommytony.war.structure.WarzoneMaterials;
|
||||||
import com.tommytony.war.structure.ZoneLobby;
|
import com.tommytony.war.structure.ZoneLobby;
|
||||||
import com.tommytony.war.structure.ZoneWallGuard;
|
import com.tommytony.war.structure.ZoneWallGuard;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.utility.LoadoutSelection;
|
import com.tommytony.war.utility.LoadoutSelection;
|
||||||
import com.tommytony.war.utility.PlayerState;
|
import com.tommytony.war.utility.PlayerState;
|
||||||
import com.tommytony.war.utility.PotionEffectHelper;
|
import com.tommytony.war.utility.PotionEffectHelper;
|
||||||
@ -745,22 +746,22 @@ public class Warzone {
|
|||||||
List<BlockFace> walls = new ArrayList<BlockFace>();
|
List<BlockFace> walls = new ArrayList<BlockFace>();
|
||||||
if (Math.abs(this.volume.getSoutheastZ() - latestPlayerLocation.getBlockZ()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockX() <= this.volume.getSoutheastX() && latestPlayerLocation.getBlockX() >= this.volume.getNorthwestX() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
if (Math.abs(this.volume.getSoutheastZ() - latestPlayerLocation.getBlockZ()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockX() <= this.volume.getSoutheastX() && latestPlayerLocation.getBlockX() >= this.volume.getNorthwestX() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
||||||
// near east wall
|
// near east wall
|
||||||
walls.add(BlockFace.EAST);
|
walls.add(Direction.EAST());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(this.volume.getSoutheastX() - latestPlayerLocation.getBlockX()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockZ() <= this.volume.getNorthwestZ() && latestPlayerLocation.getBlockZ() >= this.volume.getSoutheastZ() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
if (Math.abs(this.volume.getSoutheastX() - latestPlayerLocation.getBlockX()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockZ() <= this.volume.getNorthwestZ() && latestPlayerLocation.getBlockZ() >= this.volume.getSoutheastZ() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
||||||
// near south wall
|
// near south wall
|
||||||
walls.add(BlockFace.SOUTH);
|
walls.add(Direction.SOUTH());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(this.volume.getNorthwestX() - latestPlayerLocation.getBlockX()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockZ() <= this.volume.getNorthwestZ() && latestPlayerLocation.getBlockZ() >= this.volume.getSoutheastZ() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
if (Math.abs(this.volume.getNorthwestX() - latestPlayerLocation.getBlockX()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockZ() <= this.volume.getNorthwestZ() && latestPlayerLocation.getBlockZ() >= this.volume.getSoutheastZ() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
||||||
// near north wall
|
// near north wall
|
||||||
walls.add(BlockFace.NORTH);
|
walls.add(Direction.NORTH());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(this.volume.getNorthwestZ() - latestPlayerLocation.getBlockZ()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockX() <= this.volume.getSoutheastX() && latestPlayerLocation.getBlockX() >= this.volume.getNorthwestX() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
if (Math.abs(this.volume.getNorthwestZ() - latestPlayerLocation.getBlockZ()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockX() <= this.volume.getSoutheastX() && latestPlayerLocation.getBlockX() >= this.volume.getNorthwestX() && latestPlayerLocation.getBlockY() >= this.volume.getMinY() && latestPlayerLocation.getBlockY() <= this.volume.getMaxY()) {
|
||||||
// near west wall
|
// near west wall
|
||||||
walls.add(BlockFace.WEST);
|
walls.add(Direction.WEST());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(this.volume.getMaxY() - latestPlayerLocation.getBlockY()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockX() <= this.volume.getMaxX() && latestPlayerLocation.getBlockX() >= this.volume.getMinX() && latestPlayerLocation.getBlockZ() <= this.volume.getMaxZ() && latestPlayerLocation.getBlockZ() >= this.volume.getMinZ()) {
|
if (Math.abs(this.volume.getMaxY() - latestPlayerLocation.getBlockY()) < this.minSafeDistanceFromWall && latestPlayerLocation.getBlockX() <= this.volume.getMaxX() && latestPlayerLocation.getBlockX() >= this.volume.getMinX() && latestPlayerLocation.getBlockZ() <= this.volume.getMaxZ() && latestPlayerLocation.getBlockZ() >= this.volume.getMinZ()) {
|
||||||
|
@ -11,6 +11,7 @@ import com.tommytony.war.War;
|
|||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
import com.tommytony.war.mapper.WarzoneYmlMapper;
|
import com.tommytony.war.mapper.WarzoneYmlMapper;
|
||||||
import com.tommytony.war.structure.ZoneLobby;
|
import com.tommytony.war.structure.ZoneLobby;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Places the zonelobby
|
* Places the zonelobby
|
||||||
@ -78,19 +79,19 @@ public class SetZoneLobbyCommand extends AbstractZoneMakerCommand {
|
|||||||
}
|
}
|
||||||
ZoneLobby lobby = zone.getLobby();
|
ZoneLobby lobby = zone.getLobby();
|
||||||
|
|
||||||
BlockFace wall = BlockFace.WEST;
|
BlockFace wall = Direction.WEST();
|
||||||
String wallStr = "";
|
String wallStr = "";
|
||||||
if (this.args[0].equals("north") || this.args[0].equals("n")) {
|
if (this.args[0].equals("north") || this.args[0].equals("n")) {
|
||||||
wall = BlockFace.NORTH;
|
wall = Direction.NORTH();
|
||||||
wallStr = "north";
|
wallStr = "north";
|
||||||
} else if (this.args[0].equals("east") || this.args[0].equals("e")) {
|
} else if (this.args[0].equals("east") || this.args[0].equals("e")) {
|
||||||
wall = BlockFace.EAST;
|
wall = Direction.EAST();
|
||||||
wallStr = "east";
|
wallStr = "east";
|
||||||
} else if (this.args[0].equals("south") || this.args[0].equals("s")) {
|
} else if (this.args[0].equals("south") || this.args[0].equals("s")) {
|
||||||
wall = BlockFace.SOUTH;
|
wall = Direction.SOUTH();
|
||||||
wallStr = "south";
|
wallStr = "south";
|
||||||
} else if (this.args[0].equals("west") || this.args[0].equals("w")) {
|
} else if (this.args[0].equals("west") || this.args[0].equals("w")) {
|
||||||
wall = BlockFace.WEST;
|
wall = Direction.WEST();
|
||||||
wallStr = "west";
|
wallStr = "west";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import com.tommytony.war.config.WarConfig;
|
|||||||
import com.tommytony.war.mapper.WarYmlMapper;
|
import com.tommytony.war.mapper.WarYmlMapper;
|
||||||
import com.tommytony.war.mapper.WarzoneYmlMapper;
|
import com.tommytony.war.mapper.WarzoneYmlMapper;
|
||||||
import com.tommytony.war.structure.ZoneLobby;
|
import com.tommytony.war.structure.ZoneLobby;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.NotNorthwestException;
|
import com.tommytony.war.volume.NotNorthwestException;
|
||||||
import com.tommytony.war.volume.NotSoutheastException;
|
import com.tommytony.war.volume.NotSoutheastException;
|
||||||
import com.tommytony.war.volume.TooBigException;
|
import com.tommytony.war.volume.TooBigException;
|
||||||
@ -249,7 +250,7 @@ public class ZoneSetter {
|
|||||||
|
|
||||||
if (warzone.getLobby() == null) {
|
if (warzone.getLobby() == null) {
|
||||||
// Set default lobby on south side
|
// Set default lobby on south side
|
||||||
ZoneLobby lobby = new ZoneLobby(warzone, BlockFace.SOUTH);
|
ZoneLobby lobby = new ZoneLobby(warzone, Direction.SOUTH());
|
||||||
warzone.setLobby(lobby);
|
warzone.setLobby(lobby);
|
||||||
if (War.war.getWarHub() != null) { // warhub has to change
|
if (War.war.getWarHub() != null) { // warhub has to change
|
||||||
War.war.getWarHub().getVolume().resetBlocks();
|
War.war.getWarHub().getVolume().resetBlocks();
|
||||||
|
@ -40,6 +40,7 @@ import com.tommytony.war.structure.Bomb;
|
|||||||
import com.tommytony.war.structure.Cake;
|
import com.tommytony.war.structure.Cake;
|
||||||
import com.tommytony.war.structure.WarHub;
|
import com.tommytony.war.structure.WarHub;
|
||||||
import com.tommytony.war.structure.ZoneLobby;
|
import com.tommytony.war.structure.ZoneLobby;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.utility.LoadoutSelection;
|
import com.tommytony.war.utility.LoadoutSelection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -391,18 +392,18 @@ public class WarPlayerListener implements Listener {
|
|||||||
int upDownMove = 0;
|
int upDownMove = 0;
|
||||||
int moveDistance = 1;
|
int moveDistance = 1;
|
||||||
|
|
||||||
if (nearestWalls.contains(BlockFace.NORTH)) {
|
if (nearestWalls.contains(Direction.NORTH())) {
|
||||||
// move south
|
// move south
|
||||||
northSouthMove += moveDistance;
|
northSouthMove += moveDistance;
|
||||||
} else if (nearestWalls.contains(BlockFace.SOUTH)) {
|
} else if (nearestWalls.contains(Direction.SOUTH())) {
|
||||||
// move north
|
// move north
|
||||||
northSouthMove -= moveDistance;
|
northSouthMove -= moveDistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nearestWalls.contains(BlockFace.EAST)) {
|
if (nearestWalls.contains(Direction.EAST())) {
|
||||||
// move west
|
// move west
|
||||||
eastWestMove += moveDistance;
|
eastWestMove += moveDistance;
|
||||||
} else if (nearestWalls.contains(BlockFace.WEST)) {
|
} else if (nearestWalls.contains(Direction.WEST())) {
|
||||||
// move east
|
// move east
|
||||||
eastWestMove -= moveDistance;
|
eastWestMove -= moveDistance;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import com.tommytony.war.Team;
|
import com.tommytony.war.Team;
|
||||||
import com.tommytony.war.War;
|
import com.tommytony.war.War;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
|
|
||||||
public class CantReEnterSpawnJob implements Runnable {
|
public class CantReEnterSpawnJob implements Runnable {
|
||||||
|
|
||||||
@ -84,16 +85,16 @@ public class CantReEnterSpawnJob implements Runnable {
|
|||||||
|
|
||||||
switch (zeroToSeven) {
|
switch (zeroToSeven) {
|
||||||
case 0:
|
case 0:
|
||||||
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(BlockFace.WEST, distanceAwayMultiplier);
|
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(Direction.WEST(), distanceAwayMultiplier);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(BlockFace.EAST, distanceAwayMultiplier);
|
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(Direction.EAST(), distanceAwayMultiplier);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(BlockFace.NORTH, distanceAwayMultiplier);
|
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(Direction.NORTH(), distanceAwayMultiplier);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(BlockFace.SOUTH, distanceAwayMultiplier);
|
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(Direction.SOUTH(), distanceAwayMultiplier);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(BlockFace.NORTH_WEST, distanceAwayMultiplier);
|
nextCandidateBlock = playerTeam.getTeamSpawn().getBlock().getRelative(BlockFace.NORTH_WEST, distanceAwayMultiplier);
|
||||||
|
@ -17,6 +17,7 @@ import org.bukkit.inventory.InventoryHolder;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.tommytony.war.utility.DeferredBlockReset;
|
import com.tommytony.war.utility.DeferredBlockReset;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
|
|
||||||
public class DeferredBlockResetsJob implements Runnable {
|
public class DeferredBlockResetsJob implements Runnable {
|
||||||
@ -154,8 +155,8 @@ public class DeferredBlockResetsJob implements Runnable {
|
|||||||
private void scrubDroppedDoors(Block block) {
|
private void scrubDroppedDoors(Block block) {
|
||||||
Chunk chunk = block.getWorld().getChunkAt(block);
|
Chunk chunk = block.getWorld().getChunkAt(block);
|
||||||
Volume scrubVolume = new Volume("scrub", block.getWorld());
|
Volume scrubVolume = new Volume("scrub", block.getWorld());
|
||||||
scrubVolume.setCornerOne(block.getRelative(BlockFace.DOWN).getRelative(BlockFace.EAST).getRelative(BlockFace.NORTH));
|
scrubVolume.setCornerOne(block.getRelative(BlockFace.DOWN).getRelative(Direction.EAST()).getRelative(Direction.NORTH()));
|
||||||
scrubVolume.setCornerTwo(block.getRelative(BlockFace.UP).getRelative(BlockFace.WEST).getRelative(BlockFace.SOUTH));
|
scrubVolume.setCornerTwo(block.getRelative(BlockFace.UP).getRelative(Direction.WEST()).getRelative(Direction.SOUTH()));
|
||||||
for (Entity entity : chunk.getEntities()) {
|
for (Entity entity : chunk.getEntities()) {
|
||||||
if ((entity instanceof Item && (((Item)entity).getItemStack().getTypeId() == Material.IRON_DOOR.getId()
|
if ((entity instanceof Item && (((Item)entity).getItemStack().getTypeId() == Material.IRON_DOOR.getId()
|
||||||
|| ((Item)entity).getItemStack().getTypeId() == Material.WOOD_DOOR.getId()))
|
|| ((Item)entity).getItemStack().getTypeId() == Material.WOOD_DOOR.getId()))
|
||||||
|
@ -3,6 +3,7 @@ package com.tommytony.war.job;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
|
|
||||||
public class ResetCursorJob implements Runnable {
|
public class ResetCursorJob implements Runnable {
|
||||||
@ -21,17 +22,17 @@ public class ResetCursorJob implements Runnable {
|
|||||||
if (this.isSoutheast) {
|
if (this.isSoutheast) {
|
||||||
this.cornerBlock.setType(this.originalCursorBlocks[0].getType());
|
this.cornerBlock.setType(this.originalCursorBlocks[0].getType());
|
||||||
this.cornerBlock.setData(this.originalCursorBlocks[0].getData());
|
this.cornerBlock.setData(this.originalCursorBlocks[0].getData());
|
||||||
this.cornerBlock.getRelative(BlockFace.WEST).setType(this.originalCursorBlocks[1].getType());
|
this.cornerBlock.getRelative(Direction.WEST()).setType(this.originalCursorBlocks[1].getType());
|
||||||
this.cornerBlock.getRelative(BlockFace.WEST).setData(this.originalCursorBlocks[1].getData());
|
this.cornerBlock.getRelative(Direction.WEST()).setData(this.originalCursorBlocks[1].getData());
|
||||||
this.cornerBlock.getRelative(BlockFace.NORTH).setType(this.originalCursorBlocks[2].getType());
|
this.cornerBlock.getRelative(Direction.NORTH()).setType(this.originalCursorBlocks[2].getType());
|
||||||
this.cornerBlock.getRelative(BlockFace.NORTH).setData(this.originalCursorBlocks[2].getData());
|
this.cornerBlock.getRelative(Direction.NORTH()).setData(this.originalCursorBlocks[2].getData());
|
||||||
} else {
|
} else {
|
||||||
this.cornerBlock.setType(this.originalCursorBlocks[0].getType());
|
this.cornerBlock.setType(this.originalCursorBlocks[0].getType());
|
||||||
this.cornerBlock.setData(this.originalCursorBlocks[0].getData());
|
this.cornerBlock.setData(this.originalCursorBlocks[0].getData());
|
||||||
this.cornerBlock.getRelative(BlockFace.EAST).setType(this.originalCursorBlocks[1].getType());
|
this.cornerBlock.getRelative(Direction.EAST()).setType(this.originalCursorBlocks[1].getType());
|
||||||
this.cornerBlock.getRelative(BlockFace.EAST).setData(this.originalCursorBlocks[1].getData());
|
this.cornerBlock.getRelative(Direction.EAST()).setData(this.originalCursorBlocks[1].getData());
|
||||||
this.cornerBlock.getRelative(BlockFace.SOUTH).setType(this.originalCursorBlocks[2].getType());
|
this.cornerBlock.getRelative(Direction.SOUTH()).setType(this.originalCursorBlocks[2].getType());
|
||||||
this.cornerBlock.getRelative(BlockFace.SOUTH).setData(this.originalCursorBlocks[2].getData());
|
this.cornerBlock.getRelative(Direction.SOUTH()).setData(this.originalCursorBlocks[2].getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import com.tommytony.war.config.TeamSpawnStyle;
|
|||||||
import com.tommytony.war.config.WarzoneConfig;
|
import com.tommytony.war.config.WarzoneConfig;
|
||||||
import com.tommytony.war.structure.Monument;
|
import com.tommytony.war.structure.Monument;
|
||||||
import com.tommytony.war.structure.ZoneLobby;
|
import com.tommytony.war.structure.ZoneLobby;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
import com.tommytony.war.volume.ZoneVolume;
|
import com.tommytony.war.volume.ZoneVolume;
|
||||||
|
|
||||||
@ -360,13 +361,13 @@ public class WarzoneTxtMapper {
|
|||||||
if (lobbyStrSplit.length > 0) {
|
if (lobbyStrSplit.length > 0) {
|
||||||
// lobby orientation
|
// lobby orientation
|
||||||
if (lobbyStrSplit[0].equals("south")) {
|
if (lobbyStrSplit[0].equals("south")) {
|
||||||
lobbyFace = BlockFace.SOUTH;
|
lobbyFace = Direction.SOUTH();
|
||||||
} else if (lobbyStrSplit[0].equals("east")) {
|
} else if (lobbyStrSplit[0].equals("east")) {
|
||||||
lobbyFace = BlockFace.EAST;
|
lobbyFace = Direction.EAST();
|
||||||
} else if (lobbyStrSplit[0].equals("north")) {
|
} else if (lobbyStrSplit[0].equals("north")) {
|
||||||
lobbyFace = BlockFace.NORTH;
|
lobbyFace = Direction.NORTH();
|
||||||
} else if (lobbyStrSplit[0].equals("west")) {
|
} else if (lobbyStrSplit[0].equals("west")) {
|
||||||
lobbyFace = BlockFace.WEST;
|
lobbyFace = Direction.WEST();
|
||||||
}
|
}
|
||||||
|
|
||||||
// lobby world
|
// lobby world
|
||||||
@ -572,13 +573,13 @@ public class WarzoneTxtMapper {
|
|||||||
// // lobby
|
// // lobby
|
||||||
// String lobbyStr = "";
|
// String lobbyStr = "";
|
||||||
// if (warzone.getLobby() != null) {
|
// if (warzone.getLobby() != null) {
|
||||||
// if (BlockFace.SOUTH == warzone.getLobby().getWall()) {
|
// if (Direction.SOUTH() == warzone.getLobby().getWall()) {
|
||||||
// lobbyStr = "south";
|
// lobbyStr = "south";
|
||||||
// } else if (BlockFace.EAST == warzone.getLobby().getWall()) {
|
// } else if (Direction.EAST() == warzone.getLobby().getWall()) {
|
||||||
// lobbyStr = "east";
|
// lobbyStr = "east";
|
||||||
// } else if (BlockFace.NORTH == warzone.getLobby().getWall()) {
|
// } else if (Direction.NORTH() == warzone.getLobby().getWall()) {
|
||||||
// lobbyStr = "north";
|
// lobbyStr = "north";
|
||||||
// } else if (BlockFace.WEST == warzone.getLobby().getWall()) {
|
// } else if (Direction.WEST() == warzone.getLobby().getWall()) {
|
||||||
// lobbyStr = "west";
|
// lobbyStr = "west";
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
@ -26,6 +26,7 @@ import com.tommytony.war.structure.HubLobbyMaterials;
|
|||||||
import com.tommytony.war.structure.Monument;
|
import com.tommytony.war.structure.Monument;
|
||||||
import com.tommytony.war.structure.WarzoneMaterials;
|
import com.tommytony.war.structure.WarzoneMaterials;
|
||||||
import com.tommytony.war.structure.ZoneLobby;
|
import com.tommytony.war.structure.ZoneLobby;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
import com.tommytony.war.volume.ZoneVolume;
|
import com.tommytony.war.volume.ZoneVolume;
|
||||||
|
|
||||||
@ -289,13 +290,13 @@ public class WarzoneYmlMapper {
|
|||||||
String lobbyOrientation = warzoneRootSection.getString(lobbyPrefix + "orientation");
|
String lobbyOrientation = warzoneRootSection.getString(lobbyPrefix + "orientation");
|
||||||
BlockFace lobbyFace = null;
|
BlockFace lobbyFace = null;
|
||||||
if (lobbyOrientation.equals("south")) {
|
if (lobbyOrientation.equals("south")) {
|
||||||
lobbyFace = BlockFace.SOUTH;
|
lobbyFace = Direction.SOUTH();
|
||||||
} else if (lobbyOrientation.equals("east")) {
|
} else if (lobbyOrientation.equals("east")) {
|
||||||
lobbyFace = BlockFace.EAST;
|
lobbyFace = Direction.EAST();
|
||||||
} else if (lobbyOrientation.equals("north")) {
|
} else if (lobbyOrientation.equals("north")) {
|
||||||
lobbyFace = BlockFace.NORTH;
|
lobbyFace = Direction.NORTH();
|
||||||
} else if (lobbyOrientation.equals("west")) {
|
} else if (lobbyOrientation.equals("west")) {
|
||||||
lobbyFace = BlockFace.WEST;
|
lobbyFace = Direction.WEST();
|
||||||
}
|
}
|
||||||
|
|
||||||
// lobby materials
|
// lobby materials
|
||||||
@ -406,13 +407,13 @@ public class WarzoneYmlMapper {
|
|||||||
// lobby
|
// lobby
|
||||||
if (warzone.getLobby() != null) {
|
if (warzone.getLobby() != null) {
|
||||||
String lobbyOrientation = "";
|
String lobbyOrientation = "";
|
||||||
if (BlockFace.SOUTH == warzone.getLobby().getWall()) {
|
if (Direction.SOUTH() == warzone.getLobby().getWall()) {
|
||||||
lobbyOrientation = "south";
|
lobbyOrientation = "south";
|
||||||
} else if (BlockFace.EAST == warzone.getLobby().getWall()) {
|
} else if (Direction.EAST() == warzone.getLobby().getWall()) {
|
||||||
lobbyOrientation = "east";
|
lobbyOrientation = "east";
|
||||||
} else if (BlockFace.NORTH == warzone.getLobby().getWall()) {
|
} else if (Direction.NORTH() == warzone.getLobby().getWall()) {
|
||||||
lobbyOrientation = "north";
|
lobbyOrientation = "north";
|
||||||
} else if (BlockFace.WEST == warzone.getLobby().getWall()) {
|
} else if (Direction.WEST() == warzone.getLobby().getWall()) {
|
||||||
lobbyOrientation = "west";
|
lobbyOrientation = "west";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
|
|
||||||
@ -138,8 +139,8 @@ public class Bomb {
|
|||||||
|
|
||||||
public void setLocation(Location location) {
|
public void setLocation(Location location) {
|
||||||
Block locationBlock = this.warzone.getWorld().getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
Block locationBlock = this.warzone.getWorld().getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||||
this.volume.setCornerOne(locationBlock.getRelative(BlockFace.DOWN).getRelative(BlockFace.EAST, 1).getRelative(BlockFace.SOUTH, 1));
|
this.volume.setCornerOne(locationBlock.getRelative(BlockFace.DOWN).getRelative(Direction.EAST(), 1).getRelative(Direction.SOUTH(), 1));
|
||||||
this.volume.setCornerTwo(locationBlock.getRelative(BlockFace.UP, 2).getRelative(BlockFace.WEST, 1).getRelative(BlockFace.NORTH, 1));
|
this.volume.setCornerTwo(locationBlock.getRelative(BlockFace.UP, 2).getRelative(Direction.WEST(), 1).getRelative(Direction.NORTH(), 1));
|
||||||
this.volume.saveBlocks();
|
this.volume.saveBlocks();
|
||||||
this.location = location;
|
this.location = location;
|
||||||
this.addBombBlocks();
|
this.addBombBlocks();
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
|
|
||||||
@ -139,8 +140,8 @@ public class Cake {
|
|||||||
|
|
||||||
public void setLocation(Location location) {
|
public void setLocation(Location location) {
|
||||||
Block locationBlock = this.warzone.getWorld().getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
Block locationBlock = this.warzone.getWorld().getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||||
this.volume.setCornerOne(locationBlock.getRelative(BlockFace.DOWN).getRelative(BlockFace.EAST, 1).getRelative(BlockFace.SOUTH, 1));
|
this.volume.setCornerOne(locationBlock.getRelative(BlockFace.DOWN).getRelative(Direction.EAST(), 1).getRelative(Direction.SOUTH(), 1));
|
||||||
this.volume.setCornerTwo(locationBlock.getRelative(BlockFace.UP, 2).getRelative(BlockFace.WEST, 1).getRelative(BlockFace.NORTH, 1));
|
this.volume.setCornerTwo(locationBlock.getRelative(BlockFace.UP, 2).getRelative(Direction.WEST(), 1).getRelative(Direction.NORTH(), 1));
|
||||||
this.volume.saveBlocks();
|
this.volume.saveBlocks();
|
||||||
this.location = location;
|
this.location = location;
|
||||||
this.addCakeBlocks();
|
this.addCakeBlocks();
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.block.BlockFace;
|
|||||||
|
|
||||||
import com.tommytony.war.Team;
|
import com.tommytony.war.Team;
|
||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
|
|
||||||
@ -225,8 +226,8 @@ public class Monument {
|
|||||||
|
|
||||||
public void setLocation(Location location) {
|
public void setLocation(Location location) {
|
||||||
Block locationBlock = this.warzone.getWorld().getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
Block locationBlock = this.warzone.getWorld().getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||||
this.volume.setCornerOne(locationBlock.getRelative(BlockFace.DOWN).getRelative(BlockFace.EAST, 2).getRelative(BlockFace.SOUTH, 2));
|
this.volume.setCornerOne(locationBlock.getRelative(BlockFace.DOWN).getRelative(Direction.EAST(), 2).getRelative(Direction.SOUTH(), 2));
|
||||||
this.volume.setCornerTwo(locationBlock.getRelative(BlockFace.UP, 2).getRelative(BlockFace.WEST, 2).getRelative(BlockFace.NORTH, 2));
|
this.volume.setCornerTwo(locationBlock.getRelative(BlockFace.UP, 2).getRelative(Direction.WEST(), 2).getRelative(Direction.NORTH(), 2));
|
||||||
this.volume.saveBlocks();
|
this.volume.saveBlocks();
|
||||||
this.location = location;
|
this.location = location;
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import com.tommytony.war.War;
|
|||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
import com.tommytony.war.config.TeamConfig;
|
import com.tommytony.war.config.TeamConfig;
|
||||||
import com.tommytony.war.config.WarzoneConfig;
|
import com.tommytony.war.config.WarzoneConfig;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.utility.SignHelper;
|
import com.tommytony.war.utility.SignHelper;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
@ -34,16 +35,16 @@ public class WarHub {
|
|||||||
int yaw = 0;
|
int yaw = 0;
|
||||||
if (hubOrientation.equals("south")) {
|
if (hubOrientation.equals("south")) {
|
||||||
yaw = 270;
|
yaw = 270;
|
||||||
this.setOrientation(BlockFace.SOUTH);
|
this.setOrientation(Direction.SOUTH());
|
||||||
} else if (hubOrientation.equals("north")) {
|
} else if (hubOrientation.equals("north")) {
|
||||||
yaw = 90;
|
yaw = 90;
|
||||||
this.setOrientation(BlockFace.NORTH);
|
this.setOrientation(Direction.NORTH());
|
||||||
} else if (hubOrientation.equals("east")) {
|
} else if (hubOrientation.equals("east")) {
|
||||||
yaw = 180;
|
yaw = 180;
|
||||||
this.setOrientation(BlockFace.EAST);
|
this.setOrientation(Direction.EAST());
|
||||||
} else {
|
} else {
|
||||||
yaw = 0;
|
yaw = 0;
|
||||||
this.setOrientation(BlockFace.WEST);
|
this.setOrientation(Direction.WEST());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.location = new Location(location.getWorld(),
|
this.location = new Location(location.getWorld(),
|
||||||
@ -78,13 +79,13 @@ public class WarHub {
|
|||||||
|
|
||||||
BlockFace facing = null;
|
BlockFace facing = null;
|
||||||
if ((yaw >= 0 && yaw < 45) || (yaw >= 315 && yaw <= 360)) {
|
if ((yaw >= 0 && yaw < 45) || (yaw >= 315 && yaw <= 360)) {
|
||||||
facing = BlockFace.WEST;
|
facing = Direction.WEST();
|
||||||
} else if (yaw >= 45 && yaw < 135) {
|
} else if (yaw >= 45 && yaw < 135) {
|
||||||
facing = BlockFace.NORTH;
|
facing = Direction.NORTH();
|
||||||
} else if (yaw >= 135 && yaw < 225) {
|
} else if (yaw >= 135 && yaw < 225) {
|
||||||
facing = BlockFace.EAST;
|
facing = Direction.EAST();
|
||||||
} else if (yaw >= 225 && yaw < 315) {
|
} else if (yaw >= 225 && yaw < 315) {
|
||||||
facing = BlockFace.SOUTH;
|
facing = Direction.SOUTH();
|
||||||
}
|
}
|
||||||
this.setOrientation(facing);
|
this.setOrientation(facing);
|
||||||
}
|
}
|
||||||
@ -125,26 +126,26 @@ public class WarHub {
|
|||||||
BlockFace front = this.getOrientation();
|
BlockFace front = this.getOrientation();
|
||||||
BlockFace back;
|
BlockFace back;
|
||||||
byte data;
|
byte data;
|
||||||
if (this.getOrientation() == BlockFace.SOUTH) {
|
if (this.getOrientation() == Direction.SOUTH()) {
|
||||||
data = (byte) 4;
|
data = (byte) 4;
|
||||||
left = BlockFace.EAST;
|
left = Direction.EAST();
|
||||||
right = BlockFace.WEST;
|
right = Direction.WEST();
|
||||||
back = BlockFace.NORTH;
|
back = Direction.NORTH();
|
||||||
} else if (this.getOrientation() == BlockFace.NORTH) {
|
} else if (this.getOrientation() == Direction.NORTH()) {
|
||||||
data = (byte) 12;
|
data = (byte) 12;
|
||||||
left = BlockFace.WEST;
|
left = Direction.WEST();
|
||||||
right = BlockFace.EAST;
|
right = Direction.EAST();
|
||||||
back = BlockFace.SOUTH;
|
back = Direction.SOUTH();
|
||||||
} else if (this.getOrientation() == BlockFace.EAST) {
|
} else if (this.getOrientation() == Direction.EAST()) {
|
||||||
data = (byte) 0;
|
data = (byte) 0;
|
||||||
left = BlockFace.NORTH;
|
left = Direction.NORTH();
|
||||||
right = BlockFace.SOUTH;
|
right = Direction.SOUTH();
|
||||||
back = BlockFace.WEST;
|
back = Direction.WEST();
|
||||||
} else {
|
} else {
|
||||||
data = (byte) 8;
|
data = (byte) 8;
|
||||||
left = BlockFace.SOUTH;
|
left = Direction.SOUTH();
|
||||||
right = BlockFace.NORTH;
|
right = Direction.NORTH();
|
||||||
back = BlockFace.EAST;
|
back = Direction.EAST();
|
||||||
}
|
}
|
||||||
|
|
||||||
Block locationBlock = this.location.getWorld().getBlockAt(this.location.getBlockX(), this.location.getBlockY(), this.location.getBlockZ());
|
Block locationBlock = this.location.getWorld().getBlockAt(this.location.getBlockX(), this.location.getBlockY(), this.location.getBlockZ());
|
||||||
@ -260,22 +261,22 @@ public class WarHub {
|
|||||||
BlockFace left;
|
BlockFace left;
|
||||||
BlockFace back;
|
BlockFace back;
|
||||||
byte data;
|
byte data;
|
||||||
if (this.getOrientation() == BlockFace.SOUTH) {
|
if (this.getOrientation() == Direction.SOUTH()) {
|
||||||
data = (byte) 4;
|
data = (byte) 4;
|
||||||
left = BlockFace.EAST;
|
left = Direction.EAST();
|
||||||
back = BlockFace.NORTH;
|
back = Direction.NORTH();
|
||||||
} else if (this.getOrientation() == BlockFace.NORTH) {
|
} else if (this.getOrientation() == Direction.NORTH()) {
|
||||||
data = (byte) 12;
|
data = (byte) 12;
|
||||||
left = BlockFace.WEST;
|
left = Direction.WEST();
|
||||||
back = BlockFace.SOUTH;
|
back = Direction.SOUTH();
|
||||||
} else if (this.getOrientation() == BlockFace.EAST) {
|
} else if (this.getOrientation() == Direction.EAST()) {
|
||||||
data = (byte) 0;
|
data = (byte) 0;
|
||||||
left = BlockFace.NORTH;
|
left = Direction.NORTH();
|
||||||
back = BlockFace.WEST;
|
back = Direction.WEST();
|
||||||
} else {
|
} else {
|
||||||
data = (byte) 8;
|
data = (byte) 8;
|
||||||
left = BlockFace.SOUTH;
|
left = Direction.SOUTH();
|
||||||
back = BlockFace.EAST;
|
back = Direction.EAST();
|
||||||
}
|
}
|
||||||
|
|
||||||
Block zoneGate = this.zoneGateBlocks.get(zone.getName());
|
Block zoneGate = this.zoneGateBlocks.get(zone.getName());
|
||||||
|
@ -18,6 +18,7 @@ import com.tommytony.war.Warzone;
|
|||||||
import com.tommytony.war.config.TeamConfig;
|
import com.tommytony.war.config.TeamConfig;
|
||||||
import com.tommytony.war.config.TeamKind;
|
import com.tommytony.war.config.TeamKind;
|
||||||
import com.tommytony.war.config.WarzoneConfig;
|
import com.tommytony.war.config.WarzoneConfig;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.utility.SignHelper;
|
import com.tommytony.war.utility.SignHelper;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
import com.tommytony.war.volume.Volume;
|
import com.tommytony.war.volume.Volume;
|
||||||
@ -95,14 +96,14 @@ public class ZoneLobby {
|
|||||||
this.setVolume(volume);
|
this.setVolume(volume);
|
||||||
|
|
||||||
// we're setting the zoneVolume directly, so we need to figure out the lobbyMiddleWallBlock on our own
|
// we're setting the zoneVolume directly, so we need to figure out the lobbyMiddleWallBlock on our own
|
||||||
if (wall == BlockFace.NORTH) {
|
if (wall == Direction.NORTH()) {
|
||||||
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(BlockFace.EAST, this.lobbyHalfSide));
|
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(Direction.EAST(), this.lobbyHalfSide));
|
||||||
} else if (wall == BlockFace.EAST) {
|
} else if (wall == Direction.EAST()) {
|
||||||
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(BlockFace.SOUTH, this.lobbyHalfSide));
|
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(Direction.SOUTH(), this.lobbyHalfSide));
|
||||||
} else if (wall == BlockFace.SOUTH) {
|
} else if (wall == Direction.SOUTH()) {
|
||||||
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(BlockFace.WEST, this.lobbyHalfSide));
|
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(Direction.WEST(), this.lobbyHalfSide));
|
||||||
} else if (wall == BlockFace.WEST) {
|
} else if (wall == Direction.WEST()) {
|
||||||
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(BlockFace.NORTH, this.lobbyHalfSide));
|
this.lobbyMiddleWallBlock = new BlockInfo(BlockInfo.getBlock(warzone.getWorld(), volume.getCornerOne()).getRelative(BlockFace.UP).getRelative(Direction.NORTH(), this.lobbyHalfSide));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,17 +139,17 @@ public class ZoneLobby {
|
|||||||
BlockFace facing = null;
|
BlockFace facing = null;
|
||||||
BlockFace opposite = null;
|
BlockFace opposite = null;
|
||||||
if ((yaw >= 0 && yaw < 45) || (yaw >= 315 && yaw <= 360)) {
|
if ((yaw >= 0 && yaw < 45) || (yaw >= 315 && yaw <= 360)) {
|
||||||
facing = BlockFace.WEST;
|
facing = Direction.WEST();
|
||||||
opposite = BlockFace.EAST;
|
opposite = Direction.EAST();
|
||||||
} else if (yaw >= 45 && yaw < 135) {
|
} else if (yaw >= 45 && yaw < 135) {
|
||||||
facing = BlockFace.NORTH;
|
facing = Direction.NORTH();
|
||||||
opposite = BlockFace.SOUTH;
|
opposite = Direction.SOUTH();
|
||||||
} else if (yaw >= 135 && yaw < 225) {
|
} else if (yaw >= 135 && yaw < 225) {
|
||||||
facing = BlockFace.EAST;
|
facing = Direction.EAST();
|
||||||
opposite = BlockFace.WEST;
|
opposite = Direction.WEST();
|
||||||
} else if (yaw >= 225 && yaw < 315) {
|
} else if (yaw >= 225 && yaw < 315) {
|
||||||
facing = BlockFace.SOUTH;
|
facing = Direction.SOUTH();
|
||||||
opposite = BlockFace.NORTH;
|
opposite = Direction.NORTH();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.wall = opposite; // a player facing south places a lobby that looks just like a lobby stuck to the north wall
|
this.wall = opposite; // a player facing south places a lobby that looks just like a lobby stuck to the north wall
|
||||||
@ -162,16 +163,16 @@ public class ZoneLobby {
|
|||||||
int y = this.lobbyMiddleWallBlock.getY();
|
int y = this.lobbyMiddleWallBlock.getY();
|
||||||
int z = this.lobbyMiddleWallBlock.getZ();
|
int z = this.lobbyMiddleWallBlock.getZ();
|
||||||
|
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
corner1 = lobbyWorld.getBlockAt(x, y - 1, z + this.lobbyHalfSide);
|
corner1 = lobbyWorld.getBlockAt(x, y - 1, z + this.lobbyHalfSide);
|
||||||
corner2 = lobbyWorld.getBlockAt(x - this.lobbyDepth, y + 1 + this.lobbyHeight, z - this.lobbyHalfSide);
|
corner2 = lobbyWorld.getBlockAt(x - this.lobbyDepth, y + 1 + this.lobbyHeight, z - this.lobbyHalfSide);
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
corner1 = lobbyWorld.getBlockAt(x - this.lobbyHalfSide, y - 1, z);
|
corner1 = lobbyWorld.getBlockAt(x - this.lobbyHalfSide, y - 1, z);
|
||||||
corner2 = lobbyWorld.getBlockAt(x + this.lobbyHalfSide, y + 1 + this.lobbyHeight, z - this.lobbyDepth);
|
corner2 = lobbyWorld.getBlockAt(x + this.lobbyHalfSide, y + 1 + this.lobbyHeight, z - this.lobbyDepth);
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
corner1 = lobbyWorld.getBlockAt(x, y - 1, z - this.lobbyHalfSide);
|
corner1 = lobbyWorld.getBlockAt(x, y - 1, z - this.lobbyHalfSide);
|
||||||
corner2 = lobbyWorld.getBlockAt(x + this.lobbyDepth, y + 1 + this.lobbyHeight, z + this.lobbyHalfSide);
|
corner2 = lobbyWorld.getBlockAt(x + this.lobbyDepth, y + 1 + this.lobbyHeight, z + this.lobbyHalfSide);
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
corner1 = lobbyWorld.getBlockAt(x + this.lobbyHalfSide, y - 1, z);
|
corner1 = lobbyWorld.getBlockAt(x + this.lobbyHalfSide, y - 1, z);
|
||||||
corner2 = lobbyWorld.getBlockAt(x - this.lobbyHalfSide, y + 1 + this.lobbyHeight, z + this.lobbyDepth);
|
corner2 = lobbyWorld.getBlockAt(x - this.lobbyHalfSide, y + 1 + this.lobbyHeight, z + this.lobbyDepth);
|
||||||
}
|
}
|
||||||
@ -194,7 +195,7 @@ public class ZoneLobby {
|
|||||||
Block corner1 = null;
|
Block corner1 = null;
|
||||||
Block corner2 = null;
|
Block corner2 = null;
|
||||||
|
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
int wallStart = zoneVolume.getMinZ();
|
int wallStart = zoneVolume.getMinZ();
|
||||||
int wallEnd = zoneVolume.getMaxZ();
|
int wallEnd = zoneVolume.getMaxZ();
|
||||||
int x = zoneVolume.getMinX();
|
int x = zoneVolume.getMinX();
|
||||||
@ -204,7 +205,7 @@ public class ZoneLobby {
|
|||||||
this.lobbyMiddleWallBlock = new BlockInfo(this.warzone.getWorld().getBlockAt(x, y, wallCenterPos));
|
this.lobbyMiddleWallBlock = new BlockInfo(this.warzone.getWorld().getBlockAt(x, y, wallCenterPos));
|
||||||
corner1 = this.warzone.getWorld().getBlockAt(x, y - 1, wallCenterPos + this.lobbyHalfSide);
|
corner1 = this.warzone.getWorld().getBlockAt(x, y - 1, wallCenterPos + this.lobbyHalfSide);
|
||||||
corner2 = this.warzone.getWorld().getBlockAt(x - this.lobbyDepth, y + 1 + this.lobbyHeight, wallCenterPos - this.lobbyHalfSide);
|
corner2 = this.warzone.getWorld().getBlockAt(x - this.lobbyDepth, y + 1 + this.lobbyHeight, wallCenterPos - this.lobbyHalfSide);
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
int wallStart = zoneVolume.getMinX();
|
int wallStart = zoneVolume.getMinX();
|
||||||
int wallEnd = zoneVolume.getMaxX();
|
int wallEnd = zoneVolume.getMaxX();
|
||||||
int z = zoneVolume.getMinZ();
|
int z = zoneVolume.getMinZ();
|
||||||
@ -214,7 +215,7 @@ public class ZoneLobby {
|
|||||||
this.lobbyMiddleWallBlock = new BlockInfo(this.warzone.getWorld().getBlockAt(wallCenterPos, y, z));
|
this.lobbyMiddleWallBlock = new BlockInfo(this.warzone.getWorld().getBlockAt(wallCenterPos, y, z));
|
||||||
corner1 = this.warzone.getWorld().getBlockAt(wallCenterPos - this.lobbyHalfSide, y - 1, z);
|
corner1 = this.warzone.getWorld().getBlockAt(wallCenterPos - this.lobbyHalfSide, y - 1, z);
|
||||||
corner2 = this.warzone.getWorld().getBlockAt(wallCenterPos + this.lobbyHalfSide, y + 1 + this.lobbyHeight, z - this.lobbyDepth);
|
corner2 = this.warzone.getWorld().getBlockAt(wallCenterPos + this.lobbyHalfSide, y + 1 + this.lobbyHeight, z - this.lobbyDepth);
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
int wallStart = zoneVolume.getMinZ();
|
int wallStart = zoneVolume.getMinZ();
|
||||||
int wallEnd = zoneVolume.getMaxZ();
|
int wallEnd = zoneVolume.getMaxZ();
|
||||||
int x = zoneVolume.getMaxX();
|
int x = zoneVolume.getMaxX();
|
||||||
@ -224,7 +225,7 @@ public class ZoneLobby {
|
|||||||
this.lobbyMiddleWallBlock = new BlockInfo(this.warzone.getWorld().getBlockAt(x, y, wallCenterPos));
|
this.lobbyMiddleWallBlock = new BlockInfo(this.warzone.getWorld().getBlockAt(x, y, wallCenterPos));
|
||||||
corner1 = this.warzone.getWorld().getBlockAt(x, y - 1, wallCenterPos - this.lobbyHalfSide);
|
corner1 = this.warzone.getWorld().getBlockAt(x, y - 1, wallCenterPos - this.lobbyHalfSide);
|
||||||
corner2 = this.warzone.getWorld().getBlockAt(x + this.lobbyDepth, y + 1 + this.lobbyHeight, wallCenterPos + this.lobbyHalfSide);
|
corner2 = this.warzone.getWorld().getBlockAt(x + this.lobbyDepth, y + 1 + this.lobbyHeight, wallCenterPos + this.lobbyHalfSide);
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
int wallStart = zoneVolume.getMinX();
|
int wallStart = zoneVolume.getMinX();
|
||||||
int wallEnd = zoneVolume.getMaxX();
|
int wallEnd = zoneVolume.getMaxX();
|
||||||
int z = zoneVolume.getMaxZ();
|
int z = zoneVolume.getMaxZ();
|
||||||
@ -319,13 +320,13 @@ public class ZoneLobby {
|
|||||||
// set zone tp
|
// set zone tp
|
||||||
this.zoneTeleportBlock = new BlockInfo(BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 6));
|
this.zoneTeleportBlock = new BlockInfo(BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 6));
|
||||||
int yaw = 0;
|
int yaw = 0;
|
||||||
if (this.wall == BlockFace.WEST) {
|
if (this.wall == Direction.WEST()) {
|
||||||
yaw = 180;
|
yaw = 180;
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
yaw = 90;
|
yaw = 90;
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
yaw = 0;
|
yaw = 0;
|
||||||
} else if (this.wall == BlockFace.NORTH) {
|
} else if (this.wall == Direction.NORTH()) {
|
||||||
yaw = 270;
|
yaw = 270;
|
||||||
}
|
}
|
||||||
this.warzone.setTeleport(new Location(this.volume.getWorld(), this.zoneTeleportBlock.getX(), this.zoneTeleportBlock.getY(), this.zoneTeleportBlock.getZ(), yaw, 0));
|
this.warzone.setTeleport(new Location(this.volume.getWorld(), this.zoneTeleportBlock.getX(), this.zoneTeleportBlock.getY(), this.zoneTeleportBlock.getZ(), yaw, 0));
|
||||||
@ -335,18 +336,18 @@ public class ZoneLobby {
|
|||||||
BlockFace leftSide = null; // looking at the zone
|
BlockFace leftSide = null; // looking at the zone
|
||||||
BlockFace rightSide = null;
|
BlockFace rightSide = null;
|
||||||
|
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
leftSide = BlockFace.EAST;
|
leftSide = Direction.EAST();
|
||||||
rightSide = BlockFace.WEST;
|
rightSide = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
leftSide = BlockFace.SOUTH;
|
leftSide = Direction.SOUTH();
|
||||||
rightSide = BlockFace.NORTH;
|
rightSide = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
leftSide = BlockFace.WEST;
|
leftSide = Direction.WEST();
|
||||||
rightSide = BlockFace.EAST;
|
rightSide = Direction.EAST();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
leftSide = BlockFace.NORTH;
|
leftSide = Direction.NORTH();
|
||||||
rightSide = BlockFace.SOUTH;
|
rightSide = Direction.SOUTH();
|
||||||
}
|
}
|
||||||
|
|
||||||
Block clearedPathStartBlock = BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 2);
|
Block clearedPathStartBlock = BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 2);
|
||||||
@ -371,13 +372,13 @@ public class ZoneLobby {
|
|||||||
// set zone sign
|
// set zone sign
|
||||||
Block zoneSignBlock = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 4);
|
Block zoneSignBlock = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 4);
|
||||||
byte data = 0;
|
byte data = 0;
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
data = (byte) 4;
|
data = (byte) 4;
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
data = (byte) 8;
|
data = (byte) 8;
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
data = (byte) 12;
|
data = (byte) 12;
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
data = (byte) 0;
|
data = (byte) 0;
|
||||||
}
|
}
|
||||||
String[] lines = new String[4];
|
String[] lines = new String[4];
|
||||||
@ -395,18 +396,18 @@ public class ZoneLobby {
|
|||||||
// lets get some light in here
|
// lets get some light in here
|
||||||
Material light = Material.getMaterial(this.warzone.getLobbyMaterials().getLightId());
|
Material light = Material.getMaterial(this.warzone.getLobbyMaterials().getLightId());
|
||||||
byte lightData = this.warzone.getLobbyMaterials().getLightData();
|
byte lightData = this.warzone.getLobbyMaterials().getLightData();
|
||||||
if (this.wall == BlockFace.NORTH || this.wall == BlockFace.SOUTH) {
|
if (this.wall == Direction.NORTH() || this.wall == Direction.SOUTH()) {
|
||||||
Block one = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.WEST, this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
Block one = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(Direction.WEST(), this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
||||||
one.setType(light);
|
one.setType(light);
|
||||||
one.setData(lightData);
|
one.setData(lightData);
|
||||||
Block two = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.EAST, this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
Block two = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(Direction.EAST(), this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
||||||
two.setType(light);
|
two.setType(light);
|
||||||
two.setData(lightData);
|
two.setData(lightData);
|
||||||
} else {
|
} else {
|
||||||
Block one = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.NORTH, this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
Block one = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(Direction.NORTH(), this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
||||||
one.setType(light);
|
one.setType(light);
|
||||||
one.setData(lightData);
|
one.setData(lightData);
|
||||||
Block two = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.SOUTH, this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
Block two = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(Direction.SOUTH(), this.lobbyHalfSide - 1).getRelative(this.wall, 9);
|
||||||
two.setType(light);
|
two.setType(light);
|
||||||
two.setData(lightData);
|
two.setData(lightData);
|
||||||
}
|
}
|
||||||
@ -418,18 +419,18 @@ public class ZoneLobby {
|
|||||||
private void setGatePositions(Block lobbyMiddleWallBlock) {
|
private void setGatePositions(Block lobbyMiddleWallBlock) {
|
||||||
BlockFace leftSide = null; // look at the zone
|
BlockFace leftSide = null; // look at the zone
|
||||||
BlockFace rightSide = null;
|
BlockFace rightSide = null;
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
leftSide = BlockFace.EAST;
|
leftSide = Direction.EAST();
|
||||||
rightSide = BlockFace.WEST;
|
rightSide = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
leftSide = BlockFace.SOUTH;
|
leftSide = Direction.SOUTH();
|
||||||
rightSide = BlockFace.NORTH;
|
rightSide = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
leftSide = BlockFace.WEST;
|
leftSide = Direction.WEST();
|
||||||
rightSide = BlockFace.EAST;
|
rightSide = Direction.EAST();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
leftSide = BlockFace.NORTH;
|
leftSide = Direction.NORTH();
|
||||||
rightSide = BlockFace.SOUTH;
|
rightSide = Direction.SOUTH();
|
||||||
}
|
}
|
||||||
this.teamGateBlocks.clear();
|
this.teamGateBlocks.clear();
|
||||||
if (this.warzone.getWarzoneConfig().getBoolean(WarzoneConfig.AUTOASSIGN)) {
|
if (this.warzone.getWarzoneConfig().getBoolean(WarzoneConfig.AUTOASSIGN)) {
|
||||||
@ -467,18 +468,18 @@ public class ZoneLobby {
|
|||||||
BlockFace leftSide = null; // looking at the zone
|
BlockFace leftSide = null; // looking at the zone
|
||||||
BlockFace rightSide = null;
|
BlockFace rightSide = null;
|
||||||
|
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
leftSide = BlockFace.EAST;
|
leftSide = Direction.EAST();
|
||||||
rightSide = BlockFace.WEST;
|
rightSide = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
leftSide = BlockFace.SOUTH;
|
leftSide = Direction.SOUTH();
|
||||||
rightSide = BlockFace.NORTH;
|
rightSide = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
leftSide = BlockFace.WEST;
|
leftSide = Direction.WEST();
|
||||||
rightSide = BlockFace.EAST;
|
rightSide = Direction.EAST();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
leftSide = BlockFace.NORTH;
|
leftSide = Direction.NORTH();
|
||||||
rightSide = BlockFace.SOUTH;
|
rightSide = Direction.SOUTH();
|
||||||
}
|
}
|
||||||
|
|
||||||
// minimal air path
|
// minimal air path
|
||||||
@ -504,29 +505,29 @@ public class ZoneLobby {
|
|||||||
BlockFace rightSide = null;
|
BlockFace rightSide = null;
|
||||||
|
|
||||||
// warhub link is opposite direction as zone wall
|
// warhub link is opposite direction as zone wall
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
front = BlockFace.SOUTH;
|
front = Direction.SOUTH();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
front = BlockFace.WEST;
|
front = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
front = BlockFace.NORTH;
|
front = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
front = BlockFace.EAST;
|
front = Direction.EAST();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
leftSide = BlockFace.EAST;
|
leftSide = Direction.EAST();
|
||||||
rightSide = BlockFace.WEST;
|
rightSide = Direction.WEST();
|
||||||
|
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
leftSide = BlockFace.SOUTH;
|
leftSide = Direction.SOUTH();
|
||||||
rightSide = BlockFace.NORTH;
|
rightSide = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
leftSide = BlockFace.WEST;
|
leftSide = Direction.WEST();
|
||||||
rightSide = BlockFace.EAST;
|
rightSide = Direction.EAST();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
leftSide = BlockFace.NORTH;
|
leftSide = Direction.NORTH();
|
||||||
rightSide = BlockFace.SOUTH;
|
rightSide = Direction.SOUTH();
|
||||||
}
|
}
|
||||||
|
|
||||||
// minimal air path
|
// minimal air path
|
||||||
@ -561,18 +562,18 @@ public class ZoneLobby {
|
|||||||
BlockFace leftSide = null; // lookingat the zone
|
BlockFace leftSide = null; // lookingat the zone
|
||||||
BlockFace rightSide = null;
|
BlockFace rightSide = null;
|
||||||
|
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
leftSide = BlockFace.EAST;
|
leftSide = Direction.EAST();
|
||||||
rightSide = BlockFace.WEST;
|
rightSide = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
leftSide = BlockFace.SOUTH;
|
leftSide = Direction.SOUTH();
|
||||||
rightSide = BlockFace.NORTH;
|
rightSide = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
leftSide = BlockFace.WEST;
|
leftSide = Direction.WEST();
|
||||||
rightSide = BlockFace.EAST;
|
rightSide = Direction.EAST();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
leftSide = BlockFace.NORTH;
|
leftSide = Direction.NORTH();
|
||||||
rightSide = BlockFace.SOUTH;
|
rightSide = Direction.SOUTH();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -670,18 +671,18 @@ public class ZoneLobby {
|
|||||||
if (gateBlock != null) {
|
if (gateBlock != null) {
|
||||||
BlockFace leftSide = null; // look at the zone
|
BlockFace leftSide = null; // look at the zone
|
||||||
BlockFace rightSide = null;
|
BlockFace rightSide = null;
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
leftSide = BlockFace.EAST;
|
leftSide = Direction.EAST();
|
||||||
rightSide = BlockFace.WEST;
|
rightSide = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
leftSide = BlockFace.SOUTH;
|
leftSide = Direction.SOUTH();
|
||||||
rightSide = BlockFace.NORTH;
|
rightSide = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
leftSide = BlockFace.WEST;
|
leftSide = Direction.WEST();
|
||||||
rightSide = BlockFace.EAST;
|
rightSide = Direction.EAST();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
leftSide = BlockFace.NORTH;
|
leftSide = Direction.NORTH();
|
||||||
rightSide = BlockFace.SOUTH;
|
rightSide = Direction.SOUTH();
|
||||||
}
|
}
|
||||||
return (block.getX() == gateBlock.getX() && block.getY() == gateBlock.getY() && block.getZ() == gateBlock.getZ()) || (block.getX() == gateBlock.getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(leftSide).getX() && block.getY() == gateBlock.getRelative(leftSide).getY() && block.getZ() == gateBlock.getRelative(leftSide).getZ()) || (block.getX() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(BlockFace.UP).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(BlockFace.UP).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(BlockFace.UP).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(rightSide).getX() && block.getY() == gateBlock.getRelative(rightSide).getY() && block.getZ() == gateBlock.getRelative(rightSide).getZ()) || (block.getX() == gateBlock.getX() && block.getY() == gateBlock.getY() - 1 && block.getZ() == gateBlock.getZ());
|
return (block.getX() == gateBlock.getX() && block.getY() == gateBlock.getY() && block.getZ() == gateBlock.getZ()) || (block.getX() == gateBlock.getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(leftSide).getX() && block.getY() == gateBlock.getRelative(leftSide).getY() && block.getZ() == gateBlock.getRelative(leftSide).getZ()) || (block.getX() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(leftSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(BlockFace.UP).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(BlockFace.UP).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(BlockFace.UP).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getX() && block.getY() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getY() && block.getZ() == gateBlock.getRelative(rightSide).getRelative(BlockFace.UP).getRelative(BlockFace.UP).getZ()) || (block.getX() == gateBlock.getRelative(rightSide).getX() && block.getY() == gateBlock.getRelative(rightSide).getY() && block.getZ() == gateBlock.getRelative(rightSide).getZ()) || (block.getX() == gateBlock.getX() && block.getY() == gateBlock.getY() - 1 && block.getZ() == gateBlock.getZ());
|
||||||
}
|
}
|
||||||
@ -719,39 +720,39 @@ public class ZoneLobby {
|
|||||||
BlockFace direction = null;
|
BlockFace direction = null;
|
||||||
if (awayFromWall) {
|
if (awayFromWall) {
|
||||||
direction = this.wall;
|
direction = this.wall;
|
||||||
} else if (this.wall == BlockFace.NORTH) {
|
} else if (this.wall == Direction.NORTH()) {
|
||||||
direction = BlockFace.SOUTH;
|
direction = Direction.SOUTH();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
direction = BlockFace.WEST;
|
direction = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
direction = BlockFace.NORTH;
|
direction = Direction.NORTH();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
direction = BlockFace.EAST;
|
direction = Direction.EAST();
|
||||||
}
|
}
|
||||||
byte data = 0;
|
byte data = 0;
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
block = gate.getRelative(direction).getRelative(BlockFace.EAST);
|
block = gate.getRelative(direction).getRelative(Direction.EAST());
|
||||||
if (awayFromWall) {
|
if (awayFromWall) {
|
||||||
data = (byte) 4;
|
data = (byte) 4;
|
||||||
} else {
|
} else {
|
||||||
data = (byte) 12;
|
data = (byte) 12;
|
||||||
}
|
}
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
block = gate.getRelative(direction).getRelative(BlockFace.SOUTH);
|
block = gate.getRelative(direction).getRelative(Direction.SOUTH());
|
||||||
if (awayFromWall) {
|
if (awayFromWall) {
|
||||||
data = (byte) 8;
|
data = (byte) 8;
|
||||||
} else {
|
} else {
|
||||||
data = (byte) 0;
|
data = (byte) 0;
|
||||||
}
|
}
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
block = gate.getRelative(direction).getRelative(BlockFace.WEST);
|
block = gate.getRelative(direction).getRelative(Direction.WEST());
|
||||||
if (awayFromWall) {
|
if (awayFromWall) {
|
||||||
data = (byte) 12;
|
data = (byte) 12;
|
||||||
} else {
|
} else {
|
||||||
data = (byte) 4;
|
data = (byte) 4;
|
||||||
}
|
}
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
block = gate.getRelative(direction).getRelative(BlockFace.NORTH);
|
block = gate.getRelative(direction).getRelative(Direction.NORTH());
|
||||||
if (awayFromWall) {
|
if (awayFromWall) {
|
||||||
data = (byte) 0;
|
data = (byte) 0;
|
||||||
} else {
|
} else {
|
||||||
@ -766,22 +767,22 @@ public class ZoneLobby {
|
|||||||
BlockFace inside = null;
|
BlockFace inside = null;
|
||||||
BlockFace left = null;
|
BlockFace left = null;
|
||||||
BlockFace right = null;
|
BlockFace right = null;
|
||||||
if (this.wall == BlockFace.NORTH) {
|
if (this.wall == Direction.NORTH()) {
|
||||||
inside = BlockFace.SOUTH;
|
inside = Direction.SOUTH();
|
||||||
left = BlockFace.WEST;
|
left = Direction.WEST();
|
||||||
right = BlockFace.EAST;
|
right = Direction.EAST();
|
||||||
} else if (this.wall == BlockFace.EAST) {
|
} else if (this.wall == Direction.EAST()) {
|
||||||
inside = BlockFace.WEST;
|
inside = Direction.WEST();
|
||||||
left = BlockFace.NORTH;
|
left = Direction.NORTH();
|
||||||
right = BlockFace.SOUTH;
|
right = Direction.SOUTH();
|
||||||
} else if (this.wall == BlockFace.SOUTH) {
|
} else if (this.wall == Direction.SOUTH()) {
|
||||||
inside = BlockFace.NORTH;
|
inside = Direction.NORTH();
|
||||||
left = BlockFace.EAST;
|
left = Direction.EAST();
|
||||||
right = BlockFace.WEST;
|
right = Direction.WEST();
|
||||||
} else if (this.wall == BlockFace.WEST) {
|
} else if (this.wall == Direction.WEST()) {
|
||||||
inside = BlockFace.EAST;
|
inside = Direction.EAST();
|
||||||
left = BlockFace.SOUTH;
|
left = Direction.SOUTH();
|
||||||
right = BlockFace.NORTH;
|
right = Direction.NORTH();
|
||||||
}
|
}
|
||||||
if (this.autoAssignGate != null) {
|
if (this.autoAssignGate != null) {
|
||||||
if (this.leaving(location, BlockInfo.getBlock(this.volume.getWorld(), this.autoAssignGate), inside, left, right)) {
|
if (this.leaving(location, BlockInfo.getBlock(this.volume.getWorld(), this.autoAssignGate), inside, left, right)) {
|
||||||
|
@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import com.tommytony.war.War;
|
import com.tommytony.war.War;
|
||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
import com.tommytony.war.volume.BlockInfo;
|
import com.tommytony.war.volume.BlockInfo;
|
||||||
|
|
||||||
|
|
||||||
@ -46,116 +47,116 @@ public class ZoneWallGuard {
|
|||||||
this.glassify(block.getRelative(BlockFace.DOWN), this.wall);
|
this.glassify(block.getRelative(BlockFace.DOWN), this.wall);
|
||||||
this.glassify(block.getRelative(BlockFace.DOWN, 2), this.wall);
|
this.glassify(block.getRelative(BlockFace.DOWN, 2), this.wall);
|
||||||
}
|
}
|
||||||
if (this.wall == BlockFace.NORTH && this.warzone.getVolume().isNorthWallBlock(block)) {
|
if (this.wall == Direction.NORTH() && this.warzone.getVolume().isNorthWallBlock(block)) {
|
||||||
this.glassify(block.getRelative(BlockFace.EAST), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST()), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.UP), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.UP), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.DOWN), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.DOWN), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST(), 2), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2).getRelative(BlockFace.UP), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST(), 2).getRelative(BlockFace.UP), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2).getRelative(BlockFace.DOWN), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST(), 2).getRelative(BlockFace.DOWN), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.UP, 2), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.UP, 2), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.DOWN, 2), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.DOWN, 2), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST()), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.UP), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.UP), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.DOWN), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.DOWN), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST(), 2), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2).getRelative(BlockFace.UP), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST(), 2).getRelative(BlockFace.UP), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2).getRelative(BlockFace.DOWN), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST(), 2).getRelative(BlockFace.DOWN), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.UP, 2), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.UP, 2), Direction.NORTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.DOWN, 2), BlockFace.NORTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.DOWN, 2), Direction.NORTH());
|
||||||
} else if (this.wall == BlockFace.SOUTH && this.warzone.getVolume().isSouthWallBlock(block)) {
|
} else if (this.wall == Direction.SOUTH() && this.warzone.getVolume().isSouthWallBlock(block)) {
|
||||||
this.glassify(block.getRelative(BlockFace.EAST), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST()), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.UP), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.UP), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.DOWN), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.DOWN), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST(), 2), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2).getRelative(BlockFace.UP), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST(), 2).getRelative(BlockFace.UP), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2).getRelative(BlockFace.DOWN), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST(), 2).getRelative(BlockFace.DOWN), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.UP, 2), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.UP, 2), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.EAST).getRelative(BlockFace.DOWN, 2), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.EAST()).getRelative(BlockFace.DOWN, 2), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST()), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.UP), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.UP), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.DOWN), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.DOWN), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST(), 2), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2).getRelative(BlockFace.UP), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST(), 2).getRelative(BlockFace.UP), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2).getRelative(BlockFace.DOWN), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST(), 2).getRelative(BlockFace.DOWN), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.UP, 2), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.UP, 2), Direction.SOUTH());
|
||||||
this.glassify(block.getRelative(BlockFace.WEST).getRelative(BlockFace.DOWN, 2), BlockFace.SOUTH);
|
this.glassify(block.getRelative(Direction.WEST()).getRelative(BlockFace.DOWN, 2), Direction.SOUTH());
|
||||||
} else if (this.wall == BlockFace.EAST && this.warzone.getVolume().isEastWallBlock(block)) {
|
} else if (this.wall == Direction.EAST() && this.warzone.getVolume().isEastWallBlock(block)) {
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH()), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.UP), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.UP), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.DOWN), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.DOWN), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH(), 2), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.UP), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(BlockFace.UP), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.DOWN), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(BlockFace.DOWN), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.UP, 2), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.UP, 2), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.DOWN, 2), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.DOWN, 2), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH()), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.UP), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.UP), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.DOWN), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.DOWN), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.UP), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(BlockFace.UP), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.DOWN), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(BlockFace.DOWN), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.UP, 2), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.UP, 2), Direction.EAST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.DOWN, 2), BlockFace.EAST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.DOWN, 2), Direction.EAST());
|
||||||
} else if (this.wall == BlockFace.WEST && this.warzone.getVolume().isWestWallBlock(block)) {
|
} else if (this.wall == Direction.WEST() && this.warzone.getVolume().isWestWallBlock(block)) {
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH()), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.UP), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.UP), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.DOWN), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.DOWN), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH(), 2), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.UP), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(BlockFace.UP), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.DOWN), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(BlockFace.DOWN), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.UP, 2), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.UP, 2), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.DOWN, 2), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(BlockFace.DOWN, 2), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH()), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.UP), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.UP), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.DOWN), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.DOWN), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.UP), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(BlockFace.UP), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.DOWN), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(BlockFace.DOWN), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.UP, 2), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.UP, 2), Direction.WEST());
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.DOWN, 2), BlockFace.WEST);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.DOWN, 2), Direction.WEST());
|
||||||
} else if (this.wall == BlockFace.UP && this.warzone.getVolume().isUpWallBlock(block)) {
|
} else if (this.wall == BlockFace.UP && this.warzone.getVolume().isUpWallBlock(block)) {
|
||||||
this.glassify(block.getRelative(BlockFace.EAST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.EAST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.EAST(), 2), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.WEST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.WEST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.WEST(), 2), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.EAST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.EAST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.WEST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.WEST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH(), 2), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.EAST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(Direction.EAST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.WEST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(Direction.WEST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.EAST, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.EAST(), 2), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.WEST, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.WEST(), 2), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.EAST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(Direction.EAST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.WEST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(Direction.WEST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.EAST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(Direction.EAST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.WEST), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(Direction.WEST()), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.UP, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.UP, 2), BlockFace.UP);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.DOWN, 2), BlockFace.UP);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.DOWN, 2), BlockFace.UP);
|
||||||
} else if (this.wall == BlockFace.DOWN && this.warzone.getVolume().isDownWallBlock(block)) {
|
} else if (this.wall == BlockFace.DOWN && this.warzone.getVolume().isDownWallBlock(block)) {
|
||||||
this.glassify(block.getRelative(BlockFace.EAST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.EAST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.EAST, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.EAST(), 2), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.WEST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.WEST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.WEST, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.WEST(), 2), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.EAST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.EAST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.WEST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.WEST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH(), 2), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.EAST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(Direction.EAST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH, 2).getRelative(BlockFace.WEST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH(), 2).getRelative(Direction.WEST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.EAST, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.EAST(), 2), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.NORTH).getRelative(BlockFace.WEST, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.NORTH()).getRelative(Direction.WEST(), 2), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.EAST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(Direction.EAST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.WEST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(Direction.WEST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.EAST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(Direction.EAST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH, 2).getRelative(BlockFace.WEST), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH(), 2).getRelative(Direction.WEST()), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.DOWN, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.DOWN, 2), BlockFace.DOWN);
|
||||||
this.glassify(block.getRelative(BlockFace.SOUTH).getRelative(BlockFace.DOWN, 2), BlockFace.DOWN);
|
this.glassify(block.getRelative(Direction.SOUTH()).getRelative(BlockFace.DOWN, 2), BlockFace.DOWN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,22 +165,22 @@ public class ZoneWallGuard {
|
|||||||
// face here means which wall we are working on
|
// face here means which wall we are working on
|
||||||
|
|
||||||
if ((block.getTypeId() == Material.AIR.getId() || block.getTypeId() == Material.WATER.getId()) && (this.warzone.getLobby() == null || (this.warzone.getLobby() != null && !this.warzone.getLobby().blockIsAGateBlock(block, wall)))) {
|
if ((block.getTypeId() == Material.AIR.getId() || block.getTypeId() == Material.WATER.getId()) && (this.warzone.getLobby() == null || (this.warzone.getLobby() != null && !this.warzone.getLobby().blockIsAGateBlock(block, wall)))) {
|
||||||
if (wall == BlockFace.NORTH) {
|
if (wall == Direction.NORTH()) {
|
||||||
if (this.warzone.getVolume().isNorthWallBlock(block)) {
|
if (this.warzone.getVolume().isNorthWallBlock(block)) {
|
||||||
this.glassified.add(new BlockInfo(block));
|
this.glassified.add(new BlockInfo(block));
|
||||||
block.setType(Material.GLASS);
|
block.setType(Material.GLASS);
|
||||||
}
|
}
|
||||||
} else if (wall == BlockFace.SOUTH) {
|
} else if (wall == Direction.SOUTH()) {
|
||||||
if (this.warzone.getVolume().isSouthWallBlock(block)) {
|
if (this.warzone.getVolume().isSouthWallBlock(block)) {
|
||||||
this.glassified.add(new BlockInfo(block));
|
this.glassified.add(new BlockInfo(block));
|
||||||
block.setType(Material.GLASS);
|
block.setType(Material.GLASS);
|
||||||
}
|
}
|
||||||
} else if (wall == BlockFace.EAST) {
|
} else if (wall == Direction.EAST()) {
|
||||||
if (this.warzone.getVolume().isEastWallBlock(block)) {
|
if (this.warzone.getVolume().isEastWallBlock(block)) {
|
||||||
this.glassified.add(new BlockInfo(block));
|
this.glassified.add(new BlockInfo(block));
|
||||||
block.setType(Material.GLASS);
|
block.setType(Material.GLASS);
|
||||||
}
|
}
|
||||||
} else if (wall == BlockFace.WEST) {
|
} else if (wall == Direction.WEST()) {
|
||||||
if (this.warzone.getVolume().isWestWallBlock(block)) {
|
if (this.warzone.getVolume().isWestWallBlock(block)) {
|
||||||
this.glassified.add(new BlockInfo(block));
|
this.glassified.add(new BlockInfo(block));
|
||||||
block.setType(Material.GLASS);
|
block.setType(Material.GLASS);
|
||||||
|
72
war/src/main/java/com/tommytony/war/utility/Direction.java
Normal file
72
war/src/main/java/com/tommytony/war/utility/Direction.java
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
package com.tommytony.war.utility;
|
||||||
|
|
||||||
|
import org.bukkit.block.BlockFace;
|
||||||
|
|
||||||
|
public class Direction {
|
||||||
|
|
||||||
|
private static boolean isLegacy = BlockFace.NORTH.getModX() == -1;
|
||||||
|
|
||||||
|
public static BlockFace NORTH() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.WEST;
|
||||||
|
} else {
|
||||||
|
return BlockFace.NORTH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockFace EAST() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.NORTH;
|
||||||
|
} else {
|
||||||
|
return BlockFace.EAST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockFace SOUTH() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.EAST;
|
||||||
|
} else {
|
||||||
|
return BlockFace.SOUTH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockFace WEST() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.SOUTH;
|
||||||
|
} else {
|
||||||
|
return BlockFace.WEST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockFace NORTH_EAST() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.NORTH_WEST;
|
||||||
|
} else {
|
||||||
|
return BlockFace.NORTH_EAST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockFace NORTH_WEST() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.SOUTH_WEST;
|
||||||
|
} else {
|
||||||
|
return BlockFace.NORTH_WEST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockFace SOUTH_EAST() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.NORTH_EAST;
|
||||||
|
} else {
|
||||||
|
return BlockFace.SOUTH_EAST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockFace SOUTH_WEST() {
|
||||||
|
if (!isLegacy) {
|
||||||
|
return BlockFace.NORTH_WEST;
|
||||||
|
} else {
|
||||||
|
return BlockFace.SOUTH_WEST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
|
||||||
import com.tommytony.war.War;
|
import com.tommytony.war.War;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,7 +74,7 @@ public class VerticalVolume extends Volume {
|
|||||||
int noOfResetBlocks = 0;
|
int noOfResetBlocks = 0;
|
||||||
try {
|
try {
|
||||||
if (this.hasTwoCorners() && this.getBlockTypes() != null) {
|
if (this.hasTwoCorners() && this.getBlockTypes() != null) {
|
||||||
if (wall == BlockFace.EAST) {
|
if (wall == Direction.EAST()) {
|
||||||
int z = this.getMinZ();
|
int z = this.getMinZ();
|
||||||
int k = 0;
|
int k = 0;
|
||||||
int y = this.getMinY();
|
int y = this.getMinY();
|
||||||
@ -90,7 +91,7 @@ public class VerticalVolume extends Volume {
|
|||||||
}
|
}
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
} else if (wall == BlockFace.WEST) {
|
} else if (wall == Direction.WEST()) {
|
||||||
int z = this.getMaxZ();
|
int z = this.getMaxZ();
|
||||||
int k = this.getSizeZ() - 1;
|
int k = this.getSizeZ() - 1;
|
||||||
int y = this.getMinY();
|
int y = this.getMinY();
|
||||||
@ -107,7 +108,7 @@ public class VerticalVolume extends Volume {
|
|||||||
}
|
}
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
} else if (wall == BlockFace.NORTH) {
|
} else if (wall == Direction.NORTH()) {
|
||||||
int x = this.getMinX();
|
int x = this.getMinX();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int y = this.getMinY();
|
int y = this.getMinY();
|
||||||
@ -124,7 +125,7 @@ public class VerticalVolume extends Volume {
|
|||||||
}
|
}
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
} else if (wall == BlockFace.SOUTH) {
|
} else if (wall == Direction.SOUTH()) {
|
||||||
int x = this.getMaxX();
|
int x = this.getMaxX();
|
||||||
int i = this.getSizeX() - 1;
|
int i = this.getSizeX() - 1;
|
||||||
int y = this.getMinY();
|
int y = this.getMinY();
|
||||||
|
@ -20,6 +20,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
import com.tommytony.war.War;
|
import com.tommytony.war.War;
|
||||||
import com.tommytony.war.job.BlockResetJob;
|
import com.tommytony.war.job.BlockResetJob;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -169,7 +170,7 @@ public class Volume {
|
|||||||
if (oldBlockType == Material.WALL_SIGN.getId() || oldBlockType == Material.SIGN_POST.getId()) {
|
if (oldBlockType == Material.WALL_SIGN.getId() || oldBlockType == Material.SIGN_POST.getId()) {
|
||||||
// Signs
|
// Signs
|
||||||
if (oldBlockType == Material.SIGN_POST.getId() && ((oldBlockData & 0x04) == 0x04) && i + 1 != this.getSizeX()) {
|
if (oldBlockType == Material.SIGN_POST.getId() && ((oldBlockData & 0x04) == 0x04) && i + 1 != this.getSizeX()) {
|
||||||
Block southBlock = currentBlock.getRelative(BlockFace.SOUTH);
|
Block southBlock = currentBlock.getRelative(Direction.SOUTH());
|
||||||
int oldSouthBlockType = this.getBlockTypes()[i + 1][j][k];
|
int oldSouthBlockType = this.getBlockTypes()[i + 1][j][k];
|
||||||
byte oldSouthBlockData = this.getBlockDatas()[i + 1][j][k];
|
byte oldSouthBlockData = this.getBlockDatas()[i + 1][j][k];
|
||||||
if (southBlock.getTypeId() != oldSouthBlockType) {
|
if (southBlock.getTypeId() != oldSouthBlockType) {
|
||||||
@ -255,7 +256,7 @@ public class Volume {
|
|||||||
}
|
}
|
||||||
} else if (((oldBlockType == Material.TORCH.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.REDSTONE_TORCH_OFF.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.REDSTONE_TORCH_ON.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.LEVER.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.STONE_BUTTON.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.LADDER.getId() && ((oldBlockData & 0x04) == 0x04)) || (oldBlockType == Material.RAILS.getId() && ((oldBlockData & 0x02) == 0x02))) && i + 1 != this.getSizeX()) {
|
} else if (((oldBlockType == Material.TORCH.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.REDSTONE_TORCH_OFF.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.REDSTONE_TORCH_ON.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.LEVER.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.STONE_BUTTON.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.LADDER.getId() && ((oldBlockData & 0x04) == 0x04)) || (oldBlockType == Material.RAILS.getId() && ((oldBlockData & 0x02) == 0x02))) && i + 1 != this.getSizeX()) {
|
||||||
// Blocks that hang on a block south of themselves need to make sure that block is there before placing themselves... lol
|
// Blocks that hang on a block south of themselves need to make sure that block is there before placing themselves... lol
|
||||||
Block southBlock = currentBlock.getRelative(BlockFace.SOUTH);
|
Block southBlock = currentBlock.getRelative(Direction.SOUTH());
|
||||||
int oldSouthBlockType = this.getBlockTypes()[i + 1][j][k];
|
int oldSouthBlockType = this.getBlockTypes()[i + 1][j][k];
|
||||||
byte oldSouthBlockData = this.getBlockDatas()[i + 1][j][k];
|
byte oldSouthBlockData = this.getBlockDatas()[i + 1][j][k];
|
||||||
if (southBlock.getTypeId() != oldSouthBlockType) {
|
if (southBlock.getTypeId() != oldSouthBlockType) {
|
||||||
@ -457,7 +458,7 @@ public class Volume {
|
|||||||
for (int j = 0; j < this.getSizeY(); j++) {
|
for (int j = 0; j < this.getSizeY(); j++) {
|
||||||
int z = this.getMinZ();
|
int z = this.getMinZ();
|
||||||
for (int k = 0; k < this.getSizeZ(); k++) {
|
for (int k = 0; k < this.getSizeZ(); k++) {
|
||||||
if ((face == BlockFace.DOWN && y == this.getMinY()) || (face == BlockFace.UP && y == this.getMaxY()) || (face == BlockFace.NORTH && x == this.getMinX()) || (face == BlockFace.EAST && z == this.getMinZ()) || (face == BlockFace.SOUTH && x == this.getMaxX()) || (face == BlockFace.WEST && z == this.getMaxZ())) {
|
if ((face == BlockFace.DOWN && y == this.getMinY()) || (face == BlockFace.UP && y == this.getMaxY()) || (face == Direction.NORTH() && x == this.getMinX()) || (face == Direction.EAST() && z == this.getMinZ()) || (face == Direction.SOUTH() && x == this.getMaxX()) || (face == Direction.WEST() && z == this.getMaxZ())) {
|
||||||
Block currentBlock = this.getWorld().getBlockAt(x, y, z);
|
Block currentBlock = this.getWorld().getBlockAt(x, y, z);
|
||||||
currentBlock.setType(material);
|
currentBlock.setType(material);
|
||||||
currentBlock.setData(data);
|
currentBlock.setData(data);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: War
|
name: War
|
||||||
version: 1.7.3 (Doolittle)
|
version: 1.7.4-PREVIEW (Doolittle)
|
||||||
description: Minecraft PVP arenas (called warzones) for a fast-paced and structured PVP experience with TDM, CTF & more!
|
description: Minecraft PVP arenas (called warzones) for a fast-paced and structured PVP experience with TDM, CTF & more!
|
||||||
author: tommytony
|
author: tommytony
|
||||||
website: http://war.tommytony.com
|
website: http://war.tommytony.com
|
||||||
|
Loading…
Reference in New Issue
Block a user