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()
|
private ChallengeResult checkSurrounding()
|
||||||
{
|
{
|
||||||
Location playerLocation = this.user.getLocation();
|
|
||||||
|
|
||||||
// Init location in player position.
|
// Init location in player position.
|
||||||
BoundingBox boundingBox = new BoundingBox(playerLocation.getBlockX(),
|
BoundingBox boundingBox = this.user.getPlayer().getBoundingBox().clone();
|
||||||
playerLocation.getBlockY(),
|
|
||||||
playerLocation.getBlockZ(),
|
|
||||||
playerLocation.getBlockX(),
|
|
||||||
playerLocation.getBlockY(),
|
|
||||||
playerLocation.getBlockZ());
|
|
||||||
|
|
||||||
// Expand position with search radius.
|
// Expand position with search radius.
|
||||||
boundingBox.expand(this.challenge.getSearchRadius());
|
boundingBox.expand(this.challenge.getSearchRadius());
|
||||||
|
Loading…
Reference in New Issue
Block a user