SteamWar/BauSystem
Archiviert
13
0

Tracer-entity #147

Manuell gemergt
YoyoNow hat 47 Commits von Tracer-entity nach master 2020-12-27 22:16:04 +01:00 zusammengeführt
3 geänderte Dateien mit 6 neuen und 9 gelöschten Zeilen
Nur Änderungen aus Commit dee5d9598d werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -24,10 +24,6 @@ import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.tracer.record.RecordStateMachine;
import de.steamwar.bausystem.tracer.show.StoredRecords;
import de.steamwar.bausystem.tracer.show.TraceShowManager;
import de.steamwar.bausystem.tracer.show.mode.Advanced;
import de.steamwar.bausystem.tracer.show.mode.AdvancedNoWater;
import de.steamwar.bausystem.tracer.show.mode.Basic;
import de.steamwar.bausystem.tracer.show.mode.BasicNoWater;
import de.steamwar.bausystem.world.Welt;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;

Datei anzeigen

@ -49,7 +49,7 @@ public class CommandTraceTabCompleter implements TabCompleter {
tabComplete.add("auto");
tabComplete.add("show");
if (args[0].equalsIgnoreCase("show") && args.length == 2) {
return manageList(new ArrayList<>(Arrays.asList("nowater", "basic", "default", "advanced", "advanced-nowater")), args, 1);
return manageList(new ArrayList<>(Arrays.asList("nowater", "basic", "advanced", "advanced-nowater")), args, 1);
}
tabComplete.add("hide");
tabComplete.add("delete");

Datei anzeigen

@ -44,15 +44,16 @@ public class Advanced extends Basic {
public void show(TNTPosition position) {
super.show(position);
if (position.isExploded()) return;
if (position.getVelocity() == null) return;
Vector previousLocation = position.getLocation().clone().subtract(position.getVelocity());
Vector nextLocation = position.getLocation().clone().add(position.getVelocity());
Vector updatePointY = previousLocation.clone().setY(position.getLocation().getY());
Vector updatePointY = position.getLocation().clone().setY(nextLocation.getY());
Vector updatePointXZ;
if (Math.abs(position.getVelocity().getX()) > Math.abs(position.getVelocity().getZ())) {
updatePointXZ = updatePointY.clone().setX(position.getLocation().getX());
updatePointXZ = updatePointY.clone().setX(nextLocation.getX());
} else {
updatePointXZ = updatePointY.clone().setZ(position.getLocation().getZ());
updatePointXZ = updatePointY.clone().setZ(nextLocation.getZ());
}
if (!position.getLocation().equals(updatePointY)) {