Class RenderingCache
java.lang.Object
com.ldtteam.structurize.storage.rendering.RenderingCache
Rendering cache for boxes, blueprints, etc. TODO:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Clean the rendering caches.static booleanDeprecated, for removal: This API element is subject to removal in a future version.static BlueprintPreviewDataGet the preview data for a blueprint.static Collection<BlueprintPreviewData> Get a list of all blueprints to render.static Collection<BoxPreviewData> Get a list of all blueprints to render.static BoxPreviewDatagetBoxPreviewData(String key) Get the preview data for a box.static BlueprintPreviewDataGet or create a blueprint preview data cache object.static intDeprecated, for removal: This API element is subject to removal in a future version.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 voidqueue(String key, BoxPreviewData boxPreviewData) Queue a box to be rendered.static BlueprintPreviewDataremoveBlueprint(String key) Remove an item from the cache.static BoxPreviewDataRemove an item from the cache.static voidRemoves all shared previews
-
Field Details
-
boxRenderingCache
Boxes to render.
-
-
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.
-
getBoxPreviewData
Get the preview data for a box.- Parameters:
key- the key of the box.- Returns:
- the preview data.
-
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.
-
getBoxesToRender
Get a list of all blueprints to render.- Returns:
- the preview data.
-
queue
Queue a box to be rendered.- Parameters:
key- the key to queue it under.boxPreviewData- the preview data.
-
queue
Queue a blueprint to be rendered.- Parameters:
key- the key to queue it under.boxPreviewData- the preview data.
-
removeBox
Remove an item from the cache.- Parameters:
key- the key of the item to be removed.- Returns:
- the removed 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, for removal: This API element is subject to removal in a future version.- Returns:
- true when should use light level from
getOurLightLevel()
-
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.
-