diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java index be47e4bc..aa6a1b9f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java @@ -22,6 +22,7 @@ package de.steamwar.bausystem.features.tracer; import de.steamwar.bausystem.features.tracer.show.Record; import de.steamwar.bausystem.shared.Position; import lombok.Getter; +import lombok.Setter; import org.bukkit.entity.TNTPrimed; import org.bukkit.util.Vector; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/AutoTraceRecorder.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/AutoTraceRecorder.java index ea08ec15..ab326abc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/AutoTraceRecorder.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/AutoTraceRecorder.java @@ -52,7 +52,7 @@ public abstract class AutoTraceRecorder implements TraceRecorder { private Record lastRecord; private Record.TNTRecord getRecord(TNTPrimed tntPrimed) { - return recordMap.computeIfAbsent(tntPrimed, __ -> record.spawn(TPSUtils.currentRealTick.get() - startTime)); + return recordMap.computeIfAbsent(tntPrimed, __ -> record.spawn()); } protected abstract String getInactivityMessage(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/SimpleTraceRecorder.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/SimpleTraceRecorder.java index 213299ad..875d25b5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/SimpleTraceRecorder.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/SimpleTraceRecorder.java @@ -52,7 +52,7 @@ public class SimpleTraceRecorder implements TraceRecorder, ActiveTracer { } private Record.TNTRecord getRecord(TNTPrimed tntPrimed) { - return recordMap.computeIfAbsent(tntPrimed, __ -> record.spawn(TPSUtils.currentRealTick.get() - startTime)); + return recordMap.computeIfAbsent(tntPrimed, __ -> record.spawn()); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/EntityShowMode.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/EntityShowMode.java index 657a44c0..b95b4585 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/EntityShowMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/EntityShowMode.java @@ -205,12 +205,10 @@ public class EntityShowMode implements ShowMode { entity = createEntity(position, positionType); } count++; - if (showModeParameter.isTicks()) { + if (showModeParameter.isFuse()) { entity.setDisplayName(fuseTicks + ""); } else if (showModeParameter.isCount()) { entity.setDisplayName(new HashSet<>(records).size() + ""); - } else if (showModeParameter.isTicksSinceStart()) { - entity.setDisplayName((80 - fuseTicks) + tntPosition.getRecord().getOffset() + ""); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java index b091d6ef..9081973f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java @@ -47,8 +47,8 @@ public class Record { tnt.forEach(tntRecord -> tntRecord.getPositions().forEach(traceShowMode::show)); } - public TNTRecord spawn(long offset) { - TNTRecord record = new TNTRecord(this, offset, region); + public TNTRecord spawn() { + TNTRecord record = new TNTRecord(this, region); tnt.add(record); return record; } @@ -80,9 +80,6 @@ public class Record { private Record record; - @Getter - private final long offset; - @Getter private final Region region; @@ -100,9 +97,8 @@ public class Record { @Getter private boolean hasMicroMotion = false; - public TNTRecord(Record record, long offset, Region region) { + public TNTRecord(Record record, Region region) { this.record = record; - this.offset = offset; this.region = region; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameter.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameter.java index 3b83151b..b1d996d1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameter.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameter.java @@ -28,11 +28,10 @@ public class ShowModeParameter { private boolean interpolateXZ = false; private boolean sourceOnly = false; private boolean explodeOnly = false; - private boolean ticks = false; + private boolean fuse = false; private boolean count = false; private boolean buildDestroyOnly = false; private boolean testblockDestroyOnly = false; - private boolean ticksSinceStart = false; private boolean microMotion = false; public void enableWater() { @@ -55,8 +54,8 @@ public class ShowModeParameter { this.explodeOnly = true; } - public void enableTicks() { - this.ticks = true; + public void enableFuse() { + this.fuse = true; } public void enableCount() { @@ -71,10 +70,6 @@ public class ShowModeParameter { this.testblockDestroyOnly = true; } - public void enableTicksSinceStart() { - this.ticksSinceStart = true; - } - public void enableMicroMotion() { this.microMotion = true; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameterType.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameterType.java index 66a3818f..3b8628a2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameterType.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/ShowModeParameterType.java @@ -36,13 +36,12 @@ public enum ShowModeParameterType { showModeParameter.enableInterpolateY(); showModeParameter.enableInterpolateXZ(); }, Arrays.asList("-advanced", "-a"), "INTERPOLATE_Y", "INTERPOLATE_XZ"), - SOURCE(ShowModeParameter::enableSourceOnly, Arrays.asList("-source", "-sourceonly", "-ignite"), "TICKS", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"), - EXPLODE(ShowModeParameter::enableExplodeOnly, Arrays.asList("-explode", "-explodeonly"), "TICKS", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"), - TICKS(ShowModeParameter::enableTicks, Arrays.asList("-ticks", "-t"), "EXPLODE", "SOURCE", "COUNT", "TICKS_SINCE_START"), - COUNT(ShowModeParameter::enableCount, Arrays.asList("-count", "-c"), "TICKS", "TICKS_SINCE_START"), + SOURCE(ShowModeParameter::enableSourceOnly, Arrays.asList("-source", "-sourceonly", "-ignite"), "FUSE", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"), + EXPLODE(ShowModeParameter::enableExplodeOnly, Arrays.asList("-explode", "-explodeonly"), "FUSE", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"), + FUSE(ShowModeParameter::enableFuse, Arrays.asList("-fuse", "-f"), "EXPLODE", "SOURCE", "COUNT"), + COUNT(ShowModeParameter::enableCount, Arrays.asList("-count", "-c"), "FUSE"), BUILD_DESTROY_ONLY(ShowModeParameter::enableBuildDestroyOnly, Arrays.asList("-builddestroy", "-builddestoryonly"), "WATER", "TESTBLOCK_DESTROY_ONLY"), TESTBLOCK_DESTROY_ONLY(ShowModeParameter::enableTestblockDestroyOnly, Arrays.asList("-testblockdestroy", "-testblockdestroyonly"), "WATER", "BUILD_DESTROY_ONLY"), - TICKS_SINCE_START(ShowModeParameter::enableTicksSinceStart, Arrays.asList("-tickssincestart", "-tss"), "TICKS", "COUNT"), MICROMOTION(ShowModeParameter::enableMicroMotion, Arrays.asList("-micromotion", "-micro", "-m")), ;