public interface Controller
Nanomachines.getController(net.minecraft.entity.player.EntityPlayer)
.Modifier and Type | Method and Description |
---|---|
double |
changeBuffer(double delta)
Try to apply the specified delta to the controller's buffer.
|
java.lang.Iterable<Behavior> |
getActiveBehaviors()
Get the list of currently active behaviors, based on the current input states.
|
boolean |
getInput(int index)
Get whether the input with the specified index is active.
|
int |
getInputCount(Behavior behavior)
Get the number of active inputs for the specified behavior.
|
double |
getLocalBuffer()
The amount of energy stored by this nanomachine controller.
|
double |
getLocalBufferSize()
The maximum amount of energy stored by this nanomachine controller.
|
int |
getMaxActiveInputs()
Get the total number of inputs that may be active at the same time.
|
int |
getSafeActiveInputs()
Get the number of inputs that may be active at the same time
before negative effects are applied to the player.
|
int |
getTotalInputCount()
Get the number of inputs available.
|
Controller |
reconfigure()
Reconfigure the neural connections managed by this controller.
|
boolean |
setInput(int index,
boolean value)
Set the state of the input with the specified index.
|
Controller reconfigure()
int getTotalInputCount()
int getSafeActiveInputs()
int getMaxActiveInputs()
boolean getInput(int index)
index
- the input index.java.lang.IndexOutOfBoundsException
- if index < 0
or index >= getInputCount
.boolean setInput(int index, boolean value)
index
- the input index.value
- whether the input should be active.java.lang.IndexOutOfBoundsException
- if index < 0
or index >= getInputCount
.java.lang.Iterable<Behavior> getActiveBehaviors()
int getInputCount(Behavior behavior)
behavior
- the behavior to get the number of inputs for.double getLocalBuffer()
double getLocalBufferSize()
double changeBuffer(double delta)
delta
- the amount of energy to consume or store.