Farmer's Delight

Farmer's Delight

97M Downloads

[Feature Request] Make container accept an Ingredient rather than an ItemStack

SirSassypants opened this issue ยท 4 comments

commented

This way, a recipe can accept multiple containers rather than making duplicates of the same recipe with a different serving item.
For example, a modpack dev could make most recipes that use bowls use the forge:bowls tag instead. You could serve your meal in not just a minecraft:bowl but also in an ecologics:coconut_husk.

The recipes in the mod don't have to be changed, the method of checking the remaining item to use as the serving item can still work with this, but defining a custom recipe with an array/tag or Ingredient (I have limited java knowledge so excuse any mistakes) would be massively helpful to people like me.

commented

This has been requested before, I think.

The main reason I made the container be a specific item is because a "meal" (result item) can't know which alternate container you gave to it, so it will always drop its hardcoded container item when consumed. This could potentially cause duplication or item conversion bugs in poorly-configured modpacks, which could cause users to think it's a bug with FD.

For example: if a recipe allowed either the bowl or a coconut husk, but the result is coded to be contained in a coconut husk, it would potentially convert bowls into this new item when eaten, as a consequence.

That said, I suppose I could trust content creators to not allow this kind of side effect to occur with their custom recipes. FD in particular has no use for it, but maybe it could work well with items where the container is consumed (for example, the Stuffed Pumpkin).

commented

Yeah I completely understand. I did know about the side effect of it 'converting' to the leftover item that the item uses by default, but in my eyes it wasn't a huge issue as (to continue the example) the functionality of the bowl and husk are identical. If someone used 'any bucket' as a serving item, they may accidentally have a wooden bucket to iron bucket conversion bug, but it should be fairly obvious their mistake after they make it.

I for one am in favor of items being served in consumable containers, where the container can be a number of things. In the modpack I am making which prompted this idea there are several boiled sweets, which I made different cooking recipes for, but I also wanted to be able to use any of the paper items available to serve it in. The sweet itself gets consumed without any leftovers.
It opens the possibility for support of multiple bottles, or multiple pumpkins to be served in, idk I'm just spitballing now.

The current working alternative I have is making several identical recipes but with various serving items, but this looks untidy in JEI.

But yeah I also understand the concern of having users blaming FD for a bug in a modpack, although in my opinion if a modpack author is in depth enough to know that the serving item supports an array, then they should be smart enough to understand that the consumed meal will only return one specific item, and not necessarily the one they decided was the input.

100% this is a "do the pros outweigh the cons issue", and I put my vote in for pros! :D

commented

In your case (for the sweets), you can also leave the container field empty; the pot allows results to not be contained on anything, which makes them instantly drop to the output slot.

But yes, I can see the value for other kinds of items. This would be a "I trust you won't use this wrongly" kind of feature, but given it isn't the first time people asked for it, there might be more uses cases than expected.

commented

Also, I forgot about my own rules. ๐Ÿ˜… I'm moving this issue to the Discussions board, as it's a feature suggestion.