From 4d8a57d11950cac7fdfcab3007f6ff4e1e4d04b9 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 8 Sep 2020 19:19:36 -0700 Subject: [PATCH] upstream changes --- .../gmail/nossr50/util/input/AbilityActivationProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java b/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java index a6632c9d4..e485c5179 100644 --- a/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java +++ b/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java @@ -110,7 +110,8 @@ public class AbilityActivationProcessor { FakePlayerAnimationEvent fakeSwing = new FakePlayerAnimationEvent(playerInteractEvent.getPlayer()); //PlayerAnimationEvent compat if (herbalismManager.canGreenThumbBlock(blockState)) { Bukkit.getPluginManager().callEvent(fakeSwing); - player.getInventory().setItemInMainHand(new ItemStack(Material.WHEAT_SEEDS, getHeldItem().getAmount() - 1)); + player.getInventory().getItemInMainHand().setAmount(player.getInventory().getItemInMainHand().getAmount() - 1); + player.updateInventory(); if (herbalismManager.processGreenThumbBlocks(blockState) && EventUtils.simulateBlockBreak(block, player, false)) { blockState.update(true); }