Package appeng.api.networking
Interface IGrid
public interface IGrid
Gives you access to Grid based information.
Don't Implement.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
export
(com.google.gson.stream.JsonWriter jsonWriter) Dump debug information about this grid to the given JSON writer.<T> Set
<T> getActiveMachines
(Class<T> machineClass) Get machines connected to the network via grid nodes that are powered and have their needed channels.default ICraftingService
Get this gridsICraftingService
.default IEnergyService
Get this gridsIEnergyService
.get a list of the diversity of classes, you can use this to better detect which machines your interested in, rather then iterating the entire grid to test them.getMachineNodes
(Class<?> machineClass) Get machine nodes on the network.<T> Set
<T> getMachines
(Class<T> machineClass) Get machines connected to the network via grid nodes.getNodes()
default IPathingService
Get this gridsIPathingService
.getPivot()
<C extends IGridService>
CgetService
(Class<C> iface) Get Access to various grid modulesdefault ISpatialService
Get this gridsISpatialService
.default IStorageService
Get this gridsIStorageService
.default ITickManager
Get this gridsITickManager
.boolean
isEmpty()
<T extends GridEvent>
TpostEvent
(T ev) Post an event into the network event bus.int
size()
-
Method Details
-
getService
Get Access to various grid modules- Parameters:
iface
- face- Returns:
- the IGridCache you requested.
-
postEvent
Post an event into the network event bus.- Parameters:
ev
- - event to post- Returns:
- returns ev back to original poster
-
getMachineClasses
get a list of the diversity of classes, you can use this to better detect which machines your interested in, rather then iterating the entire grid to test them.- Returns:
- IReadOnlyCollection of all available host types (Of Type IGridHost).
-
getMachineNodes
Get machine nodes on the network.- Parameters:
machineClass
- class of the machine associated with a grid node- Returns:
- all nodes belonging to machines of specified class. keep in mind that machines can have multiple nodes.
-
getMachines
Get machines connected to the network via grid nodes.- Parameters:
machineClass
- class of the machine associated with a grid node- Returns:
- all unique machines of specified class. if a machine is connected to the grid with multiple nodes, this will only return the machine once.
-
getActiveMachines
Get machines connected to the network via grid nodes that are powered and have their needed channels.- Parameters:
machineClass
- class of the machine associated with a grid node- Returns:
- all unique machines of specified class. if a machine is connected to the grid with multiple nodes, this will only return the machine once.
-
getNodes
- Returns:
- IReadOnlyCollection for all nodes on the network, node visitors are preferred.
-
isEmpty
boolean isEmpty()- Returns:
- true if the last node has been removed from the grid.
-
getPivot
IGridNode getPivot()- Returns:
- the node considered the pivot point of the grid.
-
size
int size()- Returns:
- The number of nodes in this grid.
-
getTickManager
Get this gridsITickManager
.- See Also:
-
getStorageService
Get this gridsIStorageService
.- See Also:
-
getEnergyService
Get this gridsIEnergyService
.- See Also:
-
getCraftingService
Get this gridsICraftingService
.- See Also:
-
getPathingService
Get this gridsIPathingService
.- See Also:
-
getSpatialService
Get this gridsISpatialService
.- See Also:
-
export
Dump debug information about this grid to the given JSON writer.- Throws:
IOException
-