TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Add custom `Ingredient` types for rotten and non-rotten food

Sty2k5 opened this issue ยท 6 comments

commented

Rot is a mechanic that as a modpack maker does not appear to have a function or capability of accounting for. there is absolutely not interacting with it and the only way to have any semblance of immersion with a modpack that factors it in is to disable it. there should be some way of hooking into this for modpack development so you can remove recipes or add them based on whether or not a food is rotten.

Meta Info

  • TFC Version:...1.07(at time of request)
    -Compatability
  • Craft Tweaker, any mod that has Craft Tweaker Capabilities
commented

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

commented

I think this may be possible using NBT like fluids. We may store the creation date of food if it is still not rotten and if it is just save a boolean rotten = true

commented

we don't overwrite the item stack tag though, because it's not our item to modify, nor do we have absolute control over when that occurs. Hence the custom ingredient types, for instance, in use in crafting recipes (json defined).

commented

nor do we have absolute control over when that occurs

but somehow, forge's fluid capability's tag is written to every item regardless of them being able to control the Item class or it's NBT share tag methods, just look at our jug and wooden bucket.

commented

Would a food bench be a better idea? In essence it's a crafting table akin to artisans kitchen workshop, support for a fluid, a knife, and/or a frying pan and then that benches' CT handle can have a allow rotten optional boolean

commented

So we actually looked into this. CT supports the ability for us to define custom functions, such as

<minecraft:apple>.tfcNotDecayed()

which would solve this issue remarkably well. However, this is actually somewhat reliant on the mod themselves providing support for these kind of things (in the general case). I know of no mods which do so, I know TFC doesn't, and all other implementations of CT integration I've seen would not be able to do this.

That said, we also have added several cooking methods in the latest update which allow for more interesting food combination mechanics. They all work with any food item, as they do more advanced calculations such as summing nutrition, or providing saturation bonuses based on input contents.

As a result, to let other mods use this almost certainly requires an addon, even if we add the aforementioned CT hook (and it would almost certainly not be useful to said addons.) In 1.15 this will change anyway (hopefully for the better), because everything will be able to use vanilla ingredients (of which we can provide food-decay-ignoring ones. So this is not going to see any action in 1.12.

TL;DR, yes, but actually no.