From e06d612a0e848375d4f37aa0d159fdb0c0aecc6e Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Tue, 9 Apr 2024 22:46:00 +0200 Subject: [PATCH] Renamed TNTRecord Signed-off-by: D4rkr34lm --- .../laufbau/states/ProcessingTracesState.java | 14 ++++---- .../bausystem/features/tracer/Trace.java | 34 +++++++++---------- .../features/tracer/TraceCommand.java | 8 ++--- .../features/tracer/TraceManager.java | 8 ++--- .../{TNTRecord.java => TraceRecord.java} | 14 ++++---- .../features/tracer/TraceRecorder.java | 14 ++++---- .../tracer/rendering/BundleFilter.java | 12 +++---- .../tracer/rendering/TraceEntity.java | 8 ++--- .../features/tracer/rendering/ViewFlag.java | 30 ++++++++-------- .../tracer/rendering/dynamicflags/AtFlag.java | 4 +-- .../rendering/dynamicflags/IsolateFlag.java | 4 +-- 11 files changed, 75 insertions(+), 75 deletions(-) rename BauSystem_Main/src/de/steamwar/bausystem/features/tracer/{TNTRecord.java => TraceRecord.java} (90%) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java index e8693105..ffc4e06d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java @@ -23,7 +23,7 @@ import com.sk89q.worldedit.EditSession; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox; import de.steamwar.bausystem.features.slaves.laufbau.Cuboid; -import de.steamwar.bausystem.features.tracer.TNTRecord; +import de.steamwar.bausystem.features.tracer.TraceRecord; import de.steamwar.bausystem.features.tracer.TraceRecorder; import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.utils.FlatteningWrapper; @@ -45,7 +45,7 @@ public class ProcessingTracesState implements LaufbauState { private final List elements; private final int factor; - private final List tntRecords; + private final List traceRecords; private final int totalTntRecords; private final Set affectedBlocks = new HashSet<>(); @@ -59,17 +59,17 @@ public class ProcessingTracesState implements LaufbauState { this.factor = factor; // TODO: Optimize only retrieving traces inside of the affected regions! - tntRecords = TraceRecorder.instance.manager.getAll() + traceRecords = TraceRecorder.instance.manager.getAll() .stream() .flatMap(trace -> trace.getHistories().stream()) .flatMap(Collection::stream) .collect(Collectors.toList()); - totalTntRecords = tntRecords.size(); + totalTntRecords = traceRecords.size(); } @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_PROCESSING_TRACES", p), totalTntRecords - tntRecords.size(), totalTntRecords, eta(p, start, totalTntRecords - tntRecords.size(), totalTntRecords)); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_PROCESSING_TRACES", p), totalTntRecords - traceRecords.size(), totalTntRecords, eta(p, start, totalTntRecords - traceRecords.size(), totalTntRecords)); } private boolean inRegion(Vector location, int expansion) { @@ -78,12 +78,12 @@ public class ProcessingTracesState implements LaufbauState { @Override public boolean hasNext() { - return !tntRecords.isEmpty(); + return !traceRecords.isEmpty(); } @Override public void next() { - TNTRecord current = tntRecords.remove(0); + TraceRecord current = traceRecords.remove(0); if (FlatteningWrapper.impl.inWater(world, current.getLocation().toVector())) return; if (!(inRegion(current.getLocation().toVector(), 1) || (current.getPrevious().isPresent() && inRegion(current.getPrevious().get().getLocation().toVector(), 1)))) return; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java index d90126b8..f6be4639 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java @@ -50,7 +50,7 @@ public class Trace { // TODO: Add UUID for file saving and so on! * Records of TNTs, making up the trace */ @Getter - private List records = new ArrayList<>(); + private List records = new ArrayList<>(); /** * ID that should be assigned to the next record of a unique tnt @@ -66,7 +66,7 @@ public class Trace { // TODO: Add UUID for file saving and so on! public List getUsedIds() { return getRecords() .stream() - .map(TNTRecord::getTntId) + .map(TraceRecord::getTntId) .map(i -> i + "") .collect(Collectors.toList()); } @@ -87,7 +87,7 @@ public class Trace { // TODO: Add UUID for file saving and so on! /** * Adds the given records and updates potential trace renderings */ - protected void addAll(List records, Function getter) { + protected void addAll(List records, Function getter) { this.records.addAll(records); Iterator keySetIterator = entityServerMap.keySet().iterator(); while (keySetIterator.hasNext()) { @@ -106,7 +106,7 @@ public class Trace { // TODO: Add UUID for file saving and so on! * * @param records immutable records list */ - protected void setRecords(List records) { + protected void setRecords(List records) { this.records = records; } @@ -115,10 +115,10 @@ public class Trace { // TODO: Add UUID for file saving and so on! * * @return the historys of this trace */ - public Set> getHistories() { - Set> histories = new HashSet<>(); + public Set> getHistories() { + Set> histories = new HashSet<>(); - for (TNTRecord record : getRecords()) { + for (TraceRecord record : getRecords()) { histories.add(record.getHistory()); } @@ -149,10 +149,10 @@ public class Trace { // TODO: Add UUID for file saving and so on! * @param records Records to render * @param playerTraceShowData The showData for modifying the rendering */ - private void render(List records, REntityServer entityServer, PlayerTraceShowData playerTraceShowData) { + private void render(List records, REntityServer entityServer, PlayerTraceShowData playerTraceShowData) { if (records.isEmpty()) return; - List workingRecords = records; + List workingRecords = records; Set flagList = playerTraceShowData.getEffectiveViewFlags(); //Apply filters @@ -161,12 +161,12 @@ public class Trace { // TODO: Add UUID for file saving and so on! } //Bundle records at unique positions - List> bundles = bundleRecords(workingRecords, playerTraceShowData.getBundleFilter()); + List> bundles = bundleRecords(workingRecords, playerTraceShowData.getBundleFilter()); //Render bundled records List entities = new LinkedList<>(); - for (List bundle : bundles) { + for (List bundle : bundles) { entities.add(new TraceEntity(entityServer, bundle.get(0).getLocation(), bundle.get(0).isExplosion(), bundle)); } @@ -190,23 +190,23 @@ public class Trace { // TODO: Add UUID for file saving and so on! * @param records The TNTRecords that are supposed to be bundled * @return A list of bundles */ - private List> bundleRecords(List records, BundleFilter filter) { - List> bundles = new ArrayList<>(); + private List> bundleRecords(List records, BundleFilter filter) { + List> bundles = new ArrayList<>(); recordsLoop: - for (TNTRecord record : records) { + for (TraceRecord record : records) { if (bundles.isEmpty()) { - List firstBundle = new ArrayList<>(); + List firstBundle = new ArrayList<>(); firstBundle.add(record); bundles.add(firstBundle); } for (int i = bundles.size() - 1; i >= 0; i--) { - List bundle = bundles.get(i); + List bundle = bundles.get(i); Boolean filterResult = filter.function.apply(record, bundle.get(0)); if (filterResult == null || !filterResult) { - ArrayList newBundle = new ArrayList<>(); + ArrayList newBundle = new ArrayList<>(); newBundle.add(record); bundles.add(newBundle); continue recordsLoop; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java index 854deaed..393dd0ec 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -143,7 +143,7 @@ public class TraceCommand extends SWCommand { } @Register(value = "isolate", description = "TRACE_COMMAND_HELP_ISOLATE") - public void isolate(@Validator Player player, Trace trace, @ErrorMessage("TRACE_RECORD_ID_INVALID") TNTRecord... records) { + public void isolate(@Validator Player player, Trace trace, @ErrorMessage("TRACE_RECORD_ID_INVALID") TraceRecord... records) { manager.isolate(player, records); // TODO: Add Message! } @@ -186,11 +186,11 @@ public class TraceCommand extends SWCommand { }; } - @ClassMapper(value = TNTRecord.class, local = true) - public TypeMapper recordMapper() { + @ClassMapper(value = TraceRecord.class, local = true) + public TypeMapper recordMapper() { return new TypeMapper<>() { @Override - public TNTRecord map(CommandSender commandSender, PreviousArguments previousArguments, String s) { + public TraceRecord map(CommandSender commandSender, PreviousArguments previousArguments, String s) { Trace trace = previousArguments.getFirst(Trace.class).orElse(null); if (trace == null) return null; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java index 1e693207..508d8f20 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java @@ -61,8 +61,8 @@ public class TraceManager implements Listener { return nextOpenId; } - protected void addAll(Trace trace, List tntRecords) { - trace.addAll(tntRecords, player -> { + protected void addAll(Trace trace, List traceRecords) { + trace.addAll(traceRecords, player -> { return showDataPerRegionPerPlayer.getOrDefault(trace.getRegion(), Collections.emptyMap()).get(player); }); } @@ -195,7 +195,7 @@ public class TraceManager implements Listener { * @param player the player the trace is shown to * @param records the record for which isolation is toggled */ - public void isolate(Player player, TNTRecord... records) { + public void isolate(Player player, TraceRecord... records) { Region region = Region.getRegion(player.getLocation()); PlayerTraceShowData playerTraceShowData = showDataPerRegionPerPlayer.computeIfAbsent(region, ignored -> new HashMap<>()).computeIfAbsent(player, ignored -> new PlayerTraceShowData(BundleFilter.STRICT)); @@ -212,7 +212,7 @@ public class TraceManager implements Listener { showDataPerRegionPerPlayer.get(region).put(player, playerTraceShowData); } - for (TNTRecord record : records) { + for (TraceRecord record : records) { isolateFlag.toggleId(record.getTntId()); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTRecord.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecord.java similarity index 90% rename from BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTRecord.java rename to BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecord.java index 52671821..fea06ed3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTRecord.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecord.java @@ -32,7 +32,7 @@ import java.util.List; import java.util.Optional; @Getter -public class TNTRecord { +public class TraceRecord { /** * Unique number to identify records being of the same tnt @@ -87,9 +87,9 @@ public class TNTRecord { /** * List of all tnt records, that are represent the same tnt */ - private final List history; + private final List history; - public TNTRecord(int tntId, TNTPrimed tnt, boolean explosion, boolean afterFirstExplosion, long ticksSinceStart, List history, List destroyedBlocks) { + public TraceRecord(int tntId, TNTPrimed tnt, boolean explosion, boolean afterFirstExplosion, long ticksSinceStart, List history, List destroyedBlocks) { this.tntId = tntId; this.explosion = explosion; this.inWater = tnt.isInWater(); @@ -115,12 +115,12 @@ public class TNTRecord { destroyedTestBlock = testblockDestroy; } - public Optional getNext() { + public Optional getNext() { int index = history.indexOf(this); return index == history.size() - 1 ? Optional.empty() : Optional.of(history.get(index + 1)); } - public Optional getPrevious() { + public Optional getPrevious() { int index = history.indexOf(this); return index == 0 ? Optional.empty() : Optional.of(history.get(index - 1)); } @@ -138,8 +138,8 @@ public class TNTRecord { @Override public boolean equals(Object obj) { - if (!(obj instanceof TNTRecord)) return false; - TNTRecord record = (TNTRecord) obj; + if (!(obj instanceof TraceRecord)) return false; + TraceRecord record = (TraceRecord) obj; if (record.isExplosion() != explosion) return false; if (!record.getLocation().equals(location)) return false; if (!record.getVelocity().equals(velocity)) return false; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java index da31507a..15b31af0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java @@ -72,12 +72,12 @@ public class TraceRecorder implements Listener { /** * A map for records that have been taken in the same tick and now have to be added to the traces */ - private final Map> recordsToAddMap = new HashMap<>(); + private final Map> recordsToAddMap = new HashMap<>(); /** * Maps a tracked tnt entity to its entire recording history */ - private final Map> historyMap = new HashMap<>(); + private final Map> historyMap = new HashMap<>(); /** * Regions where auto-trace is enabled @@ -160,9 +160,9 @@ public class TraceRecorder implements Listener { record(tnt, trace, Collections.emptyList()); } - List tntRecords = recordsToAddMap.get(trace); - manager.addAll(trace, tntRecords); - tntRecords.clear(); + List traceRecords = recordsToAddMap.get(trace); + manager.addAll(trace, traceRecords); + traceRecords.clear(); } } @@ -173,7 +173,7 @@ public class TraceRecorder implements Listener { * @param trace trace to record the tnt for */ private void record(TNTPrimed tntPrimed, Trace trace, List destroyedBlocks) { - List history = historyMap.getOrDefault(tntPrimed, new ArrayList<>()); + List history = historyMap.getOrDefault(tntPrimed, new ArrayList<>()); int tntID; if (history.size() == 0) { @@ -189,7 +189,7 @@ public class TraceRecorder implements Listener { } boolean afterFirstExplosion = noExplosionRecorded.contains(trace); - TNTRecord record = new TNTRecord(tntID, tntPrimed, isExplosion, afterFirstExplosion, TPSUtils.currentTick.get() - trace.getStartTime(), history, destroyedBlocks); + TraceRecord record = new TraceRecord(tntID, tntPrimed, isExplosion, afterFirstExplosion, TPSUtils.currentTick.get() - trace.getStartTime(), history, destroyedBlocks); history.add(record); recordsToAddMap.get(trace).add(record); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java index 5232065c..12aa69ea 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java @@ -19,7 +19,7 @@ package de.steamwar.bausystem.features.tracer.rendering; -import de.steamwar.bausystem.features.tracer.TNTRecord; +import de.steamwar.bausystem.features.tracer.TraceRecord; import lombok.RequiredArgsConstructor; import java.util.function.BiFunction; @@ -27,14 +27,14 @@ import java.util.function.BiFunction; @RequiredArgsConstructor public enum BundleFilter { - LOOSE((TNTRecord a, TNTRecord b) -> { + LOOSE((TraceRecord a, TraceRecord b) -> { if (a.isExplosion() != b.isExplosion()) return false; if (a.getLocation().distanceSquared(b.getLocation()) <= BundleFilter.pixelSizeSquared) return false; if (a.getVelocity().distanceSquared(b.getVelocity()) <= BundleFilter.pixelSizeSquared) return false; return true; }), - DEFAULT((TNTRecord a, TNTRecord b) -> { + DEFAULT((TraceRecord a, TraceRecord b) -> { if (a.isExplosion() != b.isExplosion()) return false; if (a.getTicksSinceStart() != b.getTicksSinceStart()) return null; if (a.getLocation().distanceSquared(b.getLocation()) <= BundleFilter.pixelSizeSquared) return false; @@ -42,7 +42,7 @@ public enum BundleFilter { return true; }), - STRICT((TNTRecord a, TNTRecord b) -> { + STRICT((TraceRecord a, TraceRecord b) -> { if (a.isExplosion() != b.isExplosion()) return false; if (!a.getLocation().equals(b.getLocation())) return false; if (!a.getVelocity().equals(b.getVelocity())) return false; @@ -50,7 +50,7 @@ public enum BundleFilter { return true; }), - NONE((TNTRecord a, TNTRecord b) -> { + NONE((TraceRecord a, TraceRecord b) -> { return null; }); @@ -59,7 +59,7 @@ public enum BundleFilter { * {@code false}: No bundling allowed * {@code true}: Bundling should be applied */ - public final BiFunction function; + public final BiFunction function; private static final double pixelSize = 0.0625; private static final double pixelSizeSquared = pixelSize * pixelSize; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java index 06a69764..ec9d0126 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java @@ -20,7 +20,7 @@ package de.steamwar.bausystem.features.tracer.rendering; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.tracer.TNTRecord; +import de.steamwar.bausystem.features.tracer.TraceRecord; import de.steamwar.entity.REntityServer; import de.steamwar.entity.RFallingBlockEntity; import lombok.Getter; @@ -36,16 +36,16 @@ public class TraceEntity extends RFallingBlockEntity { * The records represented by this REntity */ @Getter - private final List records; + private final List records; - public TraceEntity(REntityServer server, Location location, boolean isExplosion, List records) { + public TraceEntity(REntityServer server, Location location, boolean isExplosion, List records) { super(server, location, isExplosion ? Material.RED_STAINED_GLASS : Material.TNT); setNoGravity(true); this.records = records; } public void printIntoChat(Player player) { - TNTRecord representative = records.get(0); + TraceRecord representative = records.get(0); BauSystem.MESSAGE.sendPrefixless("TNT_CLICK_HEADER", player); BauSystem.MESSAGE.sendPrefixless("TNT_CLICK_FUSE_TIME", player, representative.getFuse()); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java index a42dcb7a..952907cb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java @@ -19,7 +19,7 @@ package de.steamwar.bausystem.features.tracer.rendering; -import de.steamwar.bausystem.features.tracer.TNTRecord; +import de.steamwar.bausystem.features.tracer.TraceRecord; import de.steamwar.entity.REntityServer; import de.steamwar.entity.RFallingBlockEntity; import org.bukkit.Location; @@ -45,16 +45,16 @@ public abstract class ViewFlag { public static ViewFlag EXPLOSION = new ViewFlag(true, false, "explosion", "e") { @Override - public List filter(List records) { + public List filter(List records) { return records.stream() - .filter(TNTRecord::isExplosion) + .filter(TraceRecord::isExplosion) .collect(Collectors.toList()); } }; public static ViewFlag IGNITE = new ViewFlag(true, true, "ignite", "i") { @Override - public List filter(List records) { + public List filter(List records) { return records.stream() .filter(record -> !record.isAfterFirstExplosion()) .collect(Collectors.toList()); @@ -63,7 +63,7 @@ public abstract class ViewFlag { public static ViewFlag SOURCE = new ViewFlag(true, false, IGNITE, "source", "s") { @Override - public List filter(List records) { + public List filter(List records) { return records.stream() .filter(record -> record.getFuse() == 80) .collect(Collectors.toList()); @@ -72,7 +72,7 @@ public abstract class ViewFlag { public static ViewFlag BUILD_DESTROY_ONLY = new ViewFlag(true, false, "build-destroy-only") { @Override - public List filter(List records) { + public List filter(List records) { return records.stream() .filter(record -> record.getHistory().get(record.getHistory().size() - 1).isDestroyedBuildArea()) .collect(Collectors.toList()); @@ -81,7 +81,7 @@ public abstract class ViewFlag { public static ViewFlag TESTBLOCK_DESTROY_ONLY = new ViewFlag(true, false, "testblock-destroy-only") { @Override - public List filter(List records) { + public List filter(List records) { return records.stream() .filter(record -> record.getHistory().get(record.getHistory().size() - 1).isDestroyedTestBlock()) .collect(Collectors.toList()); @@ -90,15 +90,15 @@ public abstract class ViewFlag { public static ViewFlag MICROMOTION = new ViewFlag(true, false, "micromotion", "m") { @Override - public List filter(List records) { + public List filter(List records) { Set seen = new HashSet<>(); - Set toRemove = new HashSet<>(); + Set toRemove = new HashSet<>(); - for (TNTRecord uniqueRecord : records) { + for (TraceRecord uniqueRecord : records) { if (seen.contains(uniqueRecord.getTntId())) continue; boolean hasMicromotion = false; - for (TNTRecord record : uniqueRecord.getHistory()) { + for (TraceRecord record : uniqueRecord.getHistory()) { Vector velocity = record.getVelocity(); if (velocity.getY() == 0 && (Math.abs(velocity.getX()) < 0.001 || Math.abs(velocity.getZ()) < 0.001)) { hasMicromotion = true; @@ -112,7 +112,7 @@ public abstract class ViewFlag { seen.add(uniqueRecord.getTntId()); } - for (TNTRecord record : toRemove) { + for (TraceRecord record : toRemove) { records.removeAll(record.getHistory()); } @@ -124,9 +124,9 @@ public abstract class ViewFlag { @Override public void modify(REntityServer server, List entities) { for (TraceEntity entity : entities) { - TNTRecord current = entity.getRecords().get(0); + TraceRecord current = entity.getRecords().get(0); if (current.isExplosion()) continue; - TNTRecord next = current.getNext().orElse(null); + TraceRecord next = current.getNext().orElse(null); if (next == null) continue; Location pos = current.getLocation().clone(); @@ -214,7 +214,7 @@ public abstract class ViewFlag { * @param records Records to be filtered * @return Filtered records */ - public List filter(List records) { + public List filter(List records) { return records; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java index b8c31f36..30e51c95 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java @@ -19,7 +19,7 @@ package de.steamwar.bausystem.features.tracer.rendering.dynamicflags; -import de.steamwar.bausystem.features.tracer.TNTRecord; +import de.steamwar.bausystem.features.tracer.TraceRecord; import de.steamwar.bausystem.features.tracer.rendering.ViewFlag; import java.util.List; @@ -47,7 +47,7 @@ public class AtFlag extends ViewFlag { } @Override - public List filter(List records) { + public List filter(List records) { return records.stream() .filter(record -> record.getTicksSinceStart() >= start && record.getTicksSinceStart() <= end) .collect(Collectors.toList()); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java index 4b008fb0..e77b9f99 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java @@ -19,7 +19,7 @@ package de.steamwar.bausystem.features.tracer.rendering.dynamicflags; -import de.steamwar.bausystem.features.tracer.TNTRecord; +import de.steamwar.bausystem.features.tracer.TraceRecord; import de.steamwar.bausystem.features.tracer.rendering.ViewFlag; import java.util.HashSet; @@ -50,7 +50,7 @@ public class IsolateFlag extends ViewFlag { } @Override - public List filter(List records) { + public List filter(List records) { return records.stream() .filter(record -> tntToIsolate.contains(record.getTntId())) .collect(Collectors.toList());