Package appeng.api.networking
Interface IGridConnection
public interface IGridConnection
Access to AE's internal grid connections.
Messing with connection is generally completely unnecessary, you should be able to just use IGridNode.updateState() to have AE manage them for you.
Don't Implement.
-
Method Summary
Modifier and TypeMethodDescriptiona()
b()
void
destroy()
by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy connections if you created them.@Nullable net.minecraft.core.Direction
getDirection
(IGridNode sourceNode) determine the direction of the connection based on your node.getOtherSide
(IGridNode gridNode) lets you get the opposing node of the connection by passing your own node.int
boolean
-
Method Details
-
getOtherSide
lets you get the opposing node of the connection by passing your own node.- Parameters:
gridNode
- current grid node- Returns:
- the IGridNode which represents the opposite side of the connection.
-
isInWorld
boolean isInWorld()- Returns:
- True if this connection was established via the grid node host's sides, and
getDirection(IGridNode)
returns a non-null value.
-
getDirection
determine the direction of the connection based on your node.- Parameters:
sourceNode
- current grid node- Returns:
- the direction of the connection, if
isInWorld()
is true, otherwise null.
-
destroy
void destroy()by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy connections if you created them. -
a
IGridNode a()- Returns:
- node A
-
b
IGridNode b()- Returns:
- node B
-
getUsedChannels
int getUsedChannels()- Returns:
- how many channels pass over this connections.
-