More misc cleanup
This commit is contained in:
@@ -283,7 +283,7 @@ public class StackConveyor extends Block implements Autotiler{
|
||||
|
||||
@Override
|
||||
public void handleItem(Building source, Item item){
|
||||
if(items.empty()) poofIn();
|
||||
if(items.empty() && tile != null) poofIn();
|
||||
super.handleItem(source, item);
|
||||
lastItem = item;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class StackConveyor extends Block implements Autotiler{
|
||||
@Override
|
||||
public void handleStack(Item item, int amount, Teamc source){
|
||||
if(amount <= 0) return;
|
||||
if(items.empty()) poofIn();
|
||||
if(items.empty() && tile != null) poofIn();
|
||||
super.handleStack(item, amount, source);
|
||||
lastItem = item;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class LogicBlock extends Block{
|
||||
config(Integer.class, (LogicBuild entity, Integer pos) -> {
|
||||
//if there is no valid link in the first place, nobody cares
|
||||
if(!entity.validLink(world.build(pos))) return;
|
||||
Building lbuild = world.build(pos);
|
||||
var lbuild = world.build(pos);
|
||||
int x = lbuild.tileX(), y = lbuild.tileY();
|
||||
|
||||
LogicLink link = entity.links.find(l -> l.x == x && l.y == y);
|
||||
@@ -62,8 +62,7 @@ public class LogicBlock extends Block{
|
||||
}
|
||||
}else{
|
||||
entity.links.remove(l -> world.build(l.x, l.y) == lbuild);
|
||||
LogicLink out = new LogicLink(x, y, entity.findLinkName(lbuild.block), true);
|
||||
entity.links.add(out);
|
||||
entity.links.add(new LogicLink(x, y, entity.findLinkName(lbuild.block), true));
|
||||
}
|
||||
|
||||
entity.updateCode(entity.code, true, null);
|
||||
|
||||
Reference in New Issue
Block a user