li.cil.oc.api.machine
| Modifier and Type | Method and Description |
|---|---|
int |
installedMemory()
The amount of memory (RAM) made available to the machine, in bytes.
|
void |
markAsChanged()
This is called by the machine when its state changed (which can be
multiple times per actual game tick), to notify the owner that it should
save its state on the next world save.
|
int |
maxComponents()
The number of components the machine can address without crashing.
|
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. |
net.minecraft.world.World |
world()
The world the machine is running in, e.g.
|
int |
x()
The X coordinate of this machine owner in the world, in block coordinates.
|
int |
y()
The Y coordinate of this machine owner in the world, in block coordinates.
|
int |
z()
The Z coordinate of this machine owner in the world, in block coordinates.
|
int x()
int y()
int z()
net.minecraft.world.World world()
int installedMemory()
int maxComponents()
void markAsChanged()
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.