Non-fluid-containing items can be placed in LP fluid slots
met4000 opened this issue ยท 2 comments
Issue type:
- ๐ Bug
Short description:
Items that don't contain fluids (e.g. variable cards) can be placed in fluid slots of the LP (e.g. fluid tab, list tab set to fluids) and silently fail to empty fluids, instead of erroring like invalid blocks do or like they used to in mc 1.12.
Steps to reproduce the problem:
- Place a non-fluid-containing item (e.g. variable card) into a LP fluid slot. See below.
Expected behaviour:
Versions:
Might affect +1.14 (see notes below), but tested on:
- This mod: 1.25.6
- Minecraft: 1.20.1
- Mod loader version: Forge 47.2.0
and
- This mod: 1.25.12
- Minecraft: 1.21.1
- Mod loader version: NeoForge 1.21.122
and
- This mod: 1.1.11
- Minecraft: 1.12.2
- Mod loader version: Forge 14.23.5.2859
Log file:
N/A
Notes:
Looking at the source code, it seems like while the docs for Helper.getFluidStack say it should return null if the item doesn't contain a fluid, when updating to 1.14 it was modified to return FluidStack.EMPTY instead of null - see line 48 below. Since the fluid validation tests for the return of the helper being null, this change might be what is causing the fluid validation to silently fail as an empty fluid.
1.21:
1.12:
Fluid validation:


