Class CreativeInventoryModel
java.lang.Object
net.raphimc.viabedrock.protocol.model.CreativeInventoryModel
One player model's progressive creative collections and retained active-tab refresh state.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCreativeInventoryModel(CreativeCatalog catalog, ToIntBiFunction<CreativeInventoryModel.View, BedrockItem> evaluation, BiPredicate<BedrockItem, BedrockItem> identity) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleanready()voidrefresh(CreativeInventoryModel.View view, boolean grouping, boolean filtering, boolean resetExpansion) A direct model notification refreshes a collection without advancing population or consuming dirty tabs.booleantick(int leftTab, boolean grouping, boolean filtering) Population completion dirties the active tab once, on the call after the final write phase.
-
Constructor Details
-
CreativeInventoryModel
public CreativeInventoryModel(CreativeCatalog catalog, ToIntBiFunction<CreativeInventoryModel.View, BedrockItem> evaluation, BiPredicate<BedrockItem, BedrockItem> identity)
-
-
Method Details
-
tick
public boolean tick(int leftTab, boolean grouping, boolean filtering) Population completion dirties the active tab once, on the call after the final write phase. -
ready
public boolean ready() -
refresh
public void refresh(CreativeInventoryModel.View view, boolean grouping, boolean filtering, boolean resetExpansion) A direct model notification refreshes a collection without advancing population or consuming dirty tabs. -
invalidate
-
invalidateAll
public void invalidateAll() -
entries
-
collection
public RecipeCollection<CreativeCatalog.CollectionEntry, CreativeCatalog.Group> collection(CreativeInventoryModel.View view)
-