SteamWar/FightSystem
Archiviert
13
1

Meteor #324

Zusammengeführt
Lixfel hat 24 Commits von Meteor nach master 2022-02-11 22:48:17 +01:00 zusammengeführt
3 geänderte Dateien mit 65 neuen und 37 gelöschten Zeilen
Nur Änderungen aus Commit 1e7e94d359 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -152,23 +152,6 @@ public class HellsBells {
}
}
private static class Point {
private final int x;
private final int y;
private final int z;
public Point(int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
}
public Location addAndToLocation(World world, int x, int y, int z) {
return new Location(world, this.x + x, this.y + y, this.z + z); //NOSONAR
}
}
private enum State {
PRE(60, 80, 1),

Datei anzeigen

@ -1,3 +1,22 @@
/*
Veraltet
Review

Fehlender License-Header

Fehlender License-Header
This file is a part of the SteamWar software.
Copyright (C) 2020 SteamWar.de-Serverteam
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.fightsystem.event;
import de.steamwar.fightsystem.Config;
@ -10,7 +29,6 @@ import de.steamwar.fightsystem.utils.Message;
import de.steamwar.fightsystem.utils.SWSound;
import de.steamwar.fightsystem.winconditions.Winconditions;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Fireball;
import org.bukkit.entity.TNTPrimed;
@ -82,8 +100,8 @@ public class Meteor implements Listener {
int zOffset = getStart(zLength);
int yOffset = getHeightStart();
Meteor.Point redStart = new Meteor.Point(Config.RedExtendRegion.getMinX() + xOffset, Config.RedExtendRegion.getMaxY() + yOffset, Config.RedExtendRegion.getMaxZ() - zOffset);
Meteor.Point blueStart = new Meteor.Point(Config.BlueExtendRegion.getMinX() + xOffset, Config.BlueExtendRegion.getMaxY() + yOffset, Config.BlueExtendRegion.getMinZ() + zOffset);
Point redStart = new Point(Config.RedExtendRegion.getMinX() + xOffset, Config.RedExtendRegion.getMaxY() + yOffset, Config.RedExtendRegion.getMaxZ() - zOffset);
Point blueStart = new Point(Config.BlueExtendRegion.getMinX() + xOffset, Config.BlueExtendRegion.getMaxY() + yOffset, Config.BlueExtendRegion.getMinZ() + zOffset);
vector.setX(random.nextDouble() - 0.5);
vector.setZ(random.nextDouble() - 0.5);
@ -146,23 +164,6 @@ public class Meteor implements Listener {
}
}
Lixfel markierte diese Unterhaltung als gelöst
Review

Auch nicht genau so in HellsBells?

Auch nicht genau so in HellsBells?
Review

Die Klasse schon, sie hat nur andere Werte! Vllt könnte man sich da eine kleine lineare State Machine ausdenken, welche das gleiche Macht.

Die Klasse schon, sie hat nur andere Werte! Vllt könnte man sich da eine kleine lineare State Machine ausdenken, welche das gleiche Macht.
private static class Point {
private final int x;
private final int y;
private final int z;
public Point(int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
}
public Location toLocation(World world) {
return new Location(world, this.x, this.y, this.z); //NOSONAR
}
}
private enum State {
PRE(60, 80, 1, 0, 0, 0),

Datei anzeigen

@ -0,0 +1,44 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2020 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.fightsystem.event;
import org.bukkit.Location;
import org.bukkit.World;
class Point {
private final int x;
private final int y;
private final int z;
public Point(int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
}
public Location toLocation(World world) {
return new Location(world, this.x, this.y, this.z); //NOSONAR
}
public Location addAndToLocation(World world, int x, int y, int z) {
return new Location(world, this.x + x, this.y + y, this.z + z); //NOSONAR
}
}