public interface IslandEntitiesTrackerAlgorithm
Modifier and Type | Method and Description |
---|---|
void |
clearEntityCounts()
Clear all the entity counts of the island.
|
java.util.Map<Key,java.lang.Integer> |
getEntitiesCounts()
Get all the entities that are on the island.
|
int |
getEntityCount(Key key)
Get the amount of entities that are on the island.
|
void |
recalculateEntityCounts()
Recalculate entity counts on the island.
|
boolean |
trackEntity(Key key,
int amount)
Track a new entity with a specific amount.
|
boolean |
untrackEntity(Key key,
int amount)
Untrack a entity with a specific amount.
|
boolean trackEntity(Key key, int amount)
key
- The entity's key that should be tracked.amount
- The amount of the entity.boolean untrackEntity(Key key, int amount)
key
- The entity's key that should be untracked.amount
- The amount of the entity.int getEntityCount(Key key)
key
- The entity's key to check.java.util.Map<Key,java.lang.Integer> getEntitiesCounts()
void clearEntityCounts()
void recalculateEntityCounts()