use of pneumaticCraft.common.ai.DroneGoToOwner in project PneumaticCraft by MineMaarten.
the class EntityDrone method setGoingToOwner.
private void setGoingToOwner(boolean state) {
if (state && gotoOwnerAI == null) {
gotoOwnerAI = new DroneGoToOwner(this);
tasks.addTask(2, gotoOwnerAI);
dataWatcher.updateObject(21, (byte) 1);
setActiveProgram(new ProgWidgetGoToLocation());
} else if (!state && gotoOwnerAI != null) {
tasks.removeTask(gotoOwnerAI);
gotoOwnerAI = null;
dataWatcher.updateObject(21, (byte) 0);
}
}
Aggregations