A bunch more null check \o/
This commit is contained in:
parent
97e5fcc032
commit
5dff31d937
19 changed files with 33 additions and 29 deletions
|
@ -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) {
|
||||
|
|
|
@ -116,10 +116,10 @@ public abstract class BlockTransformer extends BaseTileBlock implements IRotatio
|
|||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack itemStack = inventory.getStackInSlot(i);
|
||||
|
||||
if (itemStack == null) {
|
||||
if (itemStack == ItemStack.EMPTY) {
|
||||
continue;
|
||||
}
|
||||
if (itemStack != null && itemStack.getCount() > 0) {
|
||||
if (itemStack != ItemStack.EMPTY && itemStack.getCount() > 0) {
|
||||
if (itemStack.getItem() instanceof ItemBlock) {
|
||||
if (((ItemBlock) itemStack.getItem()).block instanceof BlockFluidBase
|
||||
|| ((ItemBlock) itemStack.getItem()).block instanceof BlockStaticLiquid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue