Refactors
Dieser Commit ist enthalten in:
Ursprung
bb3142078f
Commit
625f39fba4
@ -42,6 +42,7 @@ public class WorldConfig {
|
|||||||
public static final Region[] REGIONS;
|
public static final Region[] REGIONS;
|
||||||
public static final Location[] DOORS;
|
public static final Location[] DOORS;
|
||||||
public static final int LAVA_Y;
|
public static final int LAVA_Y;
|
||||||
|
public static final int LAVE_SPACE;
|
||||||
public static final Location SPAWN;
|
public static final Location SPAWN;
|
||||||
public static final int ESCAPE_HEIGHT;
|
public static final int ESCAPE_HEIGHT;
|
||||||
public static final Location MIN_TOWER;
|
public static final Location MIN_TOWER;
|
||||||
@ -126,6 +127,7 @@ public class WorldConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LAVA_Y = tower.getInt("lavaY");
|
LAVA_Y = tower.getInt("lavaY");
|
||||||
|
LAVE_SPACE = tower.getInt("laveSpace");
|
||||||
ACTIVE_WINCONDITIONS = config.getStringList("winconditions");
|
ACTIVE_WINCONDITIONS = config.getStringList("winconditions");
|
||||||
WINCONDITIONS.stream().filter(winCondition -> ACTIVE_WINCONDITIONS.contains(winCondition.getName())).forEach(winCondition -> winCondition.setActive(true));
|
WINCONDITIONS.stream().filter(winCondition -> ACTIVE_WINCONDITIONS.contains(winCondition.getName())).forEach(winCondition -> winCondition.setActive(true));
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,8 @@ public class TowerRunGame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void generateLava() {
|
private static void generateLava() {
|
||||||
for (int x = WorldConfig.MIN_TOWER.getBlockX(); x < WorldConfig.MAX_TOWER.getBlockX(); x += 7) {
|
for (int x = WorldConfig.MIN_TOWER.getBlockX(); x < WorldConfig.MAX_TOWER.getBlockX(); x += WorldConfig.LAVE_SPACE) {
|
||||||
for (int z = WorldConfig.MIN_TOWER.getBlockZ(); z < WorldConfig.MAX_TOWER.getBlockZ(); z += 7) {
|
for (int z = WorldConfig.MIN_TOWER.getBlockZ(); z < WorldConfig.MAX_TOWER.getBlockZ(); z += WorldConfig.LAVE_SPACE) {
|
||||||
Vector pos = new Vector(x, 0, z);
|
Vector pos = new Vector(x, 0, z);
|
||||||
if (Arrays.stream(WorldConfig.REGIONS).anyMatch(region -> region.contains(pos))) {
|
if (Arrays.stream(WorldConfig.REGIONS).anyMatch(region -> region.contains(pos))) {
|
||||||
WorldConfig.MIN_TOWER.getWorld().getBlockAt(x, WorldConfig.LAVA_Y, z).setType(Material.LAVA, true);
|
WorldConfig.MIN_TOWER.getWorld().getBlockAt(x, WorldConfig.LAVA_Y, z).setType(Material.LAVA, true);
|
||||||
|
@ -27,6 +27,7 @@ tower:
|
|||||||
y: 167
|
y: 167
|
||||||
z: 309
|
z: 309
|
||||||
lavaY: 220
|
lavaY: 220
|
||||||
|
laveSpace: 7
|
||||||
|
|
||||||
winconditions:
|
winconditions:
|
||||||
- LAST_REMAINING
|
- LAST_REMAINING
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren