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

Damage pipeline improvements #1177

Merged

Conversation

Caltinor
Copy link
Contributor

@Caltinor Caltinor commented Jun 24, 2024

This PR contains bugfixes and QOL improvements following the rollout of the damage pipeline update.

Bugfixes

  • Fixes incorrect storing and application of reduction modifications
  • Fixes absorption handling not properly reducing absorption value
  • Adds comprehensive gametest for the damage pipeline. (note: since invulnerability and shield block already have tests, those are still standalone)
  • Fixed armor consumption being higher than vanilla

QOL Features

  • Removed @ApiStatus.Internal from DamageContainer
  • Added helper methods to LivingDamageEvent.Pre to reduce the bulk of calling event.getContainer().getXYZ()
  • Removed arbitrary constraint on reduction values which prevented negative values

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@pupnewfster pupnewfster added bug A bug or error blocks stable Blocks stable release 1.21 Targeted at Minecraft 1.21 labels Jun 24, 2024
@pupnewfster pupnewfster added this to the 1.21 Stable Release milestone Jun 24, 2024
@Caltinor Caltinor marked this pull request as ready for review June 30, 2024 11:49
Copy link

@Tslat Tslat left a comment

Choose a reason for hiding this comment

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

Should we change new ArrayList() to List.of() in DamageContainer#modifyReduction to eliminate the unnecessary object creation?

@Caltinor Caltinor requested a review from Tslat July 2, 2024 22:16
Copy link

@Tslat Tslat 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 to me
Another set of eyes wouldn't hurt, but I'm good from here

TelepathicGrunt
TelepathicGrunt previously approved these changes Jul 5, 2024
Co-authored-by: TelepathicGrunt <[email protected]>
@TelepathicGrunt TelepathicGrunt merged commit 6b09a51 into neoforged:1.21.x Jul 5, 2024
6 checks passed
@Caltinor Caltinor deleted the damage-pipeline-improvements branch July 5, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21 Targeted at Minecraft 1.21 blocks stable Blocks stable release bug A bug or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.21 Armor is taking extra damage beyond what vanilla does when player is hit
4 participants