[Bug][Compat] Using BetterPortals portal as bat teleports player upwards
Johni0702 opened this issue ยท 2 comments
Johni0702/BetterPortals#352
MC 1.12.2
BetterPortals allows for see-through and loading-screen-less portals by spawning fake players on the server, tunneling their packets to the client and swapping out mc.world
, mc.player
, etc. as required during ticking/rendering.
To allow for seamless transition from one world to the other, BP must, until the server acknowledges the change, rapidly swap the player entity between the new world (where it should appear to be during rendering and ticking) and the old one (where it is expected during packet handling until the server swaps them as well).
Every time this happens, Forge fires a EntityJoinWorldEvent
and the BatVampireAction
gets re-activated which teleports the player up a tiny bit:
Given the player is swapped at least twice every tick, this can quickly move you up hundreds of blocks.
Fixing this is probably fairly easy (at least it seems to be, given my limited knowledge of Vampirism's code):
This just needs to check if the player already is a bat (capabilities are preserved across swaps) before making them one.
Very sorry for the long delay, lost track of this somehow.
@Hydraheads if you are still playing with both mods, can you update to the latest version of Vampirism and check if the issue has been resolved?