Interface EventLocation
- All Known Implementing Classes:
BiomeLocationV1, NoLocation, WildernessLocation
EventLocation are used as a starting point that may be refined further by the
LocationCondition to, for example, fit to the nearest solid surface.
Candidate positions do not need to be terrain-valid. The LocationCondition applies
terrain height lookup and Spawner
validation afterward. It retries with a new search if none of the candidates pass. Noisy
candidates, or no candidates at all, are fine to return.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfind(Store<EntityStore> store) Starts a location search and returns a future that resolves with the candidate positions found, or an empty list if none were found.
-
Method Details
-
find
Starts a location search and returns a future that resolves with the candidate positions found, or an empty list if none were found.The search may complete synchronously or asynchronously on any thread. The caller only reads the resolved value after confirming the future is done.
The caller will not invoke
findagain until the previously returned future completes, whether successfully, exceptionally, or via cancellation. Implementations may therefore hold per-search state between the call and completion without guarding against overlapping searches.The returned list is owned by the caller once the future resolves. The caller may filter or otherwise mutate it in place. Do not resolve the future with a cached or pooled list.
- Parameters:
store- the entity store for the world the condition is running in- Returns:
- a future that resolves with the candidate positions found
-