How do I make custom grass blocks generate with random texture rotations like vanilla?

Started by cosmicwanderer on

Topic category: Help with MCreator software

Active 1 year ago
Joined Sep 2020
Points:
655

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
How do I make custom grass blocks generate with random texture rotations like vanilla?

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?

Active 3 years ago
Joined Aug 2020
Points:
718

User statistics:

  • Modifications: 1
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 112
Add a procedure to the "When…
Thu, 10/08/2020 - 19:54

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.

Active 1 year ago
Joined Sep 2020
Points:
655

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
Do I need to change the…
Thu, 10/08/2020 - 20:12

Do I need to change the block rotation mode for this to work?

Active 3 years ago
Joined Aug 2020
Points:
718

User statistics:

  • Modifications: 1
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 112
Yes, the block needs to be…
Thu, 10/08/2020 - 21:28

Yes, the block needs to be able to point north, south, east, and west to point in those directions.

Active 1 year ago
Joined Sep 2020
Points:
655

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
I did that but it only works…
Fri, 10/09/2020 - 00:11

I did that but it only works when I place them, they dont generate naturally in random directions

 

Active 3 years ago
Joined Aug 2020
Points:
718

User statistics:

  • Modifications: 1
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 112
Hm, that's unfortunate. I…
Fri, 10/09/2020 - 11:13

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.