Skip to content

Start work on player-data loading (#72); default gamemode - #96

Merged
caelunshun merged 8 commits into
feather-rs:developfrom
aramperes:feature/player-data-loading
Aug 31, 2019
Merged

caelunshun merged 8 commits into
feather-rs:developfrom
aramperes:feature/player-data-loading

Conversation

@aramperes

@aramperes aramperes commented Aug 30, 2019 •

Copy link
Copy Markdown
Contributor

Start work on loading player NBT data when it exists.

For the moment, it only loads the gamemode and last save pos, so it does not complete the scope of ticket #72. It should however be the groundwork for loading inventory data.

@aramperes

Copy link
Copy Markdown
Contributor Author

There are no tests yet because I'd like to get some feedback on the NBT-loading/component integration.

Comment thread core/src/save/player_data.rs Resolved
@codecov

codecov Bot commented Aug 30, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #96 into develop will increase coverage by 0.23%.
The diff coverage is 62.24%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #96      +/-   ##
===========================================
+ Coverage    54.63%   54.87%   +0.23%     
===========================================
  Files           55       56       +1     
  Lines         6962     7050      +88     
===========================================
+ Hits          3804     3869      +65     
- Misses        3158     3181      +23
Impacted Files Coverage Δ
core/src/lib.rs 9.8% <0%> (+9.8%) ⬆️
server/src/config.rs 87.87% <100%> (+0.37%) ⬆️
server/src/player/init.rs 100% <100%> (ø) ⬆️
server/src/joinhandler.rs 31.46% <16.66%> (+1.22%) ⬆️
core/src/save/player_data.rs 80.35% <80.35%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2136a8e...c287b94. Read the comment docs.

Comment thread server/src/joinhandler.rs Resolved
Comment thread core/src/lib.rs Resolved
Comment thread server/src/player/init.rs Resolved
Comment thread server/src/player/init.rs Resolved
Comment thread server/src/joinhandler.rs Outdated
let pos = positions.get(player).unwrap();
let spawn_block_pos = pos.current.block_pos();

let spawn_position = SpawnPosition::new(spawn_block_pos);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SpawnPosition packet is used to send the world's spawn position, i.e. the location where a compass would point to. This change should be reverted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right. The PlayerPositionAndLookClientbound packet below will need to use different values then.

@caelunshun

Copy link
Copy Markdown
Member

Thanks!

@caelunshun
caelunshun merged commit aeb52dc into feather-rs:develop Aug 31, 2019
@aramperes
aramperes deleted the feature/player-data-loading branch August 31, 2019 00:28
@aramperes aramperes mentioned this pull request Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants