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

@ -150,7 +150,7 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
super.onBlockActivated(worldIn, pos, state, playerIn, hand, side, hitX, hitY, hitZ);
ItemStack stack = playerIn.getHeldItem(EnumHand.MAIN_HAND);
if (stack != null)
if (stack != ItemStack.EMPTY)
if ((stack.getItem() instanceof ItemElectricTreetap && PoweredItem.canUseEnergy(20, stack)) || stack.getItem() instanceof ItemTreeTap)
if (state.getValue(HAS_SAP)) {
if (state.getValue(SAP_SIDE) == side) {