mirror of
https://github.com/taoneill/war.git
synced 2025-02-15 10:51:20 +01:00
Make invisible spawns hidden. Closes gh-627
This commit is contained in:
parent
bf3795ded1
commit
c56fac6c34
@ -122,12 +122,7 @@ public class Team {
|
|||||||
byte lightData = this.warzone.getWarzoneMaterials().getLightData();
|
byte lightData = this.warzone.getWarzoneMaterials().getLightData();
|
||||||
|
|
||||||
TeamSpawnStyle style = this.getTeamConfig().resolveSpawnStyle();
|
TeamSpawnStyle style = this.getTeamConfig().resolveSpawnStyle();
|
||||||
if (style.equals(TeamSpawnStyle.INVISIBLE)) {
|
if (!style.equals(TeamSpawnStyle.INVISIBLE)) {
|
||||||
// nothing but glowstone
|
|
||||||
Block lightBlock = this.warzone.getWorld().getBlockAt(x, y - 1, z);
|
|
||||||
lightBlock.setType(light);
|
|
||||||
lightBlock.setData(lightData);
|
|
||||||
} else {
|
|
||||||
// first ring
|
// first ring
|
||||||
this.setBlock(x + 1, y - 1, z + 1, this.kind);
|
this.setBlock(x + 1, y - 1, z + 1, this.kind);
|
||||||
this.setBlock(x + 1, y - 1, z, this.kind);
|
this.setBlock(x + 1, y - 1, z, this.kind);
|
||||||
@ -152,19 +147,7 @@ public class Team {
|
|||||||
Block signBlock = null;
|
Block signBlock = null;
|
||||||
int signData = 0;
|
int signData = 0;
|
||||||
|
|
||||||
if (style.equals(TeamSpawnStyle.INVISIBLE)) {
|
if (style.equals(TeamSpawnStyle.SMALL)) {
|
||||||
// INVISIBLE style
|
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z);
|
|
||||||
if (yaw >= 0 && yaw < 90) {
|
|
||||||
signData = 10;
|
|
||||||
} else if (yaw >= 90 && yaw <= 180) {
|
|
||||||
signData = 14;
|
|
||||||
} else if (yaw >= 180 && yaw < 270) {
|
|
||||||
signData = 2;
|
|
||||||
} else if (yaw >= 270 && yaw <= 360) {
|
|
||||||
signData = 6;
|
|
||||||
}
|
|
||||||
} else if (style.equals(TeamSpawnStyle.SMALL)) {
|
|
||||||
// SMALL style
|
// SMALL style
|
||||||
if (yaw >= 0 && yaw < 90) {
|
if (yaw >= 0 && yaw < 90) {
|
||||||
signData = 10;
|
signData = 10;
|
||||||
@ -179,7 +162,7 @@ public class Team {
|
|||||||
signData = 6;
|
signData = 6;
|
||||||
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.SOUTH()).getRelative(Direction.WEST());
|
signBlock = this.warzone.getWorld().getBlockAt(x, y, z).getRelative(Direction.SOUTH()).getRelative(Direction.WEST());
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!style.equals(TeamSpawnStyle.INVISIBLE)) {
|
||||||
// outer ring (FLAT or BIG)
|
// outer ring (FLAT or BIG)
|
||||||
this.setBlock(x + 2, y - 1, z + 2, this.kind);
|
this.setBlock(x + 2, y - 1, z + 2, this.kind);
|
||||||
this.setBlock(x + 2, y - 1, z + 1, this.kind);
|
this.setBlock(x + 2, y - 1, z + 1, this.kind);
|
||||||
|
Loading…
Reference in New Issue
Block a user