stargate-rewritten / Stargate-Bukkit

The original, and still the best, survival-friendly portal plugin.
https://sgrewritten.org/paper
GNU Lesser General Public License v3.0
33 stars 12 forks source link

Stargate teleportation overridden monodimensionally by vanilla nether teleportation under inconsistant circumstances. #378

Closed Thorinwasher closed 5 months ago

Thorinwasher commented 5 months ago

Bug Description

In unclear circumstances, Stargate teleportation is overridden by vanilla transportation, resulting in the player appearing at a randomly generated vanilla nether portal in the dimension of origin.

Reproduction Steps

The reproduction steps for this issue are poorly understood at present. This is likely related to the 1.21 nether portal rewrite. We will try to troubleshoot this tomorrow.

  1. In the nether's spawn chunks, create a fixed interdimensional nether.gate stargate at y 75 facing east.
  2. SLOWLY walk through the nether portal while your character faces as close to east as possible.

    [!WARNING]

    • This behaviour does not reproduce if you run, fly, swim, or jump through the portal.
    • This behaviour does not reproduce if you are facing any direction other than east, or if your portal is.
    • This behaviour also does not appear to reproduce for mounted entities, or entities in their own right (minecarts).

Desired Behaviour

  1. Under every circumstance, anything that goes through this portal should end up at the destination portal in the overworld.

Observed Behaviour

From what we can gather at this time:

  1. The plugin's teleportation logic occurs correctly, resulting (at least in theory) in the player teleporting to the destination stargate in the overworld for aproximately one tick.
  2. For some reason, regardless of the material of the destination portal, the game then simulates a vanilla nether portal teleportation event from the destination location.
  3. The player then appears in the dimension of origin at the closest nether portal *to the destination stargate, again, regardless of the absence of vanilla portal material, at a location calculated according to vanilla portal logic (world divided by eight, aproximately).
  4. If there is not a vanilla portal at the vanilla calculated destination, vanilla will generate a new nether portal, wherefrom the player will appear.

For players, this simply feels like entering certain stargates in the nether spits them out at a random freshly generated vanilla portal in the nether.

It remains to be seen if this behaviour impacts other dimensions. It remains to be seen if this behaviour impacts other vanilla portal types. It remains to be seen if this behaviour is present in legacy.

Trace Logs

This almost certainly has something to do with minecraft's portal reimplementation. At this time, minimal information is available; we will investigate further tommorow and update this section with more information.

Other Information

This was tested with the latest nightly on spigot 1.21. This issue has yet to have been tested on paper 1.21 and legacy. It is unclear if this issue reproduces on versions >= 1.20.5 This issue DOES NOT reproduce on versions <= 1.20.4

Pheotis commented 5 months ago

For now, this appears to be an upstream issue. This will just be monitored for now https://hub.spigotmc.org/jira/projects/SPIGOT/issues/SPIGOT-7785