diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 874195225..1c97be5a0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -88,7 +88,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud else{ ItemStack slot = reconstructor.getStackInSlot(0); if(StackUtil.isValid(slot)){ - player.inventory.setInventorySlotContents(player.inventory.currentItem, slot.copy()); + player.setHeldItem(hand, slot.copy()); reconstructor.setInventorySlotContents(0, StackUtil.getNull()); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index 28f9b1910..45df9cabb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -117,7 +117,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ } else{ if(!StackUtil.isValid(stackPlayer)){ - player.inventory.setInventorySlotContents(player.inventory.currentItem, slot.copy()); + player.setHeldItem(hand, slot.copy()); compost.setInventorySlotContents(0, null); return true; } @@ -125,7 +125,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ int addedStackSize = Math.min(StackUtil.getStackSize(slot), stackPlayer.getMaxStackSize()-StackUtil.getStackSize(stackPlayer)); ItemStack stackToAdd = stackPlayer.copy(); stackToAdd = StackUtil.addStackSize(stackToAdd, addedStackSize); - player.inventory.setInventorySlotContents(player.inventory.currentItem, stackToAdd); + player.setHeldItem(hand, stackToAdd); compost.decrStackSize(0, addedStackSize); return true;