public interface MachineHost extends EnvironmentHost
Modifier and Type | Method and Description |
---|---|
int |
componentSlot(java.lang.String address)
Get the slot a component with the specified address is in.
|
java.lang.Iterable<net.minecraft.item.ItemStack> |
internalComponents()
List of all components that are built into this machine directly.
|
Machine |
machine()
The machine currently hosted.
|
void |
onMachineConnect(Node node)
This is called on the owner when the machine's
Environment.onConnect(Node)
method gets called. |
void |
onMachineDisconnect(Node node)
Like
onMachineConnect(Node) , except that this is called whenever
the machine's Environment.onDisconnect(Node) method is called. |
markChanged, world, xPosition, yPosition, zPosition
Machine machine()
java.lang.Iterable<net.minecraft.item.ItemStack> internalComponents()
int componentSlot(java.lang.String address)
address
- the address of the component to get the slot for.void onMachineConnect(Node node)
Environment.onConnect(Node)
method gets called. This can be useful for reacting to network events
when the owner does not have its own node (for example, computer cases
expose their machine's node as their own node). This callback allows it
to connect its components (graphics cards and the like) when it is
connected to a node network (when added to the world, for example).node
- the node that was connected to the network.void onMachineDisconnect(Node node)
onMachineConnect(Node)
, except that this is called whenever
the machine's Environment.onDisconnect(Node)
method is called.node
- the node that was disconnected from the network.