Bonemeal On Custom Grass & Grass Spreading

Started by AOCAWOL on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bonemeal On Custom Grass & Grass Spreading

So I've been getting a lot of requests for my grass blocks to be Bonemeal-able. Any way to do this?

I also got a request to make my grass blocks spreadable. I've looked around but I couldn't find anything.

You can use a global trigger…
Thu, 09/05/2019 - 12:29

You can use a global trigger when bonemeal used. The coordinates you get are coordinates of the block clicked. Check if this block is your grass and if it is, randomly spawns some more grass blocks around, for the example of grass.

Example of how to use trigger for bonemeal was shown on our twitter recently: https://twitter.com/PyloDEV/status/1153236669799313413/photo/1 (might help for the starting point)

Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't really know how to…
Thu, 09/05/2019 - 14:46

I don't really know how to spawn random blocks in a radius. And how would I make it so it doesn't accidentally spawn grass in something like if I bonemeal grass next to my house and then the grass just deletes my walls and replaces it with grass.?

To spawn blocks around one…
Thu, 09/05/2019 - 14:50

To spawn blocks around one location, use random procedure and add random values between say -5 and 5 to x and z coordinates. One way to make sure you can spawn them is to check if the block at the location of spawning is air.

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For spreading grass, there…
Sat, 09/21/2019 - 16:09

For spreading grass, there is a way using procedures, but it is incredibly laggy and can cause entities to freeze.

Basically you just have a procedure for block tick update detecting if your dirt block is on a block next to (but not directly above or below) the grass block. It then has a random chance to spread to one of these blocks.

I wouldn't recommend using it though.