- Type Parameters:
S- the type of tracked entities being managed, which extendsTrackedK- the type of the key associated with the tracked entities, which extendsWorldKey
- All Known Implementing Classes:
ChunkBlockContainer,ChunkSectionBlockContainer,WorldBlockContainer
Common accessor contract for containers that store
Holder instances at
three-dimensional block coordinates, regardless of how they are internally organized.-
Method Summary
Modifier and TypeMethodDescriptionCollection<Holder<S, K>> getHolder(int x, int y, int z) Retrieves the tracked object at the given block coordinates.voidremoveHolder(int x, int y, int z) Removes the tracked object at the given block coordinates, if any.voidStores a tracked object at the given block coordinates.
-
Method Details
-
getHolder
Retrieves the tracked object at the given block coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate- Returns:
- the tracked object at the given coordinates, or
nullif none is present
-
setHolder
Stores a tracked object at the given block coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinateholder- the tracked object to store
-
removeHolder
void removeHolder(int x, int y, int z) Removes the tracked object at the given block coordinates, if any.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate
-
getAllHolders
Collection<Holder<S,K>> getAllHolders()- Returns:
- a collection of all holders currently stored in this container
-