Lea-fish / Leafish

A minecraft-like multi version client implemented in Rust.
Apache License 2.0
824 stars 46 forks source link

Missing teleport confirmation #344

Open terrarier2111 opened 8 months ago

terrarier2111 commented 8 months ago

1.8 on server with viarewind doesn't respond to teleports with teleport success correctly (the client itself doesn't have to send a teleport confirm) but viarewind doesn't send this packet either, also CHUNK_BATCH_ACK packets are missing normal login flow:

22:41:37] [Server thread/INFO]: terrarier2111[/127.0.0.1:49248] logged in with entity id 811 at ([world]-10.204472588966912, 71.0, 0.4496170201609695)
[22:41:37] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:38] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:39] [Netty Epoll Server IO #1/INFO]: terrarier2111: CLIENT_SETTINGS
[22:41:39] [Netty Epoll Server IO #1/INFO]: terrarier2111: PLUGIN_MESSAGE
[22:41:39] [Netty Epoll Server IO #1/INFO]: terrarier2111: HELD_ITEM_CHANGE
[22:41:39] [Netty Epoll Server IO #1/INFO]: slot: 7
[22:41:39] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:39] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:40] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:40] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:40] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:40] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:40] [Netty Epoll Server IO #1/INFO]: terrarier2111: CHUNK_BATCH_ACK
[22:41:41] [Netty Epoll Server IO #1/INFO]: terrarier2111: TELEPORT_CONFIRM
[22:41:41] [Netty Epoll Server IO #1/INFO]: pos: X: -10.204472588966912, Y: 71.0, Z: 0.4496170201609695
[22:41:41] [Netty Epoll Server IO #1/INFO]: yaw: -146.25093
[22:41:41] [Netty Epoll Server IO #1/INFO]: pitch: 67.383354
[22:41:41] [Netty Epoll Server IO #1/INFO]: terrarier2111: PLAYER_POSITION_AND_ROTATION
[22:41:41] [Netty Epoll Server IO #1/INFO]: pos: X: -10.204472588966912, Y: 71.0, Z: 0.4496170201609695
[22:41:41] [Netty Epoll Server IO #1/INFO]: yaw: -146.25093
[22:41:41] [Netty Epoll Server IO #1/INFO]: pitch: 67.383354
[22:41:41] [Netty Epoll Server IO #1/INFO]: terrarier2111: PLAYER_POSITION_AND_ROTATION
[22:41:41] [Netty Epoll Server IO #1/INFO]: terrarier2111: PLAYER_FLYING
[22:41:41] [Netty Epoll Server IO #1/INFO]: terrarier2111: PLAYER_FLYING

leafish login flow:

22:40:24] [Server thread/INFO]: testingman45[/[0:0:0:0:0:0:0:1%0]:43928] logged in with entity id 763 at ([world]6.5, 70.0, 2.5)
[22:40:24] [Netty Epoll Server IO #0/INFO]: testingman45: CHUNK_BATCH_ACK
[22:40:24] [Netty Epoll Server IO #0/INFO]: testingman45: CLIENT_SETTINGS
[22:40:24] [Netty Epoll Server IO #0/INFO]: testingman45: PLUGIN_MESSAGE
[22:40:24] [Netty Epoll Server IO #0/INFO]: testingman45: HELD_ITEM_CHANGE
[22:40:24] [Netty Epoll Server IO #0/INFO]: slot: 8
[22:40:24] [Netty Epoll Server IO #0/INFO]: pos: X: 6.5, Y: 70.0001, Z: 2.5
[22:40:24] [Netty Epoll Server IO #0/INFO]: yaw: 5.7796865
[22:40:24] [Netty Epoll Server IO #0/INFO]: pitch: 0.0
[22:40:24] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_POSITION_AND_ROTATION
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: CHUNK_BATCH_ACK
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: CHUNK_BATCH_ACK
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: CHUNK_BATCH_ACK
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: CHUNK_BATCH_ACK
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: CHUNK_BATCH_ACK
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING
[22:40:25] [Netty Epoll Server IO #0/INFO]: testingman45: PLAYER_FLYING

here's a link tosome code part that might be relevant: https://github.com/ViaVersion/ViaRewind/blob/master/common/src/main/java/com/viaversion/viarewind/protocol/protocol1_8to1_9/packets/PlayerPackets.java

terrarier2111 commented 8 months ago

The teleport confirm gets sent when a PLAYER_POSITION_AND_ROTATION is sent, but even if it is sent, the CHUNK_BATCH_ACK packets are very much missing, leading to the client constantly being teleported back