Try to clean up the end of tile logic

This commit is contained in:
Patrick 'Quezler' Mounier 2020-03-06 09:52:28 +01:00
parent 11fc494284
commit f50ee2ecf2
No known key found for this signature in database
GPG Key ID: 0D6CA7326C76D8EA

View File

@ -159,14 +159,12 @@ public class CraterConveyor extends Block implements Autotiler{
if(entity.reload > 0f) return; if(entity.reload > 0f) return;
// unload if(entity.blendbit2 == 6){ // unload
if(entity.blendbit2 == 6 && entity.from != tile.pos()){ while(true){
while(true) if(!tryDump(tile)) break; // unload as much as possible if(!tryDump(tile)) break;
}
if(entity.items.total() == 0) poofOut(tile); if(entity.items.total() == 0) poofOut(tile);
} }else if(shouldLaunch(tile)){ // transfer
// transfer
if(shouldLaunch(tile)){
Tile destination = tile.front(); Tile destination = tile.front();
if(destination != null && destination.getTeam() == tile.getTeam() && destination.block() instanceof CraterConveyor){ if(destination != null && destination.getTeam() == tile.getTeam() && destination.block() instanceof CraterConveyor){