Fix another null check crash (#1091)
This commit is contained in:
parent
7c8e9b6d8d
commit
c4f04b1589
|
@ -135,8 +135,8 @@ public class PlayerDemonWillHandler
|
|||
*/
|
||||
public static ItemStack addDemonWill(EntityPlayer player, ItemStack willStack)
|
||||
{
|
||||
if (willStack == null)
|
||||
return null;
|
||||
if (willStack.isEmpty())
|
||||
return ItemStack.EMPTY;
|
||||
|
||||
NonNullList<ItemStack> inventory = player.inventory.mainInventory;
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ public class WillHandler
|
|||
{
|
||||
remainder = PlayerDemonWillHandler.addDemonWill(player, willStack);
|
||||
|
||||
if (remainder != null)
|
||||
if (!remainder.isEmpty())
|
||||
{
|
||||
EnumDemonWillType pickupType = ((IDemonWill) remainder.getItem()).getType(remainder);
|
||||
if (((IDemonWill) remainder.getItem()).getWill(pickupType, remainder) >= 0.0001)
|
||||
|
|
Loading…
Reference in a new issue