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

feat: fall damage reduction for blocks #374

Merged
merged 7 commits into from
Sep 11, 2024

Conversation

KoshakMineDEV
Copy link
Contributor

  • Added getFallDamageReductionFactor instead of canResetFallDistance()
  • Added Hay Bale Block as example how it will work
  • Reworked fall damage calculation

- Added getFallDamageReductionFactor instead of canResetFallDistance()
- Added Hay Bale Block as example how it will work
- Reworked fall damage calculation
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 40.74074% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...r/block/component/BlockStateDataComponentImpl.java 8.33% 11 Missing ⚠️
...er/entity/component/EntityDamageComponentImpl.java 0.00% 5 Missing ⚠️
Files with missing lines Coverage Δ Complexity Δ
...llaymc/api/block/component/BlockBaseComponent.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...laymc/api/block/component/data/BlockStateData.java 86.36% <ø> (ø) 4.00 <0.00> (ø)
...server/block/component/BlockBaseComponentImpl.java 8.16% <ø> (+0.16%) 2.00 <0.00> (ø)
...ver/block/component/BlockHayBaseComponentImpl.java 100.00% <100.00%> (ø) 1.00 <1.00> (?)
...r/block/component/BlockSlimeBaseComponentImpl.java 33.33% <ø> (+4.76%) 1.00 <0.00> (ø)
...llaymc/server/block/type/BlockTypeInitializer.java 100.00% <100.00%> (ø) 39.00 <1.00> (+1.00)
...rver/entity/component/EntityBaseComponentImpl.java 15.58% <ø> (+0.14%) 9.00 <0.00> (ø)
...er/entity/component/EntityDamageComponentImpl.java 1.36% <0.00%> (-0.08%) 1.00 <0.00> (ø)
...r/block/component/BlockStateDataComponentImpl.java 33.33% <8.33%> (-8.34%) 9.00 <1.00> (+1.00) ⬇️

... and 1 file with indirect coverage changes

Copy link
Member

@smartcmd smartcmd left a comment

Choose a reason for hiding this comment

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

See above

@smartcmd
Copy link
Member

smartcmd commented Sep 7, 2024

And please test player falling on seabed, I think your code won't works

@smartcmd
Copy link
Member

smartcmd commented Sep 7, 2024

And please test player falling on seabed, I think your code won't works

I think you can also add a property called canResetFallDistance

@smartcmd smartcmd changed the base branch from master to feat/fall-damage-reduction September 11, 2024 03:50
@smartcmd smartcmd merged commit d08c723 into AllayMC:feat/fall-damage-reduction Sep 11, 2024
2 checks passed
smartcmd added a commit that referenced this pull request Sep 11, 2024
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