Collapse if

This commit is contained in:
Patrick 'Quezler' Mounier 2020-03-06 14:59:12 +01:00
parent c1f025db52
commit 73414d7c2a
No known key found for this signature in database
GPG Key ID: 0D6CA7326C76D8EA

View File

@ -287,10 +287,9 @@ public class CraterConveyor extends Block implements Autotiler{
// awaken inputting conveyors
private void bump(Tile tile){
upstream(tile, t -> {
if(t != null && t.entity != null && t.entity.isSleeping() && t.entity.items.total() > 0){
t.entity.noSleep();
bump(t);
}
if(t == null || t.entity == null || !t.entity.isSleeping() || t.entity.items.total() <= 0) return;
t.entity.noSleep();
bump(t);
});
}