Class RenderingCache

java.lang.Object
com.ldtteam.structurize.storage.rendering.RenderingCache

public class RenderingCache extends Object
Rendering cache for boxes, blueprints, etc. TODO:
  • Field Details

  • Constructor Details

    • RenderingCache

      public RenderingCache()
  • Method Details

    • hasBlueprint

      public static boolean hasBlueprint(String key)
      Check if there is a blueprint with the id in the cache.
      Parameters:
      key - the key to check for.
      Returns:
      true if so.
    • getBoxPreviewData

      public static BoxPreviewData getBoxPreviewData(String key)
      Get the preview data for a box.
      Parameters:
      key - the key of the box.
      Returns:
      the preview data.
    • getBlueprintPreviewData

      public static BlueprintPreviewData getBlueprintPreviewData(String key)
      Get the preview data for a blueprint.
      Parameters:
      key - the key of the blueprint.
      Returns:
      the preview data.
    • getBlueprintsToRender

      public static Collection<BlueprintPreviewData> getBlueprintsToRender()
      Get a list of all blueprints to render.
      Returns:
      the preview data.
    • getBoxesToRender

      public static Collection<BoxPreviewData> getBoxesToRender()
      Get a list of all blueprints to render.
      Returns:
      the preview data.
    • queue

      public static void queue(String key, BoxPreviewData boxPreviewData)
      Queue a box to be rendered.
      Parameters:
      key - the key to queue it under.
      boxPreviewData - the preview data.
    • queue

      public static void queue(String key, BlueprintPreviewData boxPreviewData)
      Queue a blueprint to be rendered.
      Parameters:
      key - the key to queue it under.
      boxPreviewData - the preview data.
    • removeBox

      public static BoxPreviewData removeBox(String key)
      Remove an item from the cache.
      Parameters:
      key - the key of the item to be removed.
      Returns:
      the removed data.
    • removeBlueprint

      public static BlueprintPreviewData removeBlueprint(String key)
      Remove an item from the cache.
      Parameters:
      key - the key of the item to be removed.
      Returns:
      the removed data.
    • getOrCreateBlueprintPreviewData

      public static BlueprintPreviewData getOrCreateBlueprintPreviewData(String key)
      Get or create a blueprint preview data cache object.
      Parameters:
      key - the key to look for.
      Returns:
      the blueprint preview data with the key or a new one.
    • forceLightLevel

      @Deprecated(forRemoval=true, since="1.21.1") public static boolean forceLightLevel()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      true when should use light level from getOurLightLevel()
    • getOurLightLevel

      @Deprecated(forRemoval=true, since="1.21.1") public static int getOurLightLevel()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      static light level
    • clear

      public static void clear()
      Clean the rendering caches.
    • removeSharedPreviews

      public static void removeSharedPreviews()
      Removes all shared previews