Skip to content

PhantomTankWidget

The PhantomTankWidget is a ghost fluid slot that allows setting fluid content without actual transfer mechanics. It's useful for defining recipe inputs or fluid placeholders.


Features

  • Phantom fluid storage – Doesn't actually consume or provide fluids.
  • Supports drag-and-drop – Accepts fluid items from JEI, EMI, or REI.
  • Custom event handling – Updates an external state when fluid changes.

APIs

It owns all APIs from TankWidget, and you can get or set item by its APIs.

setIFluidStackUpdater

Registers a callback to track fluid changes.

phantomTank.setIFluidStackUpdater(fluid -> {
    System.out.println("New phantom fluid: " + fluid);
});
phantomTank.setIFluidStackUpdater(fluid => {
    console.log("New phantom fluid: " + fluid);
});