#Edit recipes while the world is running

20 messages · Page 1 of 1 (latest)

tame scaffold
#

Is it possible to edit a recipe's output while the world is running?

odd hornetBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

safe thistle
#

Yes

#

edit the recipe and save your file, then in game run /reload

tame scaffold
#

The recipe needs to be changed automatically every few minutes...

safe thistle
#

I have no idea if that's possible, but you could try making a function and calling that in a tick loop.

tame scaffold
#

Could I accomplish this using modify result?

safe thistle
#

Uhh, not really. most people use modify result to copy NBT data from an ingredient or to apply nbt data to the result.

#

Not to change the recipe randomly

#

Do you have example code you need help working with?

tame scaffold
#

No example code. I was hoping to look into using recipe modification to create a stock market feature like what slime rancher does

safe thistle
#

Never played it, so I can't say, but you basically have 1 item to craft and you want to randomize the ingredients every 5 minutes?

tame scaffold
#

I want to be able to change the amount of items outputed every X amount of minutes

safe thistle
#

Give me an example so I understand

tame scaffold
#

For example a recipe that requires a diamond as an input and outputs X amount of silver coins

#

where the amount of silver coins outputted changes every minute based on logic handled by the script

safe thistle
#

Gotcha, I don't think this is possible, if it is, it's not something I know how to do.

opal gate
#

it may be possible but the recipes being reloaded every x time would be pretty annoying

#

afaik recipes can't just follow "rules" to change their output amount, not naturally that is

safe thistle
#

I tried some magic with functions, globals and server tick loops to try and increment the output quantity of a recipe and it just straight up doesn't work.