Hello, dear developer. Unfortunately the itemGetContainerItem function is somewhat bugged. This example script works fine at first and loads without any issues, but as soon as the Milk Bowl gets placed in the crafting grid in a stack of more than one, then upon being used in a recipe the returning container item (minecraft:bowl) never appears in the inventory or never drops on the ground if the inventory is full. It just disappears.
#loader contenttweaker
import mods.contenttweaker.Item;
import mods.contenttweaker.VanillaFactory;
val milk_bowl = VanillaFactory.createItemFood("milk_bowl", 0);
milk_bowl.alwaysEdible = true;
milk_bowl.healAmount = 0;
milk_bowl.itemUseAction = "DRINK";
milk_bowl.maxStackSize = 16;
milk_bowl.saturation = 0.0;
milk_bowl.itemGetContainerItem = function(stack) {return <item:minecraft:bowl>;};
milk_bowl.register();
Hello, dear developer. Unfortunately the itemGetContainerItem function is somewhat bugged. This example script works fine at first and loads without any issues, but as soon as the Milk Bowl gets placed in the crafting grid in a stack of more than one, then upon being used in a recipe the returning container item (minecraft:bowl) never appears in the inventory or never drops on the ground if the inventory is full. It just disappears.