BentoBoxWorld / BentoBox

Expandable Minecraft server plugin for island-type games like SkyBlock or AcidIsland.
https://bentobox.world
Eclipse Public License 2.0
334 stars 136 forks source link

Problem with /cave go #1994

Closed Incluuu closed 2 years ago

Incluuu commented 2 years ago

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:

  1. /cave go
  2. put the block in the place of the house
  3. /cave go
  4. put the block in the place of the house
  5. /cave go
  6. 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! cave home

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

BONNe commented 2 years ago

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.

BONNe commented 2 years ago

Fixed with bf87cca