mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 20:52:42 +00:00
#2019 Fix soul vials not working if stacked
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user