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

Survival block breaking #510

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Survival block breaking #510

wants to merge 18 commits into from

Conversation

koskja
Copy link
Contributor

@koskja koskja commented Jan 2, 2022

Implementing breaking blocks in survival

Status

  • Ready
  • Development
  • Hold

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)

Greatly simplify code
Add an ad hoc gamemode changing system
@Defman
Copy link
Member

Defman commented Aug 29, 2022

Is this something you want me to look at soon?

@koskja
Copy link
Contributor Author

koskja commented Aug 29, 2022

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.

Copy link
Member

@Defman Defman left a 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.

@koskja
Copy link
Contributor Author

koskja commented Aug 29, 2022

Anything else?

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