Hello, I am working on a script that let's players set some plants in a GUI with intensity (or density) and radius and then bonemeals them in the given radius. So bonemeal basically, but with settings.
This is the script so far: https://paste.denizenscript.com/View/109858
No errors, but a question. Since the players can set the radius where to search for blocks to grow plants on, the number of blocks that are found will vary greatly. The players can also set an intensity (how dense the plants will be placed).
My script uses a foreach: foreach <valid block(grass,dirt,etc.) in set radius and random number set by intensity> or - foreach <[found_blocks].random[<[intensity].add[<[found_blocks].size>]>]> as:block: to find the blocks where plants should be growing.
The problem is that I would like to set the density in which the plants are placed in dependence with the intensity, so that the ratio remains about the same. That is, at a high intensity, both at a large and a small radius proportionally many plants would be placed with about the same density. Does anyone have any ideas on how to solve this?
Content of Denizen Script Paste #109858: Unnamed Denizen Script Paste... pasted 2023/05/16 09:44:50 UTC-07:00, Paste length: 9901 characters across 276 lines, Content: command_duenger: type: command