GeezerVison is showing github.com — Survival block breaking by koskja · Pull Request #510 · feather-rs/feather
Conversation
koskja
commented
Jan 2, 2022
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Implementing breaking blocks in survival
Status
Description
The goal of this PR is to implement the survival mining mechanic. This depends on potion effects (haste and mining fatigue) and physics (player in water/flying). The blocks currently do not drop items on the ground, nor does mining decrease durability.
I believe that the related issues can be resolved at a later time, simply because mining is an integral part of the game and works well enough without these features.
Related issues
Original issue #351
Potion effects #430
Physics #357
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)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Gamemode hardcoded to survival for testing
Breaking blocks in survival works 90% of the time
Instamine and creative mostly untested
Time to mine blocks off by 20% for unknown reasons
Netherite tools are not included in `BlockKind::harvest_tools`
nor in `BlockKind::dig_multipliers`
Greatly simplify code
Add an ad hoc gamemode changing system
|
Is this something you want me to look at soon?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR actually feels mostly finished. I added a feature that allows the player to change their gamemode by writing 's' or 'c' in the chat, and I am not sure whether we want to keep push that to main. It does howerver seem like a good placeholder before we get actual commands. Other than that, I am happy with the rest and it is up for review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, its a bit wide as its also implementing a simple effect api. Hopefully a future API could take this simple api and improve upon it.
The code is quite self explanatory, but could be nice with a few references to the constants and etc.
I noticed the CI is complaining about noun vs no_run.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Defman
Defman approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.