Interface GridWatcher

All Superinterfaces:
TaskStatusListener
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 extends TaskStatusListener
A grid listener.
  • Method Details

    • onActiveChanged

      void onActiveChanged(boolean newActive)
      Called when the activeness state of the grid has changed.
      Parameters:
      newActive - the new activeness state
    • onChanged

      void onChanged(ResourceKey resource, long change, @Nullable TrackedResource trackedResource)
      Called when a resource is changed.
      Parameters:
      resource - the resource
      change - the changed amount
      trackedResource - the tracked resource, if present
    • invalidate

      void invalidate()
      Usually called when the grid network has been changed.