Artisan Worktables 1.12

Artisan Worktables 1.12

3M Downloads

Multiple liquid possibilities in one script

SureenInk opened this issue ยท 1 comments

commented

A way to supply multiple liquids as a possibility for a recipe, much like you can items. For example, in a recipe, you might tell it that it can use "cobblestone | stone". This would make the recipe in JEI show you can use cobblestone, then would flip to show stone. The same would be done with the liquid. You could tell it "water | lava" so that a player will see either as an option in JEI without it having to show up as a completely separate recipe.

commented

This would require:

  • add new zenscript method
  • add documentation
  • modify recipe fluid
  • modify recipe fluid match
  • modify JEI wrapper / category

Everything is pretty straightforward with the exception of the last element.

In order for JEI to respond with the proper recipes when a fluid is searched by usage, JEI needs to have a slot set up to reference the fluid. This means we can't simply bypass binding a slot to a fluid in the IRecipeCategory implementation. Now, JEI can only reference one FluidStack per slot. This would require a hacky solution to get this to work properly.

We would have to create multiple slots, one for each fluid, and either position them offscreen or with a height / width of zero, if it's allowed. Then we would have to manually render the fluids and cycle them on a timer. We would also have to manually handle the tooltip, cycling at the same interval.

JEI also natively allows hovering the fluid slot and pressing U or R for usages and recipes respectively. This functionality would either need to be re-implemented somehow or just simply omitted.

I really like this idea and I'm a big fan of this level of polish, but with the limitations of JEI, it would be a lot of work, heavily skewing the cost to benefit ratio. I'm going to put this on the back burner for now. It may be implemented someday, but I doubt it will be soon.