Skip to content

Configurable update player attribute on held item change#11589

Closed
LoliColleen wants to merge 1 commit into
PaperMC:masterfrom
LoliColleen:fix
Closed

Configurable update player attribute on held item change#11589
LoliColleen wants to merge 1 commit into
PaperMC:masterfrom
LoliColleen:fix

Conversation

@LoliColleen
Copy link
Copy Markdown

@LoliColleen LoliColleen commented Nov 6, 2024

This fixes https://bugs.mojang.com/browse/MC-28289
With the option on, player's attributes can be updated when they change their held item slot.
This option is set to false in default because the bug is a vanilla bug.

@LoliColleen LoliColleen requested a review from a team as a code owner November 6, 2024 15:51
Copy link
Copy Markdown
Contributor

@lynxplay lynxplay left a comment

Choose a reason for hiding this comment

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

The actual diff should probably be moved into the vanilla bug fix patch we have. Fix a bunch of vanilla bugs

(Also welcome to paper, thank you for your first PR!! Glad to see it isn't in the damage calculation logic 😉 )

public boolean disableUnloadedChunkEnderpearlExploit = false;
public boolean preventTntFromMovingInWater = false;
public boolean splitOverstackedLoot = true;
+ public boolean updatePlayerAttributeOnHeldItemChange = false;
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.

This diff goes to the paper config patch.

this.player.getInventory().selected = packet.getSlot();
this.player.resetLastActionTime();
+
+ if (this.player.level().paperConfig().fixes.updatePlayerAttributeOnHeldItemChange) {
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.

This diff needs paper comments.

@Warriorrrr Warriorrrr moved this from Changes required to Waiting For Author in Paper PR Queue Mar 5, 2025
@kennytv kennytv added the pre-softspoon: never rebased Pre-hardfork pull requests that were not re-opened with the new main branch label Mar 23, 2025
@kennytv kennytv deleted the branch PaperMC:master March 23, 2025 19:16
@kennytv kennytv closed this Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pre-softspoon: never rebased Pre-hardfork pull requests that were not re-opened with the new main branch pre-softspoon

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants