mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Sanity check the item ID for loaded liquid stacks better.
This commit is contained in:
1 parent
8a4a62ab4e
commit
5ad133c664
1 file changed
+5
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user