Skip to content

Commit

Permalink
Changed stack decrement code to use decrementUnlessCreative
Browse files Browse the repository at this point in the history
  • Loading branch information
Chailotl committed Nov 16, 2024
1 parent 6373cda commit 2517f2e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, Worl
if (!world.isClient() && !world.getBlockTickScheduler().isQueued(pos, this) && be.isItemAccepted(stack)) {
// Remove items
ItemStack newStack = stack.copyWithCount(be.count);
stack.setCount(stack.getCount() - be.count);
stack.decrementUnlessCreative(be.count, player);

// Schedule redstone pulse
world.scheduleBlockTick(pos, this, 2);
Expand Down

0 comments on commit 2517f2e

Please sign in to comment.