Started by
cosmicwanderer
on
Topic category: Help with MCreator software
I´ve made a custom grass block to generate in a custom biome, but the texture creates too much repetition, how can I make it generate with random rotation like the vanilla grass?
Add a procedure to the "When block added" trigger. In the procedure, set a local variable to a random number from 0 to 1 using the "Random [0,1)" block found in the math tab. Then, if the variable is less than 0.25, use the "Set direction of block" block found in the block procedures tab to set it facing north. If the variable is between 0.25 and 0.5, make the block face east, then south then west.
Do I need to change the block rotation mode for this to work?
Yes, the block needs to be able to point north, south, east, and west to point in those directions.
I did that but it only works when I place them, they dont generate naturally in random directions
Hm, that's unfortunate. I found this a forum talking about something similar: https://mcreator.net/forum/43013/how-could-i-make-my-procedure-only-run-when-ore-generated-world. It suggests using a marker block to place down the real block after an update tick. This doesn't really work for you though because there would be so many marker blocks generating in, and when I tested it the blocks just froze and didn't change.