Batch#apply(Instance, Callback). This will apply the batch in the "default" position (dependent on the batch). See the individual
applyvariants on each batch for alternative application options.
BatchOptionprovides some configuration related to how the batch will behave. The options are:
applymethods 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.
applylocation is chunk (0, 0), however it may be applied to any chunk.
Batch#set*, thus coordinates are given in world coordinates.
AbsoluteBlockBatchdoes not have any batch-specific
applylocation is the instance origin (0, 0, 0), however it may be applied to any position
RelativeBlockbatchhas a significant performance difference from the other two options, and they should be used over
RelativeBlockBatchif possible. It is possible to convert a relative batch to an
AbsoluteBlockBatchusing the following methods. This should be used (and cached) if the batch will be applied several times to the same location.
applywill 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,
applyon the inverse will block the current thread until it is ready.
An inverse will always be ready to apply in the