Enable robots to check their energy level.
This commit is contained in:
@@ -868,6 +868,16 @@ public final class RobotEntity extends Entity implements Robot {
|
||||
return actionProcessor.rotate(direction);
|
||||
}
|
||||
|
||||
@Callback(synchronize = false)
|
||||
public int getCurrentEnergy() {
|
||||
return energy.getEnergyStored();
|
||||
}
|
||||
|
||||
@Callback(synchronize = false)
|
||||
public int getMaxEnergy() {
|
||||
return energy.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@Callback(synchronize = false)
|
||||
public int getLastActionId() {
|
||||
return actionProcessor.lastActionId;
|
||||
|
||||
Reference in New Issue
Block a user