Sanity check the item ID for loaded liquid stacks better.
This commit is contained in:
parent
8a4a62ab4e
commit
5ad133c664
1 changed files with 5 additions and 0 deletions
|
@ -132,6 +132,11 @@ public class LiquidStack
|
|||
itemID = liquid.itemID;
|
||||
itemMeta = liquid.itemMeta;
|
||||
}
|
||||
// if the item is not existent, and no liquid dictionary is found, null returns
|
||||
else if (Item.itemsList[itemID] == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int amount = nbt.getInteger("Amount");
|
||||
LiquidStack liquidstack = new LiquidStack(itemID, amount, itemMeta);
|
||||
return liquidstack.itemID == 0 ? null : liquidstack;
|
||||
|
|
Loading…
Reference in a new issue