Skip to content

Commit

Permalink
Merge pull request #291 from DrParadox7/PR-1
Browse files Browse the repository at this point in the history
Prevent Null Point Exceptions
  • Loading branch information
Roadhog360 authored Jul 23, 2023
2 parents 346a31c + a53f68c commit d5ff18b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_10200
@Override
public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_)
{
return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket;
if (p_102008_2_ != null)
return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket;

return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_10200
@Override
public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_)
{
return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket;
if (p_102008_2_ != null)
return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket;

return false;
}
}

0 comments on commit d5ff18b

Please sign in to comment.