Skip to content

Health System - #394

Closed
kirawi wants to merge 41 commits into
feather-rs:mainfrom
kirawi:main
Closed

kirawi wants to merge 41 commits into
feather-rs:mainfrom
kirawi:main

Conversation

@kirawi

@kirawi kirawi commented Mar 8, 2021

Copy link
Copy Markdown
Contributor

Health System

Status

  • Ready
  • Development
  • Hold

Description

Implements systems and events for handling updates to an entity's health, as well as systems that handle a player's hunger.

Related issues

Resolves #358

Checklist

  • Ran cargo fmt, cargo clippy, 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)

Will be fleshed out with details once ready for review.

@ambeeeeee ambeeeeee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I overall am a little worried about using constants, but I'm not sure to explain what I mean.

A few questions:

  1. How would this work with creative mode
    • How would this work with void damage in creative mode.
  2. If you were a server owner who wanted to disable hunger, could you do it easily?
  3. What if the no regen gamerule was on?

These arent meant to quiz your solution, just questions to think about to ensure flexibility.

Comment thread feather/common/src/events.rs Outdated
Comment thread feather/server/src/systems/health.rs Outdated
Comment thread quill/common/src/components.rs Outdated
@ambeeeeee
ambeeeeee requested a review from Defman March 10, 2021 02:13
@kirawi

kirawi commented Apr 6, 2021

Copy link
Copy Markdown
Contributor Author

Thoughts on the events? I decided to put the ones Feather needed inside a mod as events inside quill, so it should be accessible to plugins, I think. People can still make their own custom ones if they want.

One question though, what is needed to get this working for non-player entities? Any special packets, etc. From what I understand, I'll need to implement EntityProperties as well as LivingEntity metadata, is this correct?

Comment thread feather/protocol/src/packets/server/play.rs
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
Comment thread feather/protocol/src/packets/server/play.rs Outdated
@kirawi

kirawi commented Apr 9, 2021

Copy link
Copy Markdown
Contributor Author

Depends upon #410

@kirawi

kirawi commented Apr 12, 2021

Copy link
Copy Markdown
Contributor Author

Seems like the only things left to be implemented are the hunger system, handling entity properties, updating relevant entity metadata, and fall damage. Maybe I'll implement an example plugin as well. That should be it for an initial health system.

@kirawi kirawi changed the title Health/Hunger System Health System Jun 10, 2021
@kirawi

kirawi commented Jun 24, 2021

Copy link
Copy Markdown
Contributor Author

This is going to be entirely rewritten from the ground up, it would be harder to use this PR to track it.

@kirawi kirawi closed this Jun 24, 2021
@kirawi kirawi mentioned this pull request Jul 13, 2021
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.

Health and Death

3 participants