#2019 Fix soul vials not working if stacked

This commit is contained in:
tterrag1098 committed 2015-03-01 07:51:40 -05:00
1 parent a1b04d55d2
commit 0f90f4aefe
1 file changed
+7 -5
@@ -110,9 +110,6 @@ public class ItemSoulVessel extends Item implements IResourceTooltipProvider {
if(player == null) {
return false;
}
if(itemstack.stackSize > 1) {
return false;
}
Entity mob;
NBTTagCompound root = itemstack.stackTagCompound;
@@ -161,9 +158,14 @@ public class ItemSoulVessel extends Item implements IResourceTooltipProvider {
riddenByEntity = riddenByEntity.riddenByEntity;
}
if(player == null || !player.capabilities.isCreativeMode) {
itemstack.setTagCompound(null);
if(itemstack.stackSize > 1) {
itemstack.stackSize--;
player.inventory.addItemStackToInventory(new ItemStack(this));
player.inventoryContainer.detectAndSendChanges();
} else {
itemstack.setTagCompound(null);
}
}
return true;