Skip to content

Commit

Permalink
修复踩边问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Sobadfish committed Feb 20, 2023
1 parent 2a36008 commit 1d5b23f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ private static class BlockSetRunnable extends PluginTask<TntRunMain>{

private Block getBlockUnderPlayer(int y, Location location) {
Position loc = new Position(location.getX(), y, location.getZ(),location.level);
Block b11 = loc.add(+PLAYER_BOUNDINGBOX_ADD, -PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
Block b11 = loc.add(+PLAYER_BOUNDINGBOX_ADD,0, -PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
if (b11.getId() != BlockID.AIR) {
return b11;
}
Block b12 = loc.add(-PLAYER_BOUNDINGBOX_ADD, +PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
Block b12 = loc.add(-PLAYER_BOUNDINGBOX_ADD,0, +PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
if (b12.getId() != BlockID.AIR) {
return b12;
}
Block b21 = loc.add(+PLAYER_BOUNDINGBOX_ADD, +PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
Block b21 = loc.add(+PLAYER_BOUNDINGBOX_ADD,0, +PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
if (b21.getId() != BlockID.AIR) {
return b21;
}
Block b22 = loc.add(-PLAYER_BOUNDINGBOX_ADD, -PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
Block b22 = loc.add(-PLAYER_BOUNDINGBOX_ADD,0, -PLAYER_BOUNDINGBOX_ADD).getLevelBlock();
if (b22.getId() != BlockID.AIR) {
return b22;
}
Expand Down

0 comments on commit 1d5b23f

Please sign in to comment.