Class ObjectCacheUtil
- Namespace
- Vintagestory.API.Util
- Assembly
- VintagestoryAPI.dll
public static class ObjectCacheUtil
- Inheritance
-
ObjectCacheUtil
- Inherited Members
-
Methods
Delete(ICoreAPI, string)
public static bool Delete(ICoreAPI api, string key)
Parameters
api ICoreAPI
key string
Returns
- bool
GetOrCreate<T>(ICoreAPI, string, CreateCachableObjectDelegate<T>)
public static T GetOrCreate<T>(ICoreAPI api, string key, CreateCachableObjectDelegate<T> onRequireCreate)
Parameters
api ICoreAPI
key string
onRequireCreate CreateCachableObjectDelegate<T>
Returns
- T
Type Parameters
T
GetToolStacks(ICoreAPI, EnumTool)
public static ItemStack[] GetToolStacks(ICoreAPI api, EnumTool tool)
Parameters
api ICoreAPI
tool EnumTool
Returns
- ItemStack[]
TryGet<T>(ICoreAPI, string)
public static T? TryGet<T>(ICoreAPI api, string key)
Parameters
api ICoreAPI
key string
Returns
- T
Type Parameters
T