Contents
Interface IBlackboardViewManager<View extends IBlackboardView<View>>
- All Known Implementing Classes:
BlockRegionViewManager, BlockTypeViewManager, ResourceViewManager, SingletonBlackboardViewManager
public interface IBlackboardViewManager<View extends IBlackboardView<View>>
Created on 22/08/2018
-
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Clean up viewsvoidclear()Clear all views storedvoidforEachView(Consumer<View> consumer) Run a consumer on each view, mostly for debugging purposesget(int chunkX, int chunkZ, Blackboard blackboard) Fetch the blackboard view, or create it if it doesn't exist yetget(long index, Blackboard blackboard) Fetch the blackboard view, or create it if it doesn't exist yetget(Ref<EntityStore> ref, Blackboard blackboard, ComponentAccessor<EntityStore> componentAccessor) Fetch the blackboard view, or create it if it doesn't exist yetget(org.joml.Vector3d position, Blackboard blackboard) Fetch the blackboard view, or create it if it doesn't exist yetgetIfExists(long index) Fetch the blackboard view only if it already existsvoidHandle any final cleanup when the world is removed
-
Method Details
-
get
View get(Ref<EntityStore> ref, Blackboard blackboard, ComponentAccessor<EntityStore> componentAccessor) Fetch the blackboard view, or create it if it doesn't exist yet- Parameters:
ref- the entity accessing the viewblackboard- the main blackboardcomponentAccessor-- Returns:
- the associated blackboard view
-
get
Fetch the blackboard view, or create it if it doesn't exist yet- Parameters:
position- positional data for deciding on the blackboard viewblackboard- the main blackboard- Returns:
- the associated blackboard view
-
get
Fetch the blackboard view, or create it if it doesn't exist yet- Parameters:
chunkX- a chunk x coordinate for determining the viewchunkZ- a chunk z coordinate for determining the viewblackboard- the main blackboard- Returns:
- the associated blackboard view
-
get
Fetch the blackboard view, or create it if it doesn't exist yet- Parameters:
index- to use for determining the view, the computation for said index being dependent on the view class implementationblackboard- the main blackboard- Returns:
- the associated blackboard view
-
getIfExists
Fetch the blackboard view only if it already exists- Parameters:
index- to use for determining the view, the computation for said index being dependent on the view class implementation- Returns:
- the associated blackboard view or null if it doesn't exist
-
cleanup
void cleanup()Clean up views -
onWorldRemoved
void onWorldRemoved()Handle any final cleanup when the world is removed -
forEachView
-
clear
void clear()Clear all views stored
-