GeezerVison is showing github.com — Issues with joining server / loading terrain · Issue #71 · feather-rs/feather
Issues with joining server / loading terrain #71DescriptionNote: I generated the world using a 1.13.2 client, and tried the same using a server-generated world. Here's a zip containing the world if it's of any help: world.zip
When I try to join, it hangs on Loading terrain for a while, displaying the following warnings:
2019-08-19 21:50:14,795 INFO [feather_server::network] Accepting connection from 127.0.0.1:59652
2019-08-19 21:50:15,647 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: -6, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:15,898 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: -5, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:16,199 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: -4, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:16,499 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: -3, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:16,749 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: -2, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:17,100 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: -1, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:17,399 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: 0, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:17,700 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: 1, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:17,952 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: 2, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:18,301 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: 3, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:18,652 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: 4, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:18,902 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: 5, z: 6 }: The specified chunk does not exist in the world save
2019-08-19 21:50:19,152 WARN [feather_server::chunk_logic] Failed to load chunk at ChunkPosition { x: 6, z: 6 }: The specified chunk does not exist in the world save
From what I understand, this warning is thrown when a chunk is specified in the region's header, but the chunk's offset and sector_count are 0.
After a few seconds, the player gets kicked for "moving too fast". From my debugging, it seems like the player's initial position is 0.0/64.0/0.0, and the first movement packet gives 8.50/65.0/8.50 Activitycaelunshun commented on Aug 20, 2019 There's a few of causes of this issue:
- When chunks aren't found in the world save, there isn't any mechanism which handles that. As a result, the server never spawns the player, because it detects that not all pending chunks have been sent. This leads to the hanging behavior.
- The world spawn position is not respected, so it just defaults to (0, 64, 0). The spawn position for your save is (48, 75, -160), so chunks are generated around that position rather than the origin.
By changing the view distance to 5, I was able to join using your world—those chunks do exist in the save.
This can be fixed by skipping chunks not existing in the region save and respecting the spawn position, which I'm doing right now.
As for the "moved too fast" kick, I'm not sure of the cause. It only happens when chunks aren't loaded—with view distance set to 5, joining is successful. I'll look into this more. aramperes commented on Aug 20, 2019 ContributorAuthor More actions Ah, that makes sense. I switched back to the Vanilla server to generate the chunks around 0/0. The "moving too fast" kick does in fact only happen if spawning in un-generated terrain.
I figure setting the player's position to their last known position from the player data would be tracked under a "load player data" ticket. If not position is found, it should default to finding suitable terrain around the world's spawn position (which is already loaded according to this:)
https://github.com/caelunshun/feather/blob/d3d05d34eefe2047c374a66266e35715ebd9e2b1/server/src/joinhandler.rs#L177-L181 caelunshun commented on Aug 20, 2019 Indeed. For now, I've changed it to use the spawn position from the world save rather than the current default as you described, which mitigates this issue. Of course, loading from player data files is a whole other matter. caelunshun commented on Aug 21, 2019 Closing the remainder of this issue in favor of #72.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|