Class NetworkRoot

java.lang.Object
io.github.sefiraat.networks.network.NetworkNode
io.github.sefiraat.networks.network.NetworkRoot

public class NetworkRoot extends NetworkNode
  • Constructor Details

    • NetworkRoot

      public NetworkRoot(@Nonnull Location location, @Nonnull NodeType type, int maxNodes)
  • Method Details

    • registerNode

      public void registerNode(@Nonnull Location location, @Nonnull NodeType type)
    • getNodeLocations

      public Set<Location> getNodeLocations()
    • getMaxNodes

      public int getMaxNodes()
    • getNodeCount

      public int getNodeCount()
    • isOverburdened

      public boolean isOverburdened()
    • setOverburdened

      public void setOverburdened(boolean overburdened)
    • getBridges

      public Set<Location> getBridges()
    • getMonitors

      public Set<Location> getMonitors()
    • getImporters

      public Set<Location> getImporters()
    • getExporters

      public Set<Location> getExporters()
    • getGrids

      public Set<Location> getGrids()
    • getCells

      public Set<Location> getCells()
    • getWipers

      public Set<Location> getWipers()
    • getGrabbers

      public Set<Location> getGrabbers()
    • getPushers

      public Set<Location> getPushers()
    • getPurgers

      public Set<Location> getPurgers()
    • getCrafters

      public Set<Location> getCrafters()
    • getPowerNodes

      public Set<Location> getPowerNodes()
    • getPowerDisplays

      public Set<Location> getPowerDisplays()
    • getEncoders

      public Set<Location> getEncoders()
    • getAllNetworkItems

      @Nonnull public Map<ItemStack,Integer> getAllNetworkItems()
    • getBarrels

      @Nonnull public Set<BarrelIdentity> getBarrels()
    • getCellMenus

      @Nonnull public Set<me.mrCookieSlime.Slimefun.api.inventory.BlockMenu> getCellMenus()
    • getCrafterOutputs

      @Nonnull public Set<me.mrCookieSlime.Slimefun.api.inventory.BlockMenu> getCrafterOutputs()
    • getGreedyBlocks

      @Nonnull public Set<me.mrCookieSlime.Slimefun.api.inventory.BlockMenu> getGreedyBlocks()
    • getItemStack

      @Nullable public ItemStack getItemStack(@Nonnull ItemRequest request)
      Checks the Network's exposed items and removes items matching the request up to the amount requested. Items are withdrawn in this order:

      Cells Withholding AutoCrafters Deep Storages (Barrels)

      Parameters:
      request - The ItemRequest being requested from the Network
      Returns:
      The ItemStack matching the request with as many as could be found. Null if none.
    • contains

      public boolean contains(@Nonnull ItemRequest[] requests)
    • contains

      public boolean contains(@Nonnull ItemRequest request)
    • addItemStack

      public void addItemStack(@Nonnull ItemStack incoming)
    • retrieveBlockCharge

      public long retrieveBlockCharge()
      Overrides:
      retrieveBlockCharge in class NetworkNode
    • getRootPower

      public long getRootPower()
    • setRootPower

      public void setRootPower(long power)
    • addRootPower

      public void addRootPower(long power)
    • removeRootPower

      public void removeRootPower(long power)
    • isDisplayParticles

      public boolean isDisplayParticles()
    • setDisplayParticles

      public void setDisplayParticles(boolean displayParticles)