pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.26k stars 1.54k forks source link

Teleport bug & Entity bug in PM 4.22 #5810

Closed MateusBlackyOFC closed 1 year ago

MateusBlackyOFC commented 1 year ago

Expected Result: The boss should leave the place and practice pvp with the player Actual Result: the entity stayed in its original place, invisible, hitting the player, and you could only kill the entity by hitting the place where it is spawned

videos demonstrating the bug: https://youtu.be/3nFj4tneAzU & https://youtu.be/xaBRuX-pDP4

This bug did not occur in api 4.21, but only in api 4.22 (MCPE 1.20)

Server version: 4.22.0 Compatible Minecraft version: 1.20.0 (protocol version: 589) PHP version: 8.1.19 PHP JIT: not supported Operating system: linux

MateusBlackyOFC commented 1 year ago

I only tested with the plugin that I believe has the problem Look at the boss bar, pay attention to this video please. Link: https://youtu.be/KAv6dywXf4c

aabstractt commented 1 year ago

I have the same issue and I produce it when launch a Pearl

MateusBlackyOFC commented 1 year ago

I have the same issue and I produce it when launch a Pearl

Note: I found out that my problem is teleport-related, so me and this guy have the same error.

DaisukeDaisuke commented 1 year ago

How to reproduce

TheLemzz commented 1 year ago

It's the same for me. After any teleportation, the player hangs (visually) in one place.

Verciak commented 1 year ago

It's the same for me.

dktapps commented 1 year ago

If you don't have any detail to add, please don't post "me too" comments, they just clutter the issue. You can vote for the issue by using the 👍🏻 reaction.

dktapps commented 1 year ago

This looks like the same issue as #4986 , which means the cause probably comes from #4394. This suggests that the issue probably existed prior to 1.20, but some change in 1.20 caused it to become a lot more prevalent.

enchypl commented 1 year ago

In the bedwars plugin after dying the entity stays at its spawn position put on the entities screen it's moving just fine it can hit others but others can't hit it . The entity is invisible to others this only happens when the other client is on the newly released 1.20 . I personally tried doing a roll back to 1.19 and the issue stopped. Hope this helps

enchypl commented 1 year ago

In the bedwars plugin after dying the entity stays at its spawn position put on the entities screen it's moving just fine it can hit others but others can't hit it . The entity is invisible to others this only happens when the other client is on the newly released 1.20 . I personally tried doing a roll back to 1.19 and the issue stopped. Hope this helps

The issue probably has happened before according to Minecraft bug forum this issue was reported in 1.17 and 1.19.41.

dktapps commented 1 year ago

Initial investigation reveals the following:

Options: 1) Remove despawn/respawn hack (reintroduces #4394) a) Removing FLAG_TELEPORT solves #4394 , but causes every entity to have movement interpolation (visual glitch) b) Not removing it causes #4394 due to client-side race conditions 2) Use MovePlayerPacket to send out teleport movement updates (untested yet) 3) Rotate actor network runtime IDs during teleports. This has been confirmed to work by community developers, but is an ugly solution to the problem. However, this would break code one way or another: a) Changing the return of Entity->getId() would break plugins which use ID for array indexing and such, which is not an option b) Adding a second method Entity->getNetworkId() is a possible solution, but breaks all packet code which continues to use getId() in a non-obvious manner

There doesn't seem to be any good solution to this that covers all bases.