mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 12:33:54 +00:00
Large memory use reduction when PostProcessing history
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
package com.boydti.fawe.beta;
|
||||
|
||||
public interface IChunkGetCopy {
|
||||
|
||||
char[] getNewSetArr(int layer);
|
||||
}
|
@ -5,7 +5,6 @@ import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.beta.IBatchProcessor;
|
||||
import com.boydti.fawe.beta.IChunk;
|
||||
import com.boydti.fawe.beta.IChunkGet;
|
||||
import com.boydti.fawe.beta.IChunkGetCopy;
|
||||
import com.boydti.fawe.beta.IChunkSet;
|
||||
import com.boydti.fawe.object.HistoryExtent;
|
||||
import com.boydti.fawe.util.EditSessionBuilder;
|
||||
@ -157,7 +156,6 @@ public abstract class AbstractChangeSet implements ChangeSet, IBatchProcessor {
|
||||
addEntityCreate(tag);
|
||||
}
|
||||
}
|
||||
boolean updateSet = get instanceof IChunkGetCopy;
|
||||
for (int layer = 0; layer < 16; layer++) {
|
||||
if (!set.hasSection(layer)) {
|
||||
continue;
|
||||
@ -168,11 +166,7 @@ public abstract class AbstractChangeSet implements ChangeSet, IBatchProcessor {
|
||||
blocksGet = FaweCache.IMP.EMPTY_CHAR_4096;
|
||||
}
|
||||
char[] blocksSet = set.load(layer);
|
||||
char[] newBlocksSet = null;
|
||||
if (updateSet) {
|
||||
newBlocksSet = ((IChunkGetCopy) get).getNewSetArr(layer);
|
||||
}
|
||||
;
|
||||
|
||||
int by = layer << 4;
|
||||
for (int y = 0, index = 0; y < 16; y++) {
|
||||
int yy = y + by;
|
||||
@ -189,9 +183,6 @@ public abstract class AbstractChangeSet implements ChangeSet, IBatchProcessor {
|
||||
if (combinedTo != 0) {
|
||||
add(xx, yy, zz, combinedFrom, combinedTo);
|
||||
}
|
||||
if (updateSet) {
|
||||
blocksSet[index] = newBlocksSet[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user