Class FaweStreamChangeSet
java.lang.Object
com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
com.fastasyncworldedit.core.history.changeset.FaweStreamChangeSet
- All Implemented Interfaces:
IBatchProcessor
,ChangeSet
,Closeable
,AutoCloseable
- Direct Known Subclasses:
DiskStorageHistory
,MemoryOptimizedHistory
FAWE stream ChangeSet offering support for extended-height worlds
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
static final int
protected FaweStreamChangeSet.FaweStreamIdDelegate
Fields inherited from class com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
closed, waitingAsync, waitingCombined
-
Constructor Summary
ConstructorDescriptionFaweStreamChangeSet
(World world) FaweStreamChangeSet
(World world, int compression, boolean storeRedo, boolean smallLoc) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int x, int y, int z, int combinedFrom, int combinedTo) void
addBiomeChange
(int bx, int by, int bz, BiomeType from, BiomeType to) void
void
void
addTileCreate
(CompoundTag tag) void
addTileRemove
(CompoundTag tag) Get a backward directed iterator that can be used for undo.Get a forward directed iterator that can be used for redo.abstract FaweInputStream
getBiomeIterator
(boolean dir) abstract FaweOutputStream
abstract FaweInputStream
getBlockIterator
(boolean dir) abstract FaweOutputStream
getBlockOS
(int x, int y, int z) abstract int
abstract NBTInputStream
abstract NBTOutputStream
getEntityIterator
(NBTInputStream is, boolean create) abstract NBTInputStream
abstract NBTOutputStream
getFullBlockIterator
(BlockBag blockBag, int inventory, boolean dir) getIterator
(boolean dir) getIterator
(BlockBag blockBag, int mode, boolean redo) int
int
abstract long
long
abstract NBTInputStream
abstract NBTOutputStream
getTileIterator
(NBTInputStream is, boolean create) abstract NBTInputStream
abstract NBTOutputStream
boolean
isEmpty()
Get if the changeset is empty (i.e.void
void
setOrigin
(int x, int z) protected void
setupStreamDelegates
(int mode) int
size()
Get the number of stored changes.Get a summary of this changeset.protected SimpleChangeSetSummary
void
writeHeader
(OutputStream os, int x, int y, int z) Methods inherited from class com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
add, add, add, add, add, add, add, addWriteTask, addWriteTask, close, closeAsync, construct, flush, getScope, getWorld, postProcess, postProcessSet, processSet, toEditSession, toEditSession
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.history.changeset.ChangeSet
delete, isRecordingChanges, setRecordChanges
Methods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
join, joinPost, processGet, remove, trimNBT, trimY
-
Field Details
-
HEADER_SIZE
public static final int HEADER_SIZE- See Also:
-
idDel
-
posDel
-
blockSize
protected int blockSize
-
-
Constructor Details
-
FaweStreamChangeSet
-
FaweStreamChangeSet
-
-
Method Details
-
setupStreamDelegates
protected void setupStreamDelegates(int mode) -
writeHeader
- Throws:
IOException
-
readHeader
- Throws:
IOException
-
getCompressedOS
- Throws:
IOException
-
isEmpty
public boolean isEmpty()Description copied from interface:ChangeSet
Get if the changeset is empty (i.e. size == 0)- Specified by:
isEmpty
in interfaceChangeSet
- Overrides:
isEmpty
in classAbstractChangeSet
- Returns:
- is empty
-
size
public int size()Description copied from interface:ChangeSet
Get the number of stored changes.- Returns:
- the change count
-
getCompressedSize
public abstract int getCompressedSize() -
getSizeInMemory
public abstract long getSizeInMemory() -
getSizeOnDisk
public long getSizeOnDisk() -
getBlockOS
- Throws:
IOException
-
getBiomeOS
- Throws:
IOException
-
getEntityCreateOS
- Throws:
IOException
-
getEntityRemoveOS
- Throws:
IOException
-
getTileCreateOS
- Throws:
IOException
-
getTileRemoveOS
- Throws:
IOException
-
getBlockIS
- Throws:
IOException
-
getBiomeIS
- Throws:
IOException
-
getEntityCreateIS
- Throws:
IOException
-
getEntityRemoveIS
- Throws:
IOException
-
getTileCreateIS
- Throws:
IOException
-
getTileRemoveIS
- Throws:
IOException
-
setOrigin
public void setOrigin(int x, int z) -
getOriginX
public int getOriginX() -
getOriginZ
public int getOriginZ() -
add
public void add(int x, int y, int z, int combinedFrom, int combinedTo) - Specified by:
add
in classAbstractChangeSet
-
addBiomeChange
- Specified by:
addBiomeChange
in classAbstractChangeSet
-
addTileCreate
- Specified by:
addTileCreate
in classAbstractChangeSet
-
addTileRemove
- Specified by:
addTileRemove
in classAbstractChangeSet
-
addEntityRemove
- Specified by:
addEntityRemove
in classAbstractChangeSet
-
addEntityCreate
- Specified by:
addEntityCreate
in classAbstractChangeSet
-
getBlockIterator
- Throws:
IOException
-
getBiomeIterator
- Throws:
IOException
-
getIterator
- Overrides:
getIterator
in classAbstractChangeSet
-
getFullBlockIterator
public Iterator<MutableFullBlockChange> getFullBlockIterator(BlockBag blockBag, int inventory, boolean dir) throws IOException - Throws:
IOException
-
getEntityIterator
-
getTileIterator
-
getIterator
- Specified by:
getIterator
in classAbstractChangeSet
-
backwardIterator
Description copied from interface:ChangeSet
Get a backward directed iterator that can be used for undo.The iterator may return the changes out of order, as long as the final result after all changes have been applied is correct.
- Specified by:
backwardIterator
in interfaceChangeSet
- Overrides:
backwardIterator
in classAbstractChangeSet
- Returns:
- a undo directed iterator
-
forwardIterator
Description copied from interface:ChangeSet
Get a forward directed iterator that can be used for redo.The iterator may return the changes out of order, as long as the final result after all changes have been applied is correct.
- Specified by:
forwardIterator
in interfaceChangeSet
- Overrides:
forwardIterator
in classAbstractChangeSet
- Returns:
- a forward directed iterator
-
summarizeShallow
-
summarize
Description copied from interface:ChangeSet
Get a summary of this changeset.
-