Class ResourceView
java.lang.Object
com.hypixel.hytale.server.npc.blackboard.view.BlockRegionView<ResourceView>
com.hypixel.hytale.server.npc.blackboard.view.resource.ResourceView
- All Implemented Interfaces:
IBlackboardView<ResourceView>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate final Map<Ref<EntityStore>, ResourceView.BlockReservation> private final it.unimi.dsi.fastutil.ints.IntSet[]Fields inherited from class com.hypixel.hytale.server.npc.blackboard.view.BlockRegionView
BITS, BITS2, SIZE, SIZE_MASK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()voidclearReservation(Ref<EntityStore> ref) longgetIndex()getUpdatedView(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidinitialiseEntity(Ref<EntityStore> ref, NPCEntity npcComponent) booleanisBlockReserved(int x, int y, int z) booleanisOutdated(Ref<EntityStore> ref, Store<EntityStore> store) voidvoidreserveBlock(NPCEntity entity, int x, int y, int z) Methods inherited from class com.hypixel.hytale.server.npc.blackboard.view.BlockRegionView
chunkToRegionalBlackboardCoordinate, indexBlock, indexSection, indexView, indexViewFromChunkCoordinates, indexViewFromWorldPosition, toRegionalBlackboardCoordinate, toWorldCoordinate, xFromIndex, xOfViewIndex, yFromIndex, zFromIndex, zOfViewIndex
-
Field Details
-
index
private final long index -
reservationsBySection
private final it.unimi.dsi.fastutil.ints.IntSet[] reservationsBySection -
reservationsByEntity
-
-
Constructor Details
-
ResourceView
public ResourceView(long index)
-
-
Method Details
-
isOutdated
-
getUpdatedView
@Nonnull public ResourceView getUpdatedView(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
initialiseEntity
-
cleanup
public void cleanup() -
onWorldRemoved
public void onWorldRemoved() -
isBlockReserved
public boolean isBlockReserved(int x, int y, int z) -
reserveBlock
-
clearReservation
-
getIndex
public long getIndex() -
getReservationsByEntity
-