Skip to content

Commit

Permalink
fix NPE in MinecraftProvider (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexdoru authored Oct 1, 2024
1 parent 3c9f849 commit 2eabe09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/gtnh/findit/handler/MinecraftProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public IStackFilter getFilter(EntityPlayer player, TileEntity tileEntity) {
if (tileEntity instanceof IFluidHandler handler) {
FluidTankInfo[] tankInfo = handler.getTankInfo(ForgeDirection.UNKNOWN);
FluidStackFilter filter = new FluidStackFilter();

for (FluidTankInfo info : tankInfo) {
filter.add(info.fluid);
if (tankInfo != null) {
for (FluidTankInfo info : tankInfo) {
filter.add(info.fluid);
}
}

anyFilter.add(filter);
if (!filter.isEmpty()) anyFilter.add(filter);
}

return anyFilter.isEmpty() ? null : anyFilter;
Expand Down

0 comments on commit 2eabe09

Please sign in to comment.