Skip to content

Commit

Permalink
Remove weird change check
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Nov 25, 2024
1 parent 074e7af commit 98a1b7f
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public final class BlockBreakAction implements WorldAction {
@Getter
private final SFVec3i blockPosition;
private final BlockFace blockBreakSideHint;
private BlockType wasBlockType = null;
private boolean finishedDigging = false;
private boolean didLook = false;
private boolean putInHand = false;
Expand All @@ -51,13 +50,7 @@ public BlockBreakAction(MovementMiningCost movementMiningCost) {
public boolean isCompleted(BotConnection connection) {
var level = connection.dataManager().currentLevel();

var currentBlockType = level.getBlockState(blockPosition).blockType();
if (wasBlockType == null) {
wasBlockType = currentBlockType;
}

return BlockTypeHelper.isEmptyBlock(currentBlockType)
|| wasBlockType != currentBlockType;
return BlockTypeHelper.isEmptyBlock(level.getBlockState(blockPosition).blockType());
}

@Override
Expand Down

0 comments on commit 98a1b7f

Please sign in to comment.