mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-10 02:19:30 +01:00
Fixes bug with Safe Spot Teleport (#1951)
There was a bug that prevented finding a safe spot if all valid blocks were in height with the `startY` location. Reported via discord.
This commit is contained in:
parent
0cf1d43a29
commit
6d59e79e78
@ -226,7 +226,7 @@ public class SafeSpotTeleport {
|
|||||||
// Check the safe spot at the current height
|
// Check the safe spot at the current height
|
||||||
for (int x = 0; x < 16; x++) {
|
for (int x = 0; x < 16; x++) {
|
||||||
for (int z = 0; z < 16; z++) {
|
for (int z = 0; z < 16; z++) {
|
||||||
if (minY >= startY && checkBlock(chunk, x, startY, z)) {
|
if (minY <= startY && checkBlock(chunk, x, startY, z)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
maxY = Math.max(chunk.getHighestBlockYAt(x, z), maxY);
|
maxY = Math.max(chunk.getHighestBlockYAt(x, z), maxY);
|
||||||
|
Loading…
Reference in New Issue
Block a user