why do i even do this
This commit is contained in:
parent
3c4708fef7
commit
2d3cdddc51
@ -96,11 +96,12 @@ public class MovementAscend extends Movement {
|
|||||||
return COST_INF;
|
return COST_INF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
IBlockState srcUp2 = null;
|
||||||
if (BlockStateInterface.get(x, y + 3, z).getBlock() instanceof BlockFalling) {//it would fall on us and possibly suffocate us
|
if (BlockStateInterface.get(x, y + 3, z).getBlock() instanceof BlockFalling) {//it would fall on us and possibly suffocate us
|
||||||
// HOWEVER, we assume that we're standing in the start position
|
// HOWEVER, we assume that we're standing in the start position
|
||||||
// that means that src and src.up(1) are both air
|
// that means that src and src.up(1) are both air
|
||||||
// maybe they aren't now, but they will be by the time this starts
|
// maybe they aren't now, but they will be by the time this starts
|
||||||
if (!(BlockStateInterface.getBlock(x, y + 1, z) instanceof BlockFalling) || !(BlockStateInterface.getBlock(x, y + 2, z) instanceof BlockFalling)) {
|
if (!(BlockStateInterface.getBlock(x, y + 1, z) instanceof BlockFalling) || !((srcUp2 = BlockStateInterface.get(x, y + 2, z)).getBlock() instanceof BlockFalling)) {
|
||||||
// if both of those are BlockFalling, that means that by standing on src
|
// if both of those are BlockFalling, that means that by standing on src
|
||||||
// (the presupposition of this Movement)
|
// (the presupposition of this Movement)
|
||||||
// we have necessarily already cleared the entire BlockFalling stack
|
// we have necessarily already cleared the entire BlockFalling stack
|
||||||
@ -137,7 +138,10 @@ public class MovementAscend extends Movement {
|
|||||||
if (hasToPlace) {
|
if (hasToPlace) {
|
||||||
totalCost += context.placeBlockCost();
|
totalCost += context.placeBlockCost();
|
||||||
}
|
}
|
||||||
totalCost += MovementHelper.getMiningDurationTicks(context, x, y + 2, z, false); // TODO MAKE ABSOLUTELY SURE we don't need includeFalling here, from the falling check above
|
if (srcUp2 == null) {
|
||||||
|
srcUp2 = BlockStateInterface.get(x, y + 2, z);
|
||||||
|
}
|
||||||
|
totalCost += MovementHelper.getMiningDurationTicks(context, x, y + 2, z, srcUp2, false); // TODO MAKE ABSOLUTELY SURE we don't need includeFalling here, from the falling check above
|
||||||
if (totalCost >= COST_INF) {
|
if (totalCost >= COST_INF) {
|
||||||
return COST_INF;
|
return COST_INF;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user