Skip to content

Fix Block#applyBoneMeal returning false on success#14019

Closed
rossnoah wants to merge 1 commit into
PaperMC:mainfrom
rossnoah:noah/fix-apply-bonemeal-return-value
Closed

Fix Block#applyBoneMeal returning false on success#14019
rossnoah wants to merge 1 commit into
PaperMC:mainfrom
rossnoah:noah/fix-apply-bonemeal-return-value

Conversation

@rossnoah

@rossnoah rossnoah commented Jul 2, 2026

Copy link
Copy Markdown

fixes GH-14012

@rossnoah rossnoah requested a review from a team as a code owner July 2, 2026 06:45
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jul 2, 2026
CraftBlock#applyBoneMeal checked the result via identity against a
single InteractionResult constant, which has now broken three times
as vanilla changed which success constant the bone meal code returns:

- Pre-1.21.2, BoneMealItem returned sidedSuccess(isClientSide), i.e.
  CONSUME on the server, so the upstream == SUCCESS check was wrong
  (fixed by comparing against CONSUME in 2021).
- The 1.21.2 InteractionResult refactor (24w33a) removed sidedSuccess
  and the method returned plain SUCCESS, breaking the CONSUME check
  (fixed by comparing against SUCCESS again in PaperMC#12407).
- The 26.1 update changed the server-side crop growth path to return
  SUCCESS_SERVER, breaking the SUCCESS check once more (PaperMCGH-14012).

Use consumesAction() instead, which matches any Success variant and
is therefore robust against this class of vanilla change.

Fixes PaperMCGH-14012
@rossnoah rossnoah force-pushed the noah/fix-apply-bonemeal-return-value branch from 4da33f2 to dc891c0 Compare July 2, 2026 06:45
@Lulu13022002

Copy link
Copy Markdown
Contributor

Duplicate of #14014, I opted to check against Success explicitly but this works too indeed.

@github-project-automation github-project-automation Bot moved this from Awaiting review to Closed in Paper PR Queue Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

Block#applyBoneMeal returns false on success since the 1.21.2 InteractionResult split

2 participants