Class BTCCoreVisualAPI

java.lang.Object
com.infernalsuite.asp.api.BTCCoreVisualAPI

public abstract class BTCCoreVisualAPI extends Object
Advanced Asynchronous Visual Hooks for BTCCore. Highly optimized APIs allowing extensions (BetterModel, AdvancedMenu) to bypass the Main Thread when instantiating fake entities and virtual inventories.
  • Constructor Details

    • BTCCoreVisualAPI

      public BTCCoreVisualAPI()
  • Method Details

    • getInstance

      public static BTCCoreVisualAPI getInstance()
    • setInstance

      public static void setInstance(BTCCoreVisualAPI impl)
    • sendAsyncVirtualInventory

      public abstract void sendAsyncVirtualInventory(org.bukkit.entity.Player target, int containerId, int stateId, org.bukkit.inventory.ItemStack[] contents)
      Forges and dispatches a full inventory display to the client asynchronously. Bypasses the NMS container loop checks and runs entirely off the Main Thread.
      Parameters:
      target - The viewing player.
      containerId - The current network container ID.
      stateId - The window state ID (helps sync clicks, pass 0 if forcing UI).
      contents - The array of items mapped to the inventory.
    • spawnAsyncDisplayEntity

      public abstract void spawnAsyncDisplayEntity(org.bukkit.entity.Player target, int entityId, UUID uniqueId, org.bukkit.Location location, String displayType, org.bukkit.util.Transformation scale)
      Forges and dispatches a fake DisplayEntity purely as network packets. Since it is entirely decoupled from the chunk or level logic, it costs 0 MSPT.
      Parameters:
      target - The viewing player.
      entityId - The arbitrary virtual Entity ID to use.
      uniqueId - The arbitrary virtual UUID.
      location - The exact coordinates and rotation.
      displayType - Usually "item", "block", or "text".
      scale - The geometric transform.
    • destroyAsyncDisplayEntity

      public abstract void destroyAsyncDisplayEntity(org.bukkit.entity.Player target, int... entityIds)
      Sends a raw packet manually to destroy the visual entity gracefully.
      Parameters:
      target - The viewing player.
      entityIds - The IDs representing the fake entities.