Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getComponentType()
- getBlockTypeBlackboardView(Ref, Store)
- removeBlockTypeBlackboardView()
- initBlockTypeView(Ref, ComponentAccessor)
- getBlockTypeSets()
- initEventViews(Ref, ComponentAccessor)
- getBlockChangeSet(BlockEventType)
- notifyBlockChange(Ref, ComponentAccessor, BlockEventType, EventNotification)
- getEntityEventSet(EntityEventType)
- notifyEntityEvent(Ref, ComponentAccessor, EntityEventType, EntityEventNotification)
- buildAndAttach(Holder, BuilderSupport)
- clone()
Class BlackboardSubscription
java.lang.Object
com.hypixel.hytale.server.npc.blackboard.BlackboardSubscription
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Per-entity blackboard subscription state. Holds the block-type / block-event / entity-event
blackboard views and the sets each entity is interested in, plus the routing that posts received events to the entity's
*EventSupport components.-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildAndAttach(Holder<EntityStore> holder, BuilderSupport support) Builds aBlackboardSubscriptionfrom the builtsupportand, if the asset uses any blackboard sensor, attaches it (plus the matching*EventSupportcomponents) toholder.clone()it.unimi.dsi.fastutil.ints.IntSetgetBlockTypeBlackboardView(Ref<EntityStore> ref, Store<EntityStore> store) it.unimi.dsi.fastutil.ints.IntListit.unimi.dsi.fastutil.ints.IntSetvoidinitBlockTypeView(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor) voidinitEventViews(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor) Initializes the block-change and entity-event views for this entity (the block-type view is created lazily on firstSensorBlockuse).static voidnotifyBlockChange(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor, BlockEventType type, EventNotification notification) Routes a block event to this entity's block-event support component (player- vs npc-sourced, by initiator).static voidnotifyEntityEvent(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor, EntityEventType type, EntityEventNotification notification) Routes an entity event to this entity's entity-event support component (player- vs npc-sourced, by initiator).Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
BlackboardSubscription
public BlackboardSubscription()
-
-
Method Details
-
getComponentType
-
getBlockTypeBlackboardView
@Nonnull public BlockTypeView getBlockTypeBlackboardView(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store) -
removeBlockTypeBlackboardView
-
initBlockTypeView
public void initBlockTypeView(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor) -
getBlockTypeSets
@Nullable public it.unimi.dsi.fastutil.ints.IntList getBlockTypeSets() -
initEventViews
public void initEventViews(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor) Initializes the block-change and entity-event views for this entity (the block-type view is created lazily on firstSensorBlockuse). -
getBlockChangeSet
-
notifyBlockChange
public static void notifyBlockChange(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor, @Nonnull BlockEventType type, @Nonnull EventNotification notification) Routes a block event to this entity's block-event support component (player- vs npc-sourced, by initiator). Registered as theIEventCallbackofBlockEventView. -
getEntityEventSet
-
notifyEntityEvent
public static void notifyEntityEvent(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor, @Nonnull EntityEventType type, @Nonnull EntityEventNotification notification) Routes an entity event to this entity's entity-event support component (player- vs npc-sourced, by initiator). Registered as theIEventCallbackofEntityEventView. -
buildAndAttach
public static void buildAndAttach(@Nonnull Holder<EntityStore> holder, @Nonnull BuilderSupport support) Builds aBlackboardSubscriptionfrom the builtsupportand, if the asset uses any blackboard sensor, attaches it (plus the matching*EventSupportcomponents) toholder. -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-