A bunch more null check \o/

This commit is contained in:
modmuss50 2016-12-06 18:22:18 +00:00
parent 97e5fcc032
commit 5dff31d937
19 changed files with 33 additions and 29 deletions

View file

@ -39,7 +39,7 @@ public class ItemBattery extends ItemTRNoDestroy implements IEnergyItemInfo {
World worldIn,
@Nullable
EntityLivingBase entityIn) {
if (stack != null && PoweredItem.getEnergy(stack) == 0.0) {
if (stack != ItemStack.EMPTY && PoweredItem.getEnergy(stack) == 0.0) {
return 1.0F;
}
return 0.0F;