Interface GridWatcher
- All Known Implementing Classes:
AbstractCraftingGridContainerMenu
,AbstractGridContainerMenu
,AbstractPortableGridContainerMenu
,CraftingGridContainerMenu
,GridContainerMenu
,PatternGridContainerMenu
,PortableGridBlockContainerMenu
,PortableGridItemContainerMenu
,WirelessGridContainerMenu
@API(status=STABLE,
since="2.0.0-milestone.1.0")
public interface GridWatcher
A grid listener.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Usually called when the grid network has been changed.void
onActiveChanged
(boolean newActive) Called when the activeness state of the grid has changed.void
onChanged
(ResourceKey resource, long change, TrackedResource trackedResource) Called when a resource is changed.
-
Method Details
-
onActiveChanged
void onActiveChanged(boolean newActive) Called when the activeness state of the grid has changed.- Parameters:
newActive
- the new activeness state
-
onChanged
Called when a resource is changed.- Parameters:
resource
- the resourcechange
- the changed amounttrackedResource
- the tracked resource, if present
-
invalidate
void invalidate()Usually called when the grid network has been changed.
-