Bugifx: unloader dont backflow into unlinked container (#11652)
This commit is contained in:
@@ -143,7 +143,7 @@ public class Unloader extends Block{
|
|||||||
if(!other.interactable(team)) continue; //avoid blocks of the wrong team
|
if(!other.interactable(team)) continue; //avoid blocks of the wrong team
|
||||||
|
|
||||||
//partial check
|
//partial check
|
||||||
boolean canLoad = !(other instanceof CoreBuild || (other instanceof StorageBuild sb && sb.linkedCore != null));
|
boolean canLoad = !(other instanceof CoreBuild || other instanceof StorageBuild);
|
||||||
boolean canUnload = other.canUnload() && (allowCoreUnload || canLoad) && other.items != null;
|
boolean canUnload = other.canUnload() && (allowCoreUnload || canLoad) && other.items != null;
|
||||||
|
|
||||||
if(canLoad || canUnload){ //avoid blocks that can neither give nor receive items
|
if(canLoad || canUnload){ //avoid blocks that can neither give nor receive items
|
||||||
|
|||||||
Reference in New Issue
Block a user