2021-06-29 03:37:44 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Mon, 28 Jun 2021 18:16:52 -0700
Subject: [PATCH] Fix return value of Block#applyBoneMeal always being false
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
2021-08-12 19:55:20 +02:00
index 96712906e64e9a0d1325afd55156921f20709988..6e25372a5bb7b38d85312e31330faee5a9c10bbb 100644
2021-06-29 03:37:44 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
2021-07-22 20:11:56 +02:00
@@ -677,7 +677,7 @@ public class CraftBlock implements Block {
2021-06-29 03:37:44 +02:00
Direction direction = CraftBlock.blockFaceToNotch(face);
UseOnContext context = new UseOnContext(this.getCraftWorld().getHandle(), null, InteractionHand.MAIN_HAND, Items.BONE_MEAL.getDefaultInstance(), new BlockHitResult(Vec3.ZERO, direction, this.getPosition(), false));
- return BoneMealItem.applyBonemeal(context) == InteractionResult.SUCCESS;
+ return BoneMealItem.applyBonemeal(context) == InteractionResult.CONSUME; // Paper - CONSUME is returned on success server-side (see BoneMealItem.applyBoneMeal and InteractionResult.sidedSuccess(boolean))
}
@Override