fix #3429
This commit is contained in:
parent
293ab80985
commit
cc9df443f7
1 changed files with 13 additions and 4 deletions
|
@ -209,26 +209,35 @@ public class DockingStationPipe extends DockingStation implements IRequestProvid
|
|||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
if (getPipe() == null || getPipe().getPipe() == null) {
|
||||
IPipeTile pipe = getPipe();
|
||||
if (pipe == null || pipe.getPipe() == null) {
|
||||
return false;
|
||||
}
|
||||
return ((Pipe<?>) getPipe().getPipe()).isInitialized();
|
||||
return ((Pipe<?>) pipe.getPipe()).isInitialized();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean take(EntityRobotBase robot) {
|
||||
IPipeTile pipe = getPipe();
|
||||
if (pipe == null)
|
||||
return false;
|
||||
|
||||
boolean result = super.take(robot);
|
||||
if (result) {
|
||||
getPipe().scheduleRenderUpdate();
|
||||
pipe.scheduleRenderUpdate();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean takeAsMain(EntityRobotBase robot) {
|
||||
IPipeTile pipe = getPipe();
|
||||
if (pipe == null)
|
||||
return false;
|
||||
|
||||
boolean result = super.takeAsMain(robot);
|
||||
if (result) {
|
||||
getPipe().scheduleRenderUpdate();
|
||||
pipe.scheduleRenderUpdate();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue