Interface IFullNetworkListener

All Known Subinterfaces:
INetwork
All Known Implementing Classes:
EnergyNetwork, FullNetworkListenerAdapter, Network, PartNetwork, PositionedAddonsNetworkIngredients

public interface IFullNetworkListener
This should be implemented on network capabilities that wish to listen to all network events.
  • Method Details

    • addNetworkElement

      boolean addNetworkElement(INetworkElement element, boolean networkPreinit)
      Add a given network element to the network Also checks if it can tick and will handle it accordingly.
      Parameters:
      element - The network element.
      networkPreinit - If the network is still in the process of being initialized.
      Returns:
      If the addition succeeded.
    • removeNetworkElementPre

      boolean removeNetworkElementPre(INetworkElement element)
      Checks if the given network element can be removed from the network
      Parameters:
      element - The network element.
      Returns:
      If the element was can be removed from the network.
    • removeNetworkElementPost

      void removeNetworkElementPost(INetworkElement element)
      Remove a given network element from the network. Also removed its tickable instance.
      Parameters:
      element - The network element.
    • kill

      void kill()
      Terminate the network elements for this network.
    • update

      void update()
      This network updating should be called each tick.
    • updateGuaranteed

      void updateGuaranteed()
      This guaranteed network updating should be called each tick, even in safe-mode.
    • removePathElement

      boolean removePathElement(IPathElement pathElement, net.minecraft.core.Direction side)
      Remove the given path element from the network. If the path element had any network elements registered in the network, these will be killed and removed as well.
      Parameters:
      pathElement - The path element.
      side - The side.
      Returns:
      If the path element was removed.
    • afterServerLoad

      void afterServerLoad()
      Called when the server loaded this network. This is the time to notify all network elements of this network.
    • beforeServerStop

      void beforeServerStop()
      Called when the server will save this network before stopping. This is the time to notify all network elements of this network.
    • canUpdate

      boolean canUpdate(INetworkElement element)
      If the given element can update.
      Parameters:
      element - The network element.
      Returns:
      If it can update.
    • postUpdate

      void postUpdate(INetworkElement element)
      Called after a network element's update was called.
      Parameters:
      element - The network element.
    • onSkipUpdate

      void onSkipUpdate(INetworkElement element)
      When the given element is not being updated because canUpdate(INetworkElement) returned false.
      Parameters:
      element - The element that is not being updated.
    • invalidateElement

      void invalidateElement(INetworkElement element)
      Invalidate the given element. Called when the element's chunk is being unloaded.
      Parameters:
      element - The network element to invalidate.
    • revalidateElement

      void revalidateElement(INetworkElement element)
      Revalidate the given element. Called when the element's chunk is being reloaded.
      Parameters:
      element - The network element to invalidate.