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:
Lizbeth Rika committed 2015-04-10 13:08:18 +01:00
1 parent e36e7dc076
commit bd2dcbc0a2
2 files changed
+6

No files matched your search

@@ -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;
}
@@ -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;
}