Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity equipment #495

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Entity equipment #495

wants to merge 6 commits into from

Conversation

tim-kt
Copy link

@tim-kt tim-kt commented Sep 28, 2021

Entity equipment

Status

  • Ready
  • Development
  • Hold

Description

This PR implements entity equipment packets (i.e. armor, items in the main hand and off-hand).

Related issues

Closes #494

Checklist

  • Ran cargo fmt, cargo clippy --all-targets, cargo build --release and cargo test and fixed any generated errors!
  • Removed unnecessary commented out code
  • Used specific traces (if you trace actions please specify the cause i.e. the player)

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.

@tim-kt
Copy link
Author

tim-kt commented Sep 28, 2021

Missing features:

  • Support for survival
  • Send an EntityEquipment packet to players joining
  • Send EntityEquipment packets for other entites

@tim-kt tim-kt marked this pull request as draft September 28, 2021 18:47
Copy link
Contributor

@ambeeeeee ambeeeeee left a comment

Choose a reason for hiding this comment

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

I know this isn't done, just wanted to suggest a change.

Awesome work so far, I just have one suggestion that should help prevent bugs since there is a requirement on the struct that cannot be enforced at the type level and thus needs to be enforced manually.

feather/protocol/src/packets/server/play.rs Show resolved Hide resolved
feather/server/src/client.rs Outdated Show resolved Hide resolved
Implemented safe EntityEquipment constructor
Removed handle_held_item_change() test
@ambeeeeee
Copy link
Contributor

Can you write "Closes #494" so github gets the idea about automatically closing the issue?

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.

Send entity equipment packet
2 participants