Started by
Fox_trot
on
Topic category: Help with Minecraft modding (Java Edition)
Hello all,
I'm trying to make a plant similar to that of the sweet berry bush in 1.14. My issue is with time, how can I delay the plant growth with procedures?
I have looked at tutorials but I am still confused.
Thanks
Edited by Fox_trot on Tue, 09/24/2019 - 06:06
You could make a procedure that sets a local variable to Random [0,1], and then make an if statement that tests if this is for example above 0.9, and put the plant growing in that.
Oooh interesting, if I make the probability greater then 0.9999 and it checks every update tick this might just work.
This should give a chance of one in ten thousand which should be equivalent to an average growth after 10,000 ticks or 8.3 minutes. Hopefully...
Anyway thanks
If you don't want to use randomness but actually set a specific time:
Requires blocks ability to store NBT data. Initialise counter on block added if it's null value isn't 0.
If you want to combine the counter with randomness you can add such an if statement inside the Else statement, slowing down incrementation of the counter nbt number tag. This will still ensure that the minimal time your plant needs to grow is equal to (time in ticks)
Cheers.
I'll try out both ways and see which one works best!
Which worked?