Class RenderingCache
java.lang.Object
com.ldtteam.structurize.storage.rendering.RenderingCache
Rendering cache for boxes, blueprints, etc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Clean the rendering caches.static booleanDeprecated.static BlueprintPreviewDataGet the preview data for a blueprint.static Collection<BlueprintPreviewData>Get a list of all blueprints to render.static BlueprintPreviewDataGet or create a blueprint preview data cache object.static intDeprecated.static booleanhasBlueprint(String key) Check if there is a blueprint with the id in the cache.static voidqueue(String key, BlueprintPreviewData boxPreviewData) Queue a blueprint to be rendered.static BlueprintPreviewDataremoveBlueprint(String key) Remove an item from the cache.static voidRemoves all shared previews
-
Constructor Details
-
RenderingCache
public RenderingCache()
-
-
Method Details
-
hasBlueprint
Check if there is a blueprint with the id in the cache.- Parameters:
key- the key to check for.- Returns:
- true if so.
-
getBlueprintPreviewData
Get the preview data for a blueprint.- Parameters:
key- the key of the blueprint.- Returns:
- the preview data.
-
getBlueprintsToRender
Get a list of all blueprints to render.- Returns:
- the preview data.
-
queue
Queue a blueprint to be rendered.- Parameters:
key- the key to queue it under.boxPreviewData- the preview data.
-
removeBlueprint
Remove an item from the cache.- Parameters:
key- the key of the item to be removed.- Returns:
- the removed data.
-
getOrCreateBlueprintPreviewData
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.- Returns:
- true when should use light level from
getOurLightLevel()
-
getOurLightLevel
Deprecated.- Returns:
- static light level
-
clear
public static void clear()Clean the rendering caches.
-