Interface IItemListModuleView
- All Superinterfaces:
IBuildingModuleView
- All Known Implementing Classes:
FloristFlowerListModuleView,ItemListModuleView
Client side version of the abstract class for all buildings which require a filterable list of allowed items.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddItem(ItemStorage item) Add item to the view and notify the server side.voidClear the list of itemsGet the supplier of the list of all items to display.getId()Get the unique id of this group (used to sync with server side).intgetSize()Get the size of allowed items.booleanisAllowedItem(ItemStorage item) Check if an item is in the list of allowed items.booleanCheck if the list is enabling or disabling.voidremoveItem(ItemStorage item) Remove an item from the view and notify the server side.Methods inherited from interface com.minecolonies.api.colony.buildings.modules.IBuildingModuleView
deserialize, getBuildingView, getColony, getDesc, getIcon, getIconResourceLocation, getProducer, getWindow, isPageVisible, setBuildingView, setColonyView, setProducer
-
Method Details
-
addItem
Add item to the view and notify the server side.- Parameters:
item- the item to add.
-
isAllowedItem
Check if an item is in the list of allowed items.- Parameters:
item- the item to check.- Returns:
- true if so.
-
getSize
int getSize()Get the size of allowed items.- Returns:
- the size.
-
removeItem
Remove an item from the view and notify the server side.- Parameters:
item- the item to remove.
-
getId
String getId()Get the unique id of this group (used to sync with server side).- Returns:
- the id.
-
getAllItems
Function<IBuildingView,Set<ItemStorage>> getAllItems()Get the supplier of the list of all items to display.- Returns:
- the list.
-
isInverted
boolean isInverted()Check if the list is enabling or disabling.- Returns:
- true if enabling.
-
clearItems
void clearItems()Clear the list of items
-