Skip to content

Commit

Permalink
Some items implement IFluidContainerItem without actually being fluid…
Browse files Browse the repository at this point in the history
… containers. Make sure they have at least 1L of capacity before we try to fill them.
  • Loading branch information
YannickMG committed Mar 2, 2025
1 parent 07d7076 commit cbfaf11
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/gregtech/api/util/GTUtility.java
Original file line number Diff line number Diff line change
Expand Up @@ -1882,6 +1882,7 @@ public static ItemStack fillFluidContainer(FluidStack aFluid, ItemStack aStack,
}
if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem fluidContainerItem
&& fluidContainerItem.getFluid(aStack) == null
&& fluidContainerItem.getCapacity(aStack) > 0
&& fluidContainerItem.getCapacity(aStack) <= aFluid.amount) {
if (aRemoveFluidDirectly) {
aFluid.amount -= fluidContainerItem.fill(aStack = copyAmount(1, aStack), aFluid, true);
Expand Down

0 comments on commit cbfaf11

Please sign in to comment.