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.lang.Iterable<java.lang.Class<? extends Architecture>> |
architectures()
A list of all registered architectures.
|
Machine |
create(Owner owner,
java.lang.Class<? extends Architecture> architecture)
Creates a new machine using 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.lang.Iterable<java.lang.Class<? extends Architecture>> architectures()
create(li.cil.oc.api.machine.Owner, Class) 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.Machine create(Owner owner, java.lang.Class<? extends Architecture> architecture)
owner - the owner object of the machine, providing context.architecture - the architecture to use for running code on the machine.java.lang.IllegalArgumentException - if the specified architecture is invalid.