WorldBorder icon indicating copy to clipboard operation
WorldBorder copied to clipboard

Fixes related to teleport Y coordinates

Open dcoshea opened this issue 4 years ago • 3 comments

This PR includes two commits for separate issues related to the selection of the Y coordinate that the player is teleported to. Following are some brief descriptions of the commits, see the commit messages for more details.

The first commit probably fixes two reported issues, at least partially. There was a problem with teleporting to be on top of the highest block if it wasn't at the player's current Y coordinate which would result in the player being teleported to spawn instead if there were no air gaps. I think this fixes issue #178 and probably issue #115 too. On its own this is a trivial commit.

The second commit isn't associated with any reported issues, but while working on the above I noticed that the teleporting code wouldn't deal well with blocks at (assuming the standard world height of 256) Y = 254 or 255 because it insisted on checking if the blocks into which the player would be teleported (Y and Y + 1) were breathable. My fix assumes that the void above the top of the world is breathable. This certainly seems to be the case in vanilla Minecraft.

Since the second commit is more complicated and doesn't address an existing issue, I've kept it as a separate commit even though it touches the same areas of the code as the first commit and in fact replaces some of the changes made by that commit. This way, if you don't want the change from the second commit or just don't want to have to review it, just the first commit can be pulled.

I tested the first commit by verifying it made the problem I saw as described in issue #178 go away, and tested the second by building a sort of staircase ascending to Y = 255 and verifying that I was teleported up it all the way to the top (in a situation where the teleport moved me not only backwards but also sideways due to a circular border).

dcoshea avatar Apr 17 '20 00:04 dcoshea

This PR would be great. :)

andrewkm avatar Apr 17 '20 18:04 andrewkm

Subsequent commit 4551e27 says "This plugin is no longer being supported", so I guess this pull request won't be accepted, but from a quick look at the network graph I see that fork https://github.com/TheCompieter/WorldBorder seems to include my commits.

dcoshea avatar May 19 '20 09:05 dcoshea

@dcoshea Looks like using the latest compile from TheCompieter still breaks the following two things: https://ecocitycraft.com/forum/threads/drowning-at-the-edge-of-ecc-with-no-water-near-me.198543/ https://ecocitycraft.com/forum/threads/getting-stuck-under-platform-at-edge-of-ecc.198553/

Tons of videos inside :)

andrewkm avatar May 22 '20 02:05 andrewkm