Class Fawe

java.lang.Object
com.fastasyncworldedit.core.Fawe

public class Fawe extends Object
[ WorldEdit action] | \|/ [ 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 Details

    • imp

      @Deprecated(forRemoval=true, since="2.0.0") public static <T extends IFawe> T imp()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the implementation specific class.
    • platform

      public static <T extends IFawe> T platform()
      Get the implementation specific class.
      Since:
      2.0.0
    • get

      @Deprecated(forRemoval=true, since="2.0.0") public static Fawe get()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the implementation independent class.
    • instance

      public static Fawe 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.
      Throws:
      InstanceAlreadyExistsException
      IllegalArgumentException
    • 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 the FaweException.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 length FaweException.Type.values().length
      e - FaweException to handle
      logger - Logger of the calling class
    • onDisable

      public void onDisable()
    • getQueueHandler

      public QueueHandler getQueueHandler()
    • getCachedTextureUtil

      public TextureUtil getCachedTextureUtil(boolean randomize, int min, int max)
    • getTextureUtil

      public TextureUtil getTextureUtil()
    • getTimer

      public FaweTimer getTimer()
      Gets the TPS monitor.
    • getVersion

      @Nullable public FaweVersion getVersion()
      The FAWE version.
      Returns:
      FaweVersion
    • getTPS

      public double getTPS()
    • setupConfigs

      public void setupConfigs()
    • getWorldEdit

      public WorldEdit getWorldEdit()
    • getMainThread

      public Thread getMainThread()
      Get the main thread.
    • setMainThread

      public Thread setMainThread()
      Sets the main thread to the current thread.
    • getClipboardExecutor

      public KeyQueuedExecutorService<UUID> getClipboardExecutor()
      Gets 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