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