feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 143 forks source link

Fix double creation of network IDs for players #470

Closed Iaiao closed 2 years ago

Iaiao commented 2 years ago

Fix double creation of network IDs for players

Status

Description

The network ID for player is created twice: for entity (in spawn callback) and for client (in create_client), causing player network IDs to be 0, 2, 4 when rejoining. This PR fixes this so that network IDs are only created in entity spawn callback.

Related issues

Checklist

Note: if you locally don't get any errors, but GitHub Actions fails (especially at clippy) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR.