fix failure to break on fall

This commit is contained in:
Leijurv 2018-09-15 09:29:03 -07:00
parent 20ecab7d53
commit 67c5a9caa0
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -165,6 +165,16 @@ public class MovementFall extends Movement {
@Override
protected boolean prepared(MovementState state) {
if (state.getStatus() == MovementStatus.WAITING) {
return true;
}
// only break if one of the first three needs to be broken
// specifically ignore the last one which might be water
for (int i = 0; i < 4 && i < positionsToBreak.length; i++) {
if (!MovementHelper.canWalkThrough(positionsToBreak[i])) {
return super.prepared(state);
}
}
return true;
}
}