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
|
@Override
|
||||||
public boolean isInitialized() {
|
public boolean isInitialized() {
|
||||||
if (getPipe() == null || getPipe().getPipe() == null) {
|
IPipeTile pipe = getPipe();
|
||||||
|
if (pipe == null || pipe.getPipe() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ((Pipe<?>) getPipe().getPipe()).isInitialized();
|
return ((Pipe<?>) pipe.getPipe()).isInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean take(EntityRobotBase robot) {
|
public boolean take(EntityRobotBase robot) {
|
||||||
|
IPipeTile pipe = getPipe();
|
||||||
|
if (pipe == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
boolean result = super.take(robot);
|
boolean result = super.take(robot);
|
||||||
if (result) {
|
if (result) {
|
||||||
getPipe().scheduleRenderUpdate();
|
pipe.scheduleRenderUpdate();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean takeAsMain(EntityRobotBase robot) {
|
public boolean takeAsMain(EntityRobotBase robot) {
|
||||||
|
IPipeTile pipe = getPipe();
|
||||||
|
if (pipe == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
boolean result = super.takeAsMain(robot);
|
boolean result = super.takeAsMain(robot);
|
||||||
if (result) {
|
if (result) {
|
||||||
getPipe().scheduleRenderUpdate();
|
pipe.scheduleRenderUpdate();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue