diff --git a/src/main/java/com/gtnh/findit/handler/MinecraftProvider.java b/src/main/java/com/gtnh/findit/handler/MinecraftProvider.java index 84d2a19..bf14704 100644 --- a/src/main/java/com/gtnh/findit/handler/MinecraftProvider.java +++ b/src/main/java/com/gtnh/findit/handler/MinecraftProvider.java @@ -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;