mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-28 05:25:21 +01:00
Use player BoundingBox to simplify code, instead of creating new boundingBox from player location.
This commit is contained in:
parent
f16417b630
commit
13faf478ee
@ -696,15 +696,8 @@ public class TryToComplete
|
||||
*/
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user