QOL #203
@ -93,13 +93,14 @@ public abstract class AutoTraceRecorder implements TraceRecorder {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void explode(TNTPrimed tntPrimed, boolean inBuildRegion) {
|
||||
public final void explode(TNTPrimed tntPrimed, boolean inBuildRegion, boolean inTestblockRegion) {
|
||||
if (!recording && shouldStartRecording(StartType.EXPLODE)) {
|
||||
startRecording();
|
||||
}
|
||||
if (recording) {
|
||||
Record.TNTRecord tntRecord = getRecord(tntPrimed);
|
||||
if (inBuildRegion) tntRecord.setInBuildArea(true);
|
||||
if (inTestblockRegion) tntRecord.setInTestblockArea(true);
|
||||
tntRecord.explode(tntPrimed);
|
||||
}
|
||||
lastExplosion = 0;
|
||||
|
@ -65,7 +65,7 @@ public class Recorder implements Listener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(TNTPrimed tntPrimed, boolean b) {
|
||||
public void explode(TNTPrimed tntPrimed, boolean inBuildArea, boolean inTestblockRegion) {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -155,7 +155,8 @@ public class Recorder implements Listener {
|
||||
TraceRecorder traceRecorder = get((TNTPrimed) entity);
|
||||
Region region = tntTraceRecorderMap.get((TNTPrimed) entity);
|
||||
boolean inBuildRegion = event.blockList().stream().anyMatch(block -> region.inRegion(block.getLocation(), RegionType.BUILD, RegionExtensionType.EXTENSION));
|
||||
traceRecorder.explode((TNTPrimed) entity, inBuildRegion);
|
||||
boolean inTestblockRegion = event.blockList().stream().anyMatch(block -> region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION));
|
||||
traceRecorder.explode((TNTPrimed) entity, inBuildRegion, inTestblockRegion);
|
||||
tntTraceRecorderMap.remove(entity);
|
||||
tick();
|
||||
}
|
||||
|
@ -65,9 +65,10 @@ public class SimpleTraceRecorder implements TraceRecorder, ActiveTracer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(TNTPrimed tntPrimed, boolean inBuildRegion) {
|
||||
public void explode(TNTPrimed tntPrimed, boolean inBuildRegion, boolean inTestblockRegion) {
|
||||
Record.TNTRecord tntRecord = getRecord(tntPrimed);
|
||||
if (inBuildRegion) tntRecord.setInBuildArea(true);
|
||||
if (inTestblockRegion) tntRecord.setInTestblockArea(true);
|
||||
tntRecord.explode(tntPrimed);
|
||||
recordMap.remove(tntPrimed);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public interface TraceRecorder {
|
||||
}
|
||||
void spawn(TNTPrimed tntPrimed);
|
||||
void tick(TNTPrimed tntPrimed);
|
||||
void explode(TNTPrimed tntPrimed, boolean inBuildRegion);
|
||||
void explode(TNTPrimed tntPrimed, boolean inBuildRegion, boolean inTestblockRegion);
|
||||
default void tick() {
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,10 @@ public class EntityShowMode implements ShowMode<TNTPosition> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (showModeParameter.isTestblockDestroyOnly() && !position.getRecord().isInTestblockArea()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (showModeParameter.isMicroMotion() && !position.getRecord().isHasMicroMotion()) {
|
||||
return;
|
||||
}
|
||||
|
@ -93,6 +93,10 @@ public class Record {
|
||||
@Setter
|
||||
private boolean inBuildArea = false;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean inTestblockArea = false;
|
||||
|
||||
@Getter
|
||||
private boolean hasMicroMotion = false;
|
||||
|
||||
|
@ -31,6 +31,7 @@ public class ShowModeParameter {
|
||||
private boolean ticks = false;
|
||||
private boolean count = false;
|
||||
private boolean buildDestroyOnly = false;
|
||||
private boolean testblockDestroyOnly = false;
|
||||
private boolean ticksSinceStart = false;
|
||||
private boolean microMotion = false;
|
||||
|
||||
@ -66,6 +67,10 @@ public class ShowModeParameter {
|
||||
this.buildDestroyOnly = true;
|
||||
}
|
||||
|
||||
public void enableTestblockDestroyOnly() {
|
||||
this.testblockDestroyOnly = true;
|
||||
}
|
||||
|
||||
public void enableTicksSinceStart() {
|
||||
this.ticksSinceStart = true;
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ public enum ShowModeParameterType {
|
||||
TICKS(ShowModeParameter::enableTicks, Arrays.asList("-ticks", "-t"), "EXPLODE", "SOURCE", "COUNT", "TICKS_SINCE_START"),
|
||||
COUNT(ShowModeParameter::enableCount, Arrays.asList("-count", "-c"), "TICKS", "TICKS_SINCE_START"),
|
||||
BUILD_DESTROY_ONLY(ShowModeParameter::enableBuildDestroyOnly, Arrays.asList("-builddestroy", "-builddestoryonly"), "WATER"),
|
||||
TESTBLOCK_DESTROY_ONLY(ShowModeParameter::enableTestblockDestroyOnly, Arrays.asList("-testblockdestroy", "-testblockdestroyonly"), "WATER"),
|
||||
TICKS_SINCE_START(ShowModeParameter::enableTicksSinceStart, Arrays.asList("-tickssincestart", "-tss"), "TICKS", "COUNT"),
|
||||
MICROMOTION(ShowModeParameter::enableMicroMotion, Arrays.asList("-micromotion", "-micro", "-m")),
|
||||
;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren