mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Fix return value of Block#applyBoneMeal always being false (#6030)
This commit is contained in:
parent
c203932d0c
commit
85ba428029
1 changed files with 19 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -0,0 +0,0 @@ public class CraftBlock implements Block {
|
||||
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
|
Loading…
Reference in a new issue