How would i make it is you type /rnd 20%dirt 80%grass if replaces the floor around you with 20%dirt and 80%grass BTW: i only need the generation part as in the bit where it decides what to place
I would: Calculate how many grass blocks and how many dirt blocks would fit into respective percentage with given amount of blocks. I would then store the blocks into a collection. After that I would iterate over every block in the selection and place a random block from the collection created earlier, deleting each block from the collection as they are selected.
example please, i hate maths Rocoty bump EDIT by Moderator: merged posts, please use the edit button instead of double posting.