@@ -58,16 +58,16 @@ public class StackConveyor extends Block implements Autotiler{
|
||||
|
||||
@Override
|
||||
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
|
||||
if(tile.build instanceof StackConveyorBuild){
|
||||
int state = ((StackConveyorBuild)tile.build).state;
|
||||
if(tile.build instanceof StackConveyorBuild b){
|
||||
int state = b.state;
|
||||
if(state == stateLoad){ //standard conveyor mode
|
||||
return otherblock.outputsItems() && lookingAtEither(tile, rotation, otherx, othery, otherrot, otherblock);
|
||||
}else if(state == stateUnload){ //router mode
|
||||
return otherblock.acceptsItems &&
|
||||
(notLookingAt(tile, rotation, otherx, othery, otherrot, otherblock) ||
|
||||
(otherblock instanceof StackConveyor && facing(otherx, othery, otherrot, tile.x, tile.y))) &&
|
||||
!(world.build(otherx, othery) instanceof StackConveyorBuild && ((StackConveyorBuild)world.build(otherx, othery)).state == stateUnload) &&
|
||||
!(world.build(otherx, othery) instanceof StackConveyorBuild && ((StackConveyorBuild)world.build(otherx, othery)).state == stateMove &&
|
||||
!(world.build(otherx, othery) instanceof StackConveyorBuild s && s.state == stateUnload) &&
|
||||
!(world.build(otherx, othery) instanceof StackConveyorBuild s2 && s2.state == stateMove &&
|
||||
!facing(otherx, othery, otherrot, tile.x, tile.y));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user