Botania (Fabric/Quilt)

Botania (Fabric/Quilt)

5M Downloads

Add second mcfunction field to pure daisy recipes which runs right before setting block

00-Steven opened this issue ยท 4 comments

commented

Filed by request:
Add a second mcfunction field to pure daisy recipes, which runs regardless before attempting to set a block.
This would allow for a mcfunction to check and act upon the input block.

A pre-change mcfunction would also allow for catalyst recipes, which don't consume a block and just run a mcfunction for the effect. This isn't possible in the current version as for some reason the success mcfunction doesn't run when the input and output are the same.

commented

would your usecase be satisfied if I made it so that the success function runs when the input and output are the same?

commented

Part of the problem here is that you wouldn't be able to tell the difference between an apothecary that's empty, one filled with water, or one filled with lava. Given right now it takes any filled apothecary and sets it to empty before running the mcfunction. The proposed change would not change this, and thus not allow one to check the input block.

So unless there's some way to define a specific blockstate for both input and output that I'm not finding, this is not a viable solution.

That, and it may cause problems with reading input block NBT. When you use the vanilla /setblock command to set a chest on a filled chest, it both 'fails' and clears the chest's NBT. A similar problem may arise here.

Though another viable solution could be to let one create recipes which just run a mcfunction and leave the input untouched.
That should satisfy at least all of my usecases, if not better than my previously proposed one.

commented

I'm confused. Your main ticket is about pure daisies and your comment is about petal apothecaries.

commented

Ah, sorry, lemme clarify. It's because in an example I used a petal apothecary as the input and output blocks, meaning to use it as a catalyst.