Problem with /cave go
Expected behavior
/cave go don't work if i place block around my cave home
Observed/Actual behavior
caveblock should be looking free space and it doesn't it should properly detect that there is empty space near blocked area
Steps/models to reproduce
Step by step:
- /cave go
- put the block in the place of the house
- /cave go
- put the block in the place of the house
- /cave go
- you will be teleported above bedrock
I geting this messages if i use /cave go You have reached the top of your cave. You cannot get higher!

BentoBox version
[14:34:05 INFO]: Running PAPER 1.18.2. [14:34:05 INFO]: BentoBox version: 1.20.1 [14:34:05 INFO]: Database: JSON [14:34:05 INFO]: Loaded Game Worlds: [14:34:05 INFO]: caveblock-world (CaveBlock): Caveworld, Nether, End [14:34:05 INFO]: Loaded Addons: [14:34:05 INFO]: CaveBlock 1.17.0-SNAPSHOT-LOCAL (ENABLED) [14:34:05 INFO]: Level 2.9.1-SNAPSHOT-b500 (ENABLED)
Plugin list
No response
Other
No response
This happens because of SafeSpotTeleport logic. Currently, it searches all valid spots in the Y coordinate first, and only then move to the next block. This creates an issue, if all spots from bottom to top is blocked and the only valid option is above bedrock.
In skyBlock worlds it is not an issue, however, in Boxed and Cave it is a huge issue.
I will rewrite the safe spot logic and it will search the area around the spawn location. It means that #1984 will be denied.
Fixed with bf87cca