Possible NPE if the liquid isn't in the LD
https://github.com/BuildCraft/BuildCraft/issues/787
This commit is contained in:
parent
4cd70f5e98
commit
a88692a0f2
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,11 @@ public class LiquidStack
|
||||||
nbt.setInteger("Amount", amount);
|
nbt.setInteger("Amount", amount);
|
||||||
nbt.setShort("Id", (short)itemID);
|
nbt.setShort("Id", (short)itemID);
|
||||||
nbt.setShort("Meta", (short)itemMeta);
|
nbt.setShort("Meta", (short)itemMeta);
|
||||||
nbt.setString("LiquidName", LiquidDictionary.findLiquidName(this));
|
String name = LiquidDictionary.findLiquidName(this);
|
||||||
|
if(name != null)
|
||||||
|
{
|
||||||
|
nbt.setString("LiquidName", name);
|
||||||
|
}
|
||||||
if (extra != null)
|
if (extra != null)
|
||||||
{
|
{
|
||||||
nbt.setTag("extra", extra);
|
nbt.setTag("extra", extra);
|
||||||
|
|
Loading…
Reference in a new issue