Contents
Class BlockRegionViewManager<Type extends BlockRegionView<Type>>
java.lang.Object
com.hypixel.hytale.server.npc.blackboard.view.BlockRegionViewManager<Type>
- All Implemented Interfaces:
IBlackboardViewManager<Type>
- Direct Known Subclasses:
BlockTypeViewManager, ResourceViewManager
public abstract class BlockRegionViewManager<Type extends BlockRegionView<Type>>
extends Object
implements IBlackboardViewManager<Type>
Created on 22/08/2018
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Clean up viewsvoidclear()Clear all views storedvoidforEachView(Consumer<Type> 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
-
Constructor Details
-
BlockRegionViewManager
public BlockRegionViewManager()
-
-
Method Details
-
get
public Type get(@Nonnull Ref<EntityStore> ref, Blackboard blackboard, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:IBlackboardViewManagerFetch the blackboard view, or create it if it doesn't exist yet- Specified by:
getin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>- Parameters:
ref- the entity accessing the viewblackboard- the main blackboardcomponentAccessor-- Returns:
- the associated blackboard view
-
get
Description copied from interface:IBlackboardViewManagerFetch the blackboard view, or create it if it doesn't exist yet- Specified by:
getin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>- Parameters:
position- positional data for deciding on the blackboard viewblackboard- the main blackboard- Returns:
- the associated blackboard view
-
get
Description copied from interface:IBlackboardViewManagerFetch the blackboard view, or create it if it doesn't exist yet- Specified by:
getin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>- 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
Description copied from interface:IBlackboardViewManagerFetch the blackboard view, or create it if it doesn't exist yet- Specified by:
getin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>- 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
Description copied from interface:IBlackboardViewManagerFetch the blackboard view only if it already exists- Specified by:
getIfExistsin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>- 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
public void cleanup()Description copied from interface:IBlackboardViewManagerClean up views- Specified by:
cleanupin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>
-
onWorldRemoved
public void onWorldRemoved()Description copied from interface:IBlackboardViewManagerHandle any final cleanup when the world is removed- Specified by:
onWorldRemovedin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>
-
forEachView
Description copied from interface:IBlackboardViewManagerRun a consumer on each view, mostly for debugging purposes- Specified by:
forEachViewin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>- Parameters:
consumer- the consumer to run
-
clear
public void clear()Description copied from interface:IBlackboardViewManagerClear all views stored- Specified by:
clearin interfaceIBlackboardViewManager<Type extends BlockRegionView<Type>>
-