Hopefully made arenas with generators?

This commit is contained in:
Luca
2021-11-23 10:57:52 +01:00
parent 5e63d85468
commit 03512ae139
15 changed files with 225 additions and 157 deletions

View File

@ -61,13 +61,25 @@ public class ArenaCommandRunnable implements Runnable {
CustomLocation teamBmin = new CustomLocation(bMinX, arena.getTeamBmin().getY(), bMinZ, arena.getTeamBmin().getYaw(), arena.getTeamBmin().getPitch());
CustomLocation teamBmax = new CustomLocation(bMaxX, arena.getTeamBmax().getY(), bMaxZ, arena.getTeamBmax().getYaw(), arena.getTeamBmax().getPitch());
List<CustomLocation> generators = new ArrayList<>();
for (CustomLocation generator : arena.getGenerators()) {
CustomLocation newGenerator = new CustomLocation((generator.getX() + this.getOffsetX()), generator.getY(), (generator.getZ() + this.getOffsetZ()), generator.getYaw(), generator.getPitch());
generators.add(newGenerator);
List<CustomLocation> teamGenerators = new ArrayList<>();
for (CustomLocation location : arena.getTeamGenerators()) {
CustomLocation newTeamGenerator = new CustomLocation((location.getX() + this.getOffsetX()), location.getY(), (location.getZ() + this.getOffsetZ()), location.getYaw(), location.getPitch());
teamGenerators.add(newTeamGenerator);
}
CopiedArena copiedArena = new CopiedArena(a, b, min, max, teamAmin, teamAmax, teamBmin, teamBmax, generators);
List<CustomLocation> diamondGenerators = new ArrayList<>();
for (CustomLocation location : arena.getDiamondGenerators()) {
CustomLocation newDiamondGenerator = new CustomLocation((location.getX() + this.getOffsetX()), location.getY(), (location.getZ() + this.getOffsetZ()), location.getYaw(), location.getPitch());
diamondGenerators.add(newDiamondGenerator);
}
List<CustomLocation> emeraldGenerators = new ArrayList<>();
for (CustomLocation location : arena.getEmeraldGenerators()) {
CustomLocation newEmeraldGenerator = new CustomLocation((location.getX() + this.getOffsetX()), location.getY(), (location.getZ() + this.getOffsetZ()), location.getYaw(), location.getPitch());
emeraldGenerators.add(newEmeraldGenerator);
}
CopiedArena copiedArena = new CopiedArena(a, b, min, max, teamAmin, teamAmax, teamBmin, teamBmax, teamGenerators, diamondGenerators, emeraldGenerators);
arena.addCopiedArena(copiedArena);
arena.addAvailableArena(copiedArena);