Hotfixed failsafe #243
@ -129,10 +129,18 @@ public class TraceRecorder implements Listener {
|
||||
private void record() {
|
||||
for (Region region : activeTraces.keySet()) {
|
||||
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());
|
||||
if (record == null) continue;
|
||||
wrappedTrace.addRecord(record);
|
||||
if (record == null) {
|
||||
iter.remove();
|
||||
tntSpawnRegion.remove(tnt);
|
||||
historyMap.remove(tnt);
|
||||
tntSpawnRegion.remove(tnt);
|
||||
} else {
|
||||
wrappedTrace.addRecord(record);
|
||||
}
|
||||
}
|
||||
wrappedTrace.commitRecorded();
|
||||
}
|
||||
@ -150,12 +158,6 @@ public class TraceRecorder implements Listener {
|
||||
List<TNTPoint> history = historyMap.getOrDefault(tntPrimed, new ArrayList<>());
|
||||
// Failsave for tnt entering unloaded chunks
|
||||
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;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren