public interface MachineAPI
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Class<? extends Architecture> architecture)
Register an architecture that can be used to create new machines.
|
java.util.Collection<java.lang.Class<? extends Architecture>> |
architectures()
A list of all registered architectures.
|
Machine |
create(MachineHost host)
Creates a new machine for the specified host.
|
java.lang.String |
getArchitectureName(java.lang.Class<? extends Architecture> architecture)
Get the name of the specified architecture.
|
void add(java.lang.Class<? extends Architecture> architecture)
architectures()
to be useful.architecture
- the architecture to register.java.lang.IllegalArgumentException
- if the specified architecture is invalid.java.util.Collection<java.lang.Class<? extends Architecture>> architectures()
create(li.cil.oc.api.machine.MachineHost)
with a not yet
registered architecture. What this means is that unless a mod providing
a custom architecture also registers it, you may not see it in this list
until it also created a new machine using that architecture.java.lang.String getArchitectureName(java.lang.Class<? extends Architecture> architecture)
architecture
- the architecture to get the name for.Machine create(MachineHost host)
host
- the owner object of the machine, providing context.java.lang.IllegalArgumentException
- if the specified architecture is invalid.