diff --git a/src/main/java/com/gregtechceu/gtceu/common/cover/FluidFilterCover.java b/src/main/java/com/gregtechceu/gtceu/common/cover/FluidFilterCover.java index 757c6b378d..9e15898822 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/cover/FluidFilterCover.java +++ b/src/main/java/com/gregtechceu/gtceu/common/cover/FluidFilterCover.java @@ -78,14 +78,14 @@ public FilteredFluidTransferWrapper(IFluidTransfer delegate) { @Override public long fill(int tank, FluidStack resource, boolean simulate, boolean notifyChanges) { - if (!fluidFilter.test(resource)) + if (!getFluidFilter().test(resource)) return 0; return super.fill(tank, resource, simulate, notifyChanges); } @Override public FluidStack drain(int tank, FluidStack resource, boolean simulate, boolean notifyChanges) { - if (!fluidFilter.test(resource)) + if (!getFluidFilter().test(resource)) return FluidStack.empty(); return super.drain(tank, resource, simulate, notifyChanges); } diff --git a/src/main/java/com/gregtechceu/gtceu/common/cover/ItemFilterCover.java b/src/main/java/com/gregtechceu/gtceu/common/cover/ItemFilterCover.java index b6b8274d64..41f53297fc 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/cover/ItemFilterCover.java +++ b/src/main/java/com/gregtechceu/gtceu/common/cover/ItemFilterCover.java @@ -103,7 +103,7 @@ public FilteredItemTransferWrapper(IItemTransfer delegate) { @Override public @NotNull ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate, boolean notifyChanges) { - if (filterMode != ItemFilterMode.FILTER_EXTRACT && !itemFilter.test(stack)) + if (filterMode != ItemFilterMode.FILTER_EXTRACT && !getItemFilter().test(stack)) return stack; return super.insertItem(slot, stack, simulate, notifyChanges); } @@ -111,7 +111,7 @@ public FilteredItemTransferWrapper(IItemTransfer delegate) { @Override public @NotNull ItemStack extractItem(int slot, int amount, boolean simulate, boolean notifyChanges) { ItemStack result = super.extractItem(slot, amount, true, notifyChanges); - if (result.isEmpty() || (filterMode != ItemFilterMode.FILTER_INSERT && !itemFilter.test(result))) { + if (result.isEmpty() || (filterMode != ItemFilterMode.FILTER_INSERT && !getItemFilter().test(result))) { return ItemStack.EMPTY; } return simulate ? result : super.extractItem(slot, amount, false, notifyChanges);