From dc891c0050ba09a57863cfeb43e953647d8db406 Mon Sep 17 00:00:00 2001 From: Noah Ross Date: Wed, 1 Jul 2026 23:31:28 -0700 Subject: [PATCH] Fix Block#applyBoneMeal returning false on success 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 #12407). - The 26.1 update changed the server-side crop growth path to return SUCCESS_SERVER, breaking the SUCCESS check once more (GH-14012). Use consumesAction() instead, which matches any Success variant and is therefore robust against this class of vanilla change. Fixes GH-14012 --- .../src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index bf98fc87b0a2..d6e348850393 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -542,7 +542,7 @@ public boolean applyBoneMeal(BlockFace face) { } } - return result == InteractionResult.SUCCESS && (event == null || !event.isCancelled()); + return result.consumesAction() && (event == null || !event.isCancelled()); } @Override