Contents
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>
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
-
Nested Class Summary
Nested classes/interfaces inherited from class PrioritisedProviderView
PrioritisedProviderView.PrioritisedProvider<T> -
Field Summary
Fields inherited from class PrioritisedProviderView
LOWEST_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Perform whatever cleanup is necessary in this view at a regular intervalgetReservationStatus(Ref<EntityStore> npcRef, Ref<EntityStore> playerRef, ComponentAccessor<EntityStore> componentAccessor) getUpdatedView(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) Returns the updated view if the current is outdatedvoidinitialiseEntity(Ref<EntityStore> ref, BlackboardSubscription subscription) Initializes the given entity with any data relevant to the view.booleanisOutdated(Ref<EntityStore> ref, Store<EntityStore> store) Checks whether the current view is outdated for the given NPC and if they need to fetch a new onevoidPerform any final cleanup when the world is removedMethods inherited from class PrioritisedProviderView
registerProvider
-
Constructor Details
-
InteractionView
-
-
Method Details
-
isOutdated
Description copied from interface:IBlackboardViewChecks 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 NPCstore- 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:IBlackboardViewReturns the updated view if the current is outdated- Parameters:
ref- The NPC seeking a viewcomponentAccessor- TheComponentAccessorfor component access- Returns:
- the updated view
-
initialiseEntity
public void initialiseEntity(@Nonnull Ref<EntityStore> ref, @Nonnull BlackboardSubscription subscription) Description copied from interface:IBlackboardViewInitializes the given entity with any data relevant to the view.- Parameters:
ref- The entity referencesubscription- TheBlackboardSubscriptionholding the entity's subscribed sets
-
cleanup
public void cleanup()Description copied from interface:IBlackboardViewPerform whatever cleanup is necessary in this view at a regular interval -
onWorldRemoved
public void onWorldRemoved()Description copied from interface:IBlackboardViewPerform 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)
-