architectury-api icon indicating copy to clipboard operation
architectury-api copied to clipboard

Custom Ingredient API

Open MaxNeedsSnacks opened this issue 2 years ago • 1 comments

Both Fabric and Forge support registering custom ingredients now, and the APIs actually do seem reconcilable with just a couple of interface injections at runtime. A slight caveat is that we will have to force people to implement Ingredient on the fabric side as well, but other than that, this should be relatively easy to do

MaxNeedsSnacks avatar Jan 05 '23 14:01 MaxNeedsSnacks

Actually, an alternative solution could be to make the conversion to Ingredient an implementation detail that's only necessary on Forge, and basically just... copy Fabric's ingredient API (that would then explicitly forbid extending Ingredient, since this case is not handled by Fabric's API and they would have to handle serialisation etc. themselves)

MaxNeedsSnacks avatar Jan 05 '23 15:01 MaxNeedsSnacks