Integrated Dynamics

Integrated Dynamics

88M Downloads

FluidStack operator causes crashes on Empty Item

thebunanna opened this issue ยท 2 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

Using the Item Fluid (fluidstack) operator on null Items crashes the game.
java.lang.NullPointerException: Attempted to create a ValueFluidStack for a null FluidStack.

Steps to reproduce the problem:

  1. Have a container with only a bucket of water. The rest of the slots should be empty.
  • Note: any fluid containing item will also replicate this crash as long as there is a empty slot.
  1. Link an Inventory Reader to the container.
  2. Get the reference to the Items in the inventory (Aspect: Items)
  3. Make a Operator of the function Item Fluid
  4. Combine the inventory list reference and the Item Fluid operator using Map
  5. Render variable through proxy / display and replicate crash.
  • Note: Thankfully the entire network shuts down on loading the world again and does not cause corruption.

Expected behaviour:

Instead of crashing, there should be text regarding Null value


Versions:

  • This mod: IntegratedDynamics: 1.27.2, IntegratedTunnels: 1.8.40, IntegratedCrafting 1.2.2, Integrated Terminals 1.6.12
  • Minecraft: 1.21
  • Mod loader version: NeoForge 21.1.172

First replicated on OceanBlock2 modpack.

Log file:

https://pastebin.com/CZi0JkZJ
https://pastebin.com/BdX9r3sJ <-- manually updated to 1.27.4 and can still replicate crash

commented

Oh wow, this bug has existed for a long time already ๐Ÿ˜…

commented

Thanks for reporting!