Closed Iaiao closed 2 years ago
Looks okay, not sure why
PreviousGamemode
is it own type but I assume there's a reason
Because it's a component, the client uses it in F3+F4 gamemode switcher. It also allows -1 value, which means there's no previous gamemode
This does not seem to compile on the CI.
This does not seem to compile on the CI.
Seems to be the problem of the superflat file adding together str. Some get it and some don't. It hasn't changed so it shouldn't fail.
Is it ready to be merged?
Yes, it's ready
player.dat
Status
Description
This PR makes player's data (inventory, abilities, position, gamemode, previous gamemode, health) persistent by saving it to player.dat files, adds player abilities and previous gamemode component (used in F3+F4 gamemode switcher), methods client.send_abilities, client.set_hotbar_slot, world.load_player_data and world.save_player_data. This also adds
derive_more
dependency to derive Deref and DerefMut on single-field components.Related issues
Checklist
cargo fmt
,cargo clippy --all-targets
,cargo build --release
andcargo test
and fixed any generated errors!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.