Dieser Commit ist enthalten in:
Ursprung
929400b4d9
Commit
ddb701cbd6
@ -129,11 +129,19 @@ public class TraceRecorder implements Listener {
|
|||||||
private void record() {
|
private void record() {
|
||||||
for (Region region : activeTraces.keySet()) {
|
for (Region region : activeTraces.keySet()) {
|
||||||
TraceRecordingWrapper wrappedTrace = activeTraces.get(region);
|
TraceRecordingWrapper wrappedTrace = activeTraces.get(region);
|
||||||
for (TNTPrimed tnt : trackedTNT.getOrDefault(region, Collections.emptyList())) {
|
Iterator<TNTPrimed> iter = trackedTNT.getOrDefault(region, Collections.emptyList()).iterator();
|
||||||
|
while (iter.hasNext()) {
|
||||||
|
TNTPrimed tnt = iter.next();
|
||||||
TNTPoint record = record(tnt, wrappedTrace, Collections.emptyList());
|
TNTPoint record = record(tnt, wrappedTrace, Collections.emptyList());
|
||||||
if (record == null) continue;
|
if (record == null) {
|
||||||
|
iter.remove();
|
||||||
|
tntSpawnRegion.remove(tnt);
|
||||||
|
historyMap.remove(tnt);
|
||||||
|
tntSpawnRegion.remove(tnt);
|
||||||
|
} else {
|
||||||
wrappedTrace.addRecord(record);
|
wrappedTrace.addRecord(record);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
wrappedTrace.commitRecorded();
|
wrappedTrace.commitRecorded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,12 +158,6 @@ public class TraceRecorder implements Listener {
|
|||||||
List<TNTPoint> history = historyMap.getOrDefault(tntPrimed, new ArrayList<>());
|
List<TNTPoint> history = historyMap.getOrDefault(tntPrimed, new ArrayList<>());
|
||||||
// Failsave for tnt entering unloaded chunks
|
// Failsave for tnt entering unloaded chunks
|
||||||
if (tntPrimed.isDead() || history.size() > 0 && history.get(history.size() - 1).getFuse() == tntPrimed.getFuseTicks()) {
|
if (tntPrimed.isDead() || history.size() > 0 && history.get(history.size() - 1).getFuse() == tntPrimed.getFuseTicks()) {
|
||||||
Region region = tntSpawnRegion.get(tntPrimed);
|
|
||||||
if (region == null) return null;
|
|
||||||
trackedTNT.get(region).remove(tntPrimed);
|
|
||||||
tntSpawnRegion.remove(tntPrimed);
|
|
||||||
historyMap.remove(tntPrimed);
|
|
||||||
tntSpawnRegion.remove(tntPrimed);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren