Class AbstractDelegateChangeSet
java.lang.Object
com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
com.fastasyncworldedit.core.history.changeset.AbstractDelegateChangeSet
- All Implemented Interfaces:
IBatchProcessor
,ChangeSet
,Closeable
,AutoCloseable
- Direct Known Subclasses:
BlockBagChangeSet
-
Field Summary
Fields inherited from class com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
closed, waitingAsync, waitingCombined
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int x, int y, int z, int combinedFrom, int combinedTo) void
void
void
add
(BlockChange change) void
Add the given change to the history.void
add
(EntityCreate change) void
add
(EntityRemove change) void
add
(BlockVector3 loc, BaseBlock from, BaseBlock to) void
addBiomeChange
(int x, int y, int z, BiomeType from, BiomeType to) void
void
void
addTileCreate
(CompoundTag tag) void
addTileRemove
(CompoundTag tag) Future<?>
addWriteTask
(Runnable writeTask) Future<?>
addWriteTask
(Runnable writeTask, boolean completeNow) Get a backward directed iterator that can be used for undo.void
close()
Close the changeset.void
void
delete()
Delete the changeset (e.g.void
flush()
Get a forward directed iterator that can be used for redo.getIterator
(boolean redo) getIterator
(BlockBag blockBag, int mode, boolean redo) final AbstractChangeSet
getWorld()
boolean
isEmpty()
Get if the changeset is empty (i.e.boolean
Whether or not the ChangeSet is recording changes.void
setRecordChanges
(boolean recordChanges) Tell the change set whether to record changes or not.int
size()
Get the number of stored changes.Get a summary of this changeset.toEditSession
(Actor actor) toEditSession
(Actor actor, Region[] regions) Methods inherited from class com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
construct, getScope, postProcess, postProcessSet, processSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
join, joinPost, processGet, remove, trimNBT, trimY
-
Field Details
-
parent
-
-
Constructor Details
-
AbstractDelegateChangeSet
-
-
Method Details
-
getParent
-
getWorld
- Overrides:
getWorld
in classAbstractChangeSet
-
closeAsync
public void closeAsync()- Overrides:
closeAsync
in classAbstractChangeSet
-
flush
public void flush()- Specified by:
flush
in interfaceIBatchProcessor
- Overrides:
flush
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
-
addBiomeChange
- Specified by:
addBiomeChange
in classAbstractChangeSet
-
getIterator
- Overrides:
getIterator
in classAbstractChangeSet
-
getIterator
- Specified by:
getIterator
in classAbstractChangeSet
-
toEditSession
- Overrides:
toEditSession
in classAbstractChangeSet
-
toEditSession
- Overrides:
toEditSession
in classAbstractChangeSet
-
add
public void add(int x, int y, int z, int combinedFrom, int combinedTo) - Specified by:
add
in classAbstractChangeSet
-
add
- Overrides:
add
in classAbstractChangeSet
-
add
- Overrides:
add
in classAbstractChangeSet
-
add
Description copied from interface:ChangeSet
Add the given change to the history.- Specified by:
add
in interfaceChangeSet
- Overrides:
add
in classAbstractChangeSet
- Parameters:
change
- the change
-
add
- Overrides:
add
in classAbstractChangeSet
-
add
- Overrides:
add
in classAbstractChangeSet
-
add
- Overrides:
add
in classAbstractChangeSet
-
add
- Overrides:
add
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
-
close
Description copied from interface:ChangeSet
Close the changeset.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChangeSet
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAbstractChangeSet
- 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
-
addWriteTask
- Overrides:
addWriteTask
in classAbstractChangeSet
-
addWriteTask
- Overrides:
addWriteTask
in classAbstractChangeSet
-
isRecordingChanges
public boolean isRecordingChanges()Description copied from interface:ChangeSet
Whether or not the ChangeSet is recording changes.- Returns:
- whether or not the ChangeSet is set to record changes
-
setRecordChanges
public void setRecordChanges(boolean recordChanges) Description copied from interface:ChangeSet
Tell the change set whether to record changes or not.- Parameters:
recordChanges
- whether to record changes or not
-
size
public int size()Description copied from interface:ChangeSet
Get the number of stored changes.- Returns:
- the change count
-
delete
public void delete()Description copied from interface:ChangeSet
Delete the changeset (e.g. files on disk, or in a database) -
summarize
Description copied from interface:ChangeSet
Get a summary of this changeset.
-