Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getResourceType()
- init(World)
- onEntityDamageBlock(Ref, DamageBlockEvent)
- onEntityBreakBlock(Ref, BreakBlockEvent)
- onEntityUseBlock(Ref, UseBlockEvent.Post)
- onEntityUseEntity(Ref, UseEntityEvent.Post)
- cleanupViews()
- clear()
- onWorldRemoved()
- forEachView(Class, Consumer)
- getView(Class, Ref, ComponentAccessor)
- getView(Class, int, int)
- getView(Class, long)
- getIfExists(Class, long)
- clone()
Class Blackboard
java.lang.Object
com.hypixel.hytale.server.npc.blackboard.Blackboard
- All Implemented Interfaces:
Resource<EntityStore>, Cloneable
A class to facilitate caching and sharing expensive-to-retrieve information between NPCs
-
Field Summary
FieldsFields inherited from interface Resource
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()clone()<View extends IBlackboardView<View>>
voidforEachView(Class<View> viewTypeClass, Consumer<View> consumer) <View extends IBlackboardView<View>>
ViewgetIfExists(Class<View> viewTypeClass, long index) static ResourceType<EntityStore, Blackboard> <View extends IBlackboardView<View>>
View<View extends IBlackboardView<View>>
View<View extends IBlackboardView<View>>
ViewgetView(Class<View> viewTypeClass, Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidvoidonEntityBreakBlock(Ref<EntityStore> ref, BreakBlockEvent event) Called when an entity breaks a block.voidonEntityDamageBlock(Ref<EntityStore> ref, DamageBlockEvent event) Called when an entity damages a block.voidonEntityUseBlock(Ref<EntityStore> ref, UseBlockEvent.Post event) Called when an entity uses a block.voidonEntityUseEntity(Ref<EntityStore> ref, UseEntityEvent.Post event) Called when an entity uses another entity.void
-
Field Details
-
LOGGER
-
-
Constructor Details
-
Blackboard
public Blackboard()
-
-
Method Details
-
getResourceType
-
init
-
onEntityDamageBlock
Called when an entity damages a block.- Parameters:
ref- The entity reference of the instigating entity.event- The damage block event.
-
onEntityBreakBlock
Called when an entity breaks a block.- Parameters:
ref- The entity reference of the instigating entity.event- The break block event.
-
onEntityUseBlock
Called when an entity uses a block.- Parameters:
ref- The entity reference of the instigating entity.event- The use block event.
-
onEntityUseEntity
Called when an entity uses another entity.- Parameters:
ref- The entity reference of the instigating entity.event- The use entity event.
-
cleanupViews
public void cleanupViews() -
clear
public void clear() -
onWorldRemoved
public void onWorldRemoved() -
forEachView
public <View extends IBlackboardView<View>> void forEachView(Class<View> viewTypeClass, Consumer<View> consumer) -
getView
public <View extends IBlackboardView<View>> View getView(Class<View> viewTypeClass, Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) -
getView
public <View extends IBlackboardView<View>> View getView(Class<View> viewTypeClass, int chunkX, int chunkZ) -
getView
-
getIfExists
-
clone
- Specified by:
clonein interfaceResource<EntityStore>- Returns:
- a clone instance of the original resource instance.
-