@PublicSpi
public interface ItemChangeFilter
An implementor of this interfaces checks if any of changed items may affect a built forest fragment.
The implementor may detect only changes those are recorded to ItemTracker
Here is the basic implementation:
return itemIds.stream().anyMatch(itemId -> // return true if a change of the item may affect the forest fragment );
If the forest fragment may depend on changes those are not reported to the ItemTracker
You have to implement UpdateChecker
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Set<ItemIdentity> itemIds,
StructureGenerator.ItemChangeFilterContext context)
Checks if any of changed items may affect the built forest.
|
boolean accept(@NotNull Set<ItemIdentity> itemIds, @NotNull StructureGenerator.ItemChangeFilterContext context)
itemIds
- set of changed itemscontext
- convenient methods to check an itemCopyright © 2024 Tempo Software. All Rights Reserved.