mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Fixed the Manasteel/Elementium Pick and Axe not removing the last item from the inventory but a ghost stack instead. Closes #738
This commit is contained in:
1 parent
e36e7dc076
commit
bd2dcbc0a2
2 files changed
+6
No files matched your search
+3
@@ -90,6 +90,9 @@ public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortab
|
||||
ItemStack stackAt = player.inventory.getStackInSlot(i);
|
||||
if(stackAt != null && SAPLING_PATTERN.matcher(stackAt.getItem().getUnlocalizedName()).find()) {
|
||||
boolean did = stackAt.getItem().onItemUse(stackAt, player, world, x, y, z, s, sx, sy, sz);
|
||||
if(stackAt.stackSize == 0)
|
||||
player.inventory.setInventorySlotContents(i, null);
|
||||
|
||||
ItemsRemainingRenderHandler.set(player, new ItemStack(Blocks.sapling), SAPLING_PATTERN);
|
||||
return did;
|
||||
}
|
||||
|
||||
+3
@@ -90,6 +90,9 @@ public class ItemManasteelPick extends ItemPickaxe implements IManaUsingItem, IS
|
||||
ItemStack stackAt = player.inventory.getStackInSlot(i);
|
||||
if(stackAt != null && TORCH_PATTERN.matcher(stackAt.getItem().getUnlocalizedName()).find()) {
|
||||
boolean did = stackAt.getItem().onItemUse(stackAt, player, world, x, y, z, s, sx, sy, sz);
|
||||
if(stackAt.stackSize == 0)
|
||||
player.inventory.setInventorySlotContents(i, null);
|
||||
|
||||
ItemsRemainingRenderHandler.set(player, new ItemStack(Blocks.torch), TORCH_PATTERN);
|
||||
return did;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user