Class InteractionView

java.lang.Object
com.hypixel.hytale.server.npc.blackboard.view.PrioritisedProviderView<ReservationProvider, InteractionView>
com.hypixel.hytale.server.npc.blackboard.view.interaction.InteractionView
All Implemented Interfaces:
IBlackboardView<InteractionView>

public class InteractionView extends PrioritisedProviderView<ReservationProvider, InteractionView>
A view that handles some aspects of enabling and disabling interactions with NPCs. This largely relates to handling providers for reserving NPCs (and providing a non-persistent option for that on its own) and the registration of other systems that interface with NPC interaction such as the objective system. Created on 29/10/2018
  • Constructor Details

    • InteractionView

      public InteractionView(World world)
  • Method Details

    • isOutdated

      public boolean isOutdated(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store)
      Description copied from interface: IBlackboardView
      Checks whether the current view is outdated for the given NPC and if they need to fetch a new one
      Parameters:
      ref - The entity reference of the NPC
      store - The entity store for component access
      Returns:
      whether they need to query for a new view
    • getUpdatedView

      public InteractionView getUpdatedView(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Description copied from interface: IBlackboardView
      Returns the updated view if the current is outdated
      Parameters:
      ref - The NPC seeking a view
      componentAccessor - The ComponentAccessor for component access
      Returns:
      the updated view
    • initialiseEntity

      public void initialiseEntity(@Nonnull Ref<EntityStore> ref, @Nonnull BlackboardSubscription subscription)
      Description copied from interface: IBlackboardView
      Initializes the given entity with any data relevant to the view.
      Parameters:
      ref - The entity reference
      subscription - The BlackboardSubscription holding the entity's subscribed sets
    • cleanup

      public void cleanup()
      Description copied from interface: IBlackboardView
      Perform whatever cleanup is necessary in this view at a regular interval
    • onWorldRemoved

      public void onWorldRemoved()
      Description copied from interface: IBlackboardView
      Perform any final cleanup when the world is removed
    • getReservationStatus

      @Nonnull public ReservationStatus getReservationStatus(@Nonnull Ref<EntityStore> npcRef, @Nonnull Ref<EntityStore> playerRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor)