diff --git a/core/src/mindustry/world/blocks/distribution/OverflowGate.java b/core/src/mindustry/world/blocks/distribution/OverflowGate.java index 0422c8f583..f6c431cb31 100644 --- a/core/src/mindustry/world/blocks/distribution/OverflowGate.java +++ b/core/src/mindustry/world/blocks/distribution/OverflowGate.java @@ -51,14 +51,14 @@ public class OverflowGate extends Block{ Building to = nearby((from + 2) % 4); boolean fromInst = src.block.instantTransfer, - canForward = to != null && to.acceptItem(this, item) && to.team == team && !(fromInst && to.block.instantTransfer), + canForward = to != null && to.team == team && !(fromInst && to.block.instantTransfer) && to.acceptItem(this, item), inv = invert == enabled; if(!canForward || inv){ Building a = nearby(Mathf.mod(from - 1, 4)); Building b = nearby(Mathf.mod(from + 1, 4)); - boolean ac = a != null && a.acceptItem(this, item) && !(fromInst && a.block.instantTransfer) && a.team == team; - boolean bc = b != null && b.acceptItem(this, item) && !(fromInst && b.block.instantTransfer) && b.team == team; + boolean ac = a != null && !(fromInst && a.block.instantTransfer) && a.team == team && a.acceptItem(this, item); + boolean bc = b != null && !(fromInst && b.block.instantTransfer) && b.team == team && b.acceptItem(this, item); if(!ac && !bc){ return inv && canForward ? to : null;