Class Fawe
[ EditSession ] - The change is processed (area restrictions, change limit, block type)
[ Block change ] - A block change from some location
[ Set Queue ] - The SetQueue manages the implementation specific queue
[ Fawe Queue] - A queue of chunks - check if the queue has the chunk for a change
[ Fawe Chunk Implementation ] - Otherwise create a new FaweChunk object which is a wrapper around the Chunk object
[ Execution ] - When done, the queue then sets the blocks for the chunk, performs lighting updates and sends the chunk packet to the clients
Why it's faster:
The chunk is modified directly rather than through the API
- Removes some overhead, and means some processing can be done async
Lighting updates are performed on the chunk level rather than for every block
- e.g., A blob of stone: only the visible blocks need to have the lighting calculated
Block changes are sent with a chunk packet
- A chunk packet is generally quicker to create and smaller for large world edits
No physics updates
- Physics updates are slow, and are usually performed on each block
Block data shortcuts
- Some known blocks don't need to have the data set or accessed (e.g., air is never going to have data)
Remove redundant extents
- Up to 11 layers of extents can be removed
History bypassing
- FastMode bypasses history and means blocks in the world don't need to be checked and recorded
-
Method Summary
Modifier and TypeMethodDescriptionstatic Fawe
get()
Deprecated, for removal: This API element is subject to removal in a future version.getCachedTextureUtil
(boolean randomize, int min, int max) Deprecated, for removal: This API element is subject to removal in a future version.Use any ofsubmitUUIDKeyQueuedTask(UUID, Runnable)
,submitUUIDKeyQueuedTask(UUID, Runnable, Object)
,submitUUIDKeyQueuedTask(UUID, Callable)
to ensure if a thread is already a UUID-queued thread, the task is immediately runGet the main thread.getTimer()
Gets the TPS monitor.double
getTPS()
The FAWE version.static void
handleFaweException
(boolean[] faweExceptionReasonsUsed, FaweException e, Logger logger) Non-api.static <T extends IFawe>
Timp()
Deprecated, for removal: This API element is subject to removal in a future version.useplatform()
static Fawe
instance()
Get the implementation independent class.static boolean
void
static <T extends IFawe>
Tplatform()
Get the implementation specific class.static void
This method is not for public use.Sets the main thread to the current thread.void
static void
Future
<?> submitUUIDKeyQueuedTask
(UUID uuid, Runnable runnable) Submit a task to the UUID key-queued executor<T> Future
<T> submitUUIDKeyQueuedTask
(UUID uuid, Runnable runnable, T result) Submit a task to the UUID key-queued executor<T> Future
<T> submitUUIDKeyQueuedTask
(UUID uuid, Callable<T> callable) Submit a task to the UUID key-queued executor
-
Method Details
-
imp
Deprecated, for removal: This API element is subject to removal in a future version.useplatform()
Get the implementation specific class. -
platform
Get the implementation specific class.- Since:
- 2.0.0
-
get
Deprecated, for removal: This API element is subject to removal in a future version.useinstance()
Get the implementation independent class. -
instance
Get the implementation independent class. -
set
public static void set(IFawe implementation) throws InstanceAlreadyExistsException, IllegalArgumentException This method is not for public use. If you have to ask what it does then you shouldn't be using it. -
setupInjector
public static void setupInjector() -
isMainThread
public static boolean isMainThread() -
handleFaweException
public static void handleFaweException(boolean[] faweExceptionReasonsUsed, FaweException e, Logger logger) Non-api. Handles an input FAWE exception if not already handled, given the input boolean array. Looks at theFaweException.Type
and decides what to do (rethrows if we want to attempt to show the error to the player, outputs to console where necessary).- Parameters:
faweExceptionReasonsUsed
- boolean array that should be cached where this method is called from of lengthFaweException.Type.values().length
e
-FaweException
to handlelogger
-Logger
of the calling class
-
onDisable
public void onDisable() -
getQueueHandler
-
getCachedTextureUtil
-
getTextureUtil
-
getTimer
Gets the TPS monitor. -
getVersion
The FAWE version.- Returns:
- FaweVersion
-
getTPS
public double getTPS() -
setupConfigs
public void setupConfigs() -
getWorldEdit
-
getMainThread
Get the main thread. -
setMainThread
Sets the main thread to the current thread. -
getClipboardExecutor
@Deprecated(forRemoval=true, since="2.12.1") public KeyQueuedExecutorService<UUID> getClipboardExecutor()Deprecated, for removal: This API element is subject to removal in a future version.Use any ofsubmitUUIDKeyQueuedTask(UUID, Runnable)
,submitUUIDKeyQueuedTask(UUID, Runnable, Object)
,submitUUIDKeyQueuedTask(UUID, Callable)
to ensure if a thread is already a UUID-queued thread, the task is immediately runGets the executor used for clipboard IO if clipboard on disk is enabled or null- Returns:
- Executor used for clipboard IO if clipboard on disk is enabled or null
- Since:
- 2.6.2
-
submitUUIDKeyQueuedTask
Submit a task to the UUID key-queued executor- Returns:
- Future representing the tank
- Since:
- 2.12.1
-
submitUUIDKeyQueuedTask
Submit a task to the UUID key-queued executor- Returns:
- Future representing the tank
- Since:
- 2.12.1
-
submitUUIDKeyQueuedTask
Submit a task to the UUID key-queued executor- Returns:
- Future representing the tank
- Since:
- 2.12.1
-
instance()