ChunkBatch
, AbsoluteBlockBatch
, RelativeBlockBatch
.Batch#apply(Instance, Callback)
. This will apply the batch in the "default" position (dependent on the batch). See the individual apply
variants on each batch for alternative application options.BatchOption
provides some configuration related to how the batch will behave. The options are:apply
methods will return an inverse of the batch. See Inverses below.Each batch fits a different use case, however it is wise to use the most specific batch possible for the use case. For example, setting a set of blocks all inside one chunk can be done with all 3 batches. It should, however, be done with a ChunkBatch because it is the most efficient of the 3.
apply
location is chunk (0, 0), however it may be applied to any chunk.Batch#set*
, thus coordinates are given in world coordinates.AbsoluteBlockBatch
does not have any batch-specific apply
options.apply
.apply
location is the instance origin (0, 0, 0), however it may be applied to any positionRelativeBlockbatch
has a significant performance difference from the other two options, and they should be used over RelativeBlockBatch
if possible. It is possible to convert a relative batch to an AbsoluteBlockBatch
using the following methods. This should be used (and cached) if the batch will be applied several times to the same location.BatchOption
s, apply
will return a new back containing the opposite of every action performed during application.apply
, it will not necessarily be ready for application. If the Unsafe Apply option is set, no checks will be made. Otherwise, apply
on the inverse will block the current thread until it is ready.An inverse will always be ready to apply in theapply
callback.