Interface NetworkBehavior
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
How a network moves resources (SPI). Called once per tick while the network is active; a network
that moved nothing sleeps until one of its machines' storages changes (ยง17).
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull NetworkBehaviorMoves from every port that allows extraction into every other port that allows insertion, round-robin over the targets and within the network's rate.static @NotNull NetworkBehaviordistributing(long everyTicks) distributing()once everyeveryTicksticks, each time up to the network's rate: items move in batches (Mekanism's transporters pull a stack every half second).longtick(@NotNull NetworkContext context)
-
Method Details
-
tick
- Returns:
- how much was moved; 0 puts the network to sleep
-
distributing
Moves from every port that allows extraction into every other port that allows insertion, round-robin over the targets and within the network's rate. Only what the network's filter accepts moves. Each move is a transaction, so nothing is lost or created. -
distributing
distributing()once everyeveryTicksticks, each time up to the network's rate: items move in batches (Mekanism's transporters pull a stack every half second). Between batches the network stays awake while a source holds something it carries, or while it pulls from a container (whose changes wake nothing).
-