public interface MachineHost extends EnvironmentHost
| Modifier and Type | Method and Description |
|---|---|
double |
callBudget()
This determines how many direct calls the machine can make per tick.
|
int |
componentSlot(java.lang.String address)
Get the slot a component with the specified address is in.
|
java.lang.Class<? extends Architecture> |
cpuArchitecture()
Get the architecture to use in the hosted machine.
|
int |
installedMemory()
The amount of memory (RAM) made available to the machine, in bytes.
|
void |
markForSaving()
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. |
markChanged, world, xPosition, yPosition, zPositionjava.lang.Class<? extends Architecture> cpuArchitecture()
double callBudget()
int installedMemory()
int maxComponents()
int componentSlot(java.lang.String address)
address - the address of the component to get the slot for.void markForSaving()
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.