TerraFirmaCraft

TerraFirmaCraft

3M Downloads

[1.20.1 / 3.2.18] FluidItemIngredients with a delegate ingredient do not display fluid in JEI/EMI

Closed this issue ยท 0 comments

commented

A FluidItemIngredient which has a delegate ingredient will not display items with the fluid(s) specified by the fluid ingredient.

An ingredient defined by

{
  "ingredient": {
    "tag": "tfc:glass_bottles"
  },
  "fluid_ingredient": {
    "ingredient": {
      "tag": "minecraft:water"
    },
    "amount": 100
  }
}

will simply display empty glass bottles, while

{
  "fluid_ingredient": {
    "ingredient": {
      "tag": "minecraft:water"
    },
    "amount": 100
  }
}

will show all combinations of items in the tfc:fluid_item_ingredient_empty_containers with sufficient capacity and fluid(s) defined by the fluid ingredient.

This is due to the implementation of DelegateIngredient#getItems, which uses #testDefaultItem to apply additional filtering to the ingredient and add required info to the items when there is a delegate ingredient. However, FluidItemIngredient doe not override #testDefaultItem, likely because of the possibility of the fluid ingredient being valid for multiple fluids.