Skip to content

Commit

Permalink
Use player BoundingBox to simplify code, instead of creating new boun…
Browse files Browse the repository at this point in the history
…dingBox from player location.
  • Loading branch information
BONNe committed Apr 24, 2019
1 parent f16417b commit 13faf47
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -696,15 +696,8 @@ private boolean canIgnoreMeta(Material material)
*/
private ChallengeResult checkSurrounding()
{
Location playerLocation = this.user.getLocation();

// Init location in player position.
BoundingBox boundingBox = new BoundingBox(playerLocation.getBlockX(),
playerLocation.getBlockY(),
playerLocation.getBlockZ(),
playerLocation.getBlockX(),
playerLocation.getBlockY(),
playerLocation.getBlockZ());
BoundingBox boundingBox = this.user.getPlayer().getBoundingBox().clone();

// Expand position with search radius.
boundingBox.expand(this.challenge.getSearchRadius());
Expand Down

0 comments on commit 13faf47

Please sign in to comment.