-
Notifications
You must be signed in to change notification settings - Fork 225
FaweQueue
The FaweQueue is the most basic class for modifying the world, and can be fast if used properly. I recommend using Operations/EditSession instead since they simplify a lot of abstract tasks and will usually offer better performance than a naive approach with the FaweQueue. There's also the AsyncWorld if you are more comfortable with the Bukkit API.
The FaweQueue is a basic queue for modifying the world from async threads
- Use it to modify whole chunks or individual blocks efficiently
- See EditSession or AsyncWorld which will be easier to use but slower
- If you need more control, the queue can usually be casted to NMSMappedFaweQueue.
// Auto queuing will mean blocks start to place before it is flushed
FaweQueue queue = FaweAPI.createQueue(worldName, autoQueue);
queue.setBlock(0, 0, 0, id, data);
queue.setBiome(0, 0, biome);
// Set entire chunks
FaweChunk<?> chunk = queue.getFaweChunk(5, 5);
chunk.fill(id, data);
chunk.addToQueue();
// Repeat the same for position
chunk = chunk.copy(true);
chunk.setLoc(queue, 5, 6);
chunk.addToQueue();
Further methods are available for supported platforms. You can cast the FaweQueue
to an NMSMappedFaweQueue
to access these.
More info:
https://github.com/boy0001/FastAsyncWorldedit/wiki/Light-API
This wiki is outdated, move to https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/
This Wiki is for Legacy Versions (1.8 - 1.12.2). Check here for 1.13+ versions: https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/