add BlockFalling check for MovementFall, fixes #94
This commit is contained in:
parent
85cf5322f9
commit
f834bcec08
@ -30,6 +30,7 @@ import baritone.utils.InputOverrideHandler;
|
||||
import baritone.utils.Rotation;
|
||||
import baritone.utils.Utils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFalling;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@ -65,6 +66,9 @@ public class MovementFall extends Movement {
|
||||
if (frontTwo >= COST_INF) {
|
||||
return COST_INF;
|
||||
}
|
||||
if (BlockStateInterface.get(positionsToBreak[0].up()).getBlock() instanceof BlockFalling) {
|
||||
return COST_INF;
|
||||
}
|
||||
for (int i = 2; i < positionsToBreak.length; i++) {
|
||||
// TODO is this the right check here?
|
||||
// miningDurationTicks is all right, but shouldn't it be canWalkThrough instead?
|
||||
|
Loading…
Reference in New Issue
Block a user