public interface SidedEnvironment
ISidedInventory
is to
IInventory
, it allows an environment to
specify different node access for its different sides.
This interface is intended to be used on tile entities that are environments.
It is used to determine which neighbors a tile entity can connect to when
calling Network.joinOrCreateNetwork(TileEntity)
. It is
used by the keyboard to only interface with the side on which it is attached,
as well as the switch to offer a different node for each side.Modifier and Type | Method and Description |
---|---|
boolean |
canConnect(net.minecraftforge.common.util.ForgeDirection side)
Whether the environment provides a node to connect to on the specified
side.
|
Node |
sidedNode(net.minecraftforge.common.util.ForgeDirection side)
The node this environment uses for the specified side.
|
Node sidedNode(net.minecraftforge.common.util.ForgeDirection side)
Environment.node()
method.
The provided side is relative to the environment, i.e. when the tile
entity hosting the environment sits at (0, 0, 0) and is asked for its
southern node (positive Z axis) it has to return the node for the face
between it and the block at (0, 0, 1).side
- the side to get the node for.Environment.node()
boolean canConnect(net.minecraftforge.common.util.ForgeDirection side)
sidedNode(net.minecraftforge.common.util.ForgeDirection)
, and for each side it
returns true for it should return a node.
This is intended for the client side, i.e. rendering related things,
since nodes are not created on the client side.
The side is relative to the environment, same as for sidedNode.side
- the side to check for.