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 Type
    Method
    Description
    void
    Clean up views
    void
    Clear all views stored
    void
    Run a consumer on each view, mostly for debugging purposes
    get(int chunkX, int chunkZ, Blackboard blackboard)
    Fetch the blackboard view, or create it if it doesn't exist yet
    get(long index, Blackboard blackboard)
    Fetch the blackboard view, or create it if it doesn't exist yet
    get(Ref<EntityStore> ref, Blackboard blackboard, ComponentAccessor<EntityStore> componentAccessor)
    Fetch the blackboard view, or create it if it doesn't exist yet
    get(org.joml.Vector3d position, Blackboard blackboard)
    Fetch the blackboard view, or create it if it doesn't exist yet
    getIfExists(long index)
    Fetch the blackboard view only if it already exists
    void
    Handle 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 view
      blackboard - the main blackboard
      componentAccessor -
      Returns:
      the associated blackboard view
    • get

      View get(org.joml.Vector3d position, Blackboard blackboard)
      Fetch the blackboard view, or create it if it doesn't exist yet
      Parameters:
      position - positional data for deciding on the blackboard view
      blackboard - the main blackboard
      Returns:
      the associated blackboard view
    • get

      View get(int chunkX, int chunkZ, Blackboard blackboard)
      Fetch the blackboard view, or create it if it doesn't exist yet
      Parameters:
      chunkX - a chunk x coordinate for determining the view
      chunkZ - a chunk z coordinate for determining the view
      blackboard - the main blackboard
      Returns:
      the associated blackboard view
    • get

      View get(long index, Blackboard blackboard)
      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 implementation
      blackboard - the main blackboard
      Returns:
      the associated blackboard view
    • getIfExists

      View getIfExists(long index)
      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

      void forEachView(Consumer<View> consumer)
      Run a consumer on each view, mostly for debugging purposes
      Parameters:
      consumer - the consumer to run
    • clear

      void clear()
      Clear all views stored