Prevent accepting items from the front

This commit is contained in:
Patrick 'Quezler' Mounier 2020-01-05 10:32:58 +01:00
parent 4494503e6b
commit 2b4401c753
No known key found for this signature in database
GPG Key ID: 0D6CA7326C76D8EA

View File

@ -143,12 +143,11 @@ public class CraterConveyor extends BaseConveyor{
// prevent this tile from spawning a new crater to avoid collisions
entity.reload = 1;
e.reload = 1;
// transfer inventory of conveyor
e.items.addAll(entity.items);
entity.items.clear();
e.reload = 1;
}
}
}
@ -192,6 +191,7 @@ public class CraterConveyor extends BaseConveyor{
if(!isStart(tile) && !(source.block() instanceof CraterConveyor)) return false;
if(entity.items.total() > 0 && !entity.items.has(item)) return false;
if(entity.items.total() >= getMaximumAccepted(tile, item)) return false;
if(tile.front() == source) return false;
return true;
}