mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
Only synchronise tree generation at the very lowest level (#1788)
* Only synchronise tree generation at the very lowest level - Fixes #1681 * Perform the generate inside try-finally and actually use the resultant copied map to place blocks to the editsession * Check result of generateTree and return null if failed
This commit is contained in:
@ -77,7 +77,7 @@ public class FaweAPI {
|
||||
* </p>
|
||||
*
|
||||
* @param world The name of the world
|
||||
* @param autoQueue If it should start dispatching before you enqueue it.
|
||||
* @param autoQueue If it should start dispatching before you close/flush it.
|
||||
* @return the queue extent
|
||||
*/
|
||||
public static IQueueExtent<IQueueChunk> createQueue(World world, boolean autoQueue) {
|
||||
|
@ -273,13 +273,11 @@ public class WorldWrapper extends AbstractWorld {
|
||||
@Override
|
||||
public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 position) throws
|
||||
MaxChangedBlocksException {
|
||||
return TaskManager.taskManager().sync(() -> {
|
||||
try {
|
||||
return parent.generateTree(type, editSession, position);
|
||||
} catch (MaxChangedBlocksException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
try {
|
||||
return parent.generateTree(type, editSession, position);
|
||||
} catch (MaxChangedBlocksException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user