Fix unloading prematurely

This commit is contained in:
Patrick 'Quezler' Mounier 2020-03-05 13:22:50 +01:00
parent bcb87f8f76
commit b0becbad38
No known key found for this signature in database
GPG Key ID: 0D6CA7326C76D8EA

View File

@ -172,16 +172,14 @@ public class CraterConveyor extends Block implements Autotiler{
if(shouldLaunch(tile)){
// when near the center of the target tile...
if(entity.reload < 0.25f){
if(entity.blendbit2 != 5 && (entity.from != tile.pos() || entity.blendbit2 == 6)){ // ...and if its not a crater conveyor, start unloading (everything)
while(true) if(!tryDump(tile)) break;
// close enough to the center && is unloading dock && didn't originate here
if(entity.reload < 0.25f && entity.blendbit2 == 6 && entity.from != tile.pos()){
while(true) if(!tryDump(tile)) break; // unload as much as possible
if(entity.items.total() == 0){
Effects.effect(Fx.plasticburn, tile.drawx(), tile.drawy());
bump(tile);
}
}
}
Tile destination = tile.front();