Started by
Aksumite
on
Topic category: Help with Minecraft modding (Java Edition)
I would like to have bonemeal create my custom desert plants just like how bonemeal works on grass blocks.
Thanks :D
Topic category: Help with Minecraft modding (Java Edition)
I would like to have bonemeal create my custom desert plants just like how bonemeal works on grass blocks.
Thanks :D
You could create a procedure that activates on (Player right clicks on block), and when the player in question has bonemeal in their main hand and the block clicked is sand, you could spawn a bunch of plants on top of the grass.
plants like grass* or plants that normally generate in deserts such as cacti.
Yeah I know how to do the right clicking, I’m just not sure how to make the desert plants generate randomly in different places on top of the sand
make your flowers generate at different Xs and Zs axis.. from where you click, you can make it go around it.
So on your right click procedure, add block to X+1, y, z.. add block to X-1, y, z.. etc.
Make this out of procedure blocks
When global RIGHT CLICK
IF block = sand AND item in main hand = bonemeal
DO {
IF random (0,1) > 50, AND get block at x y+1 z = air, DO {place cactus at x y+1 z}
IF random (0,1) > 50, AND get block at x+1 y z = sand, AND get block at x+1 y+1 z = air, DO {place cactus at x+1 y+1 z}
}
Duplicate the second "random (0,1)" line with different coordinates for each block you want to have a chance to place a cactus. (The first line doesn't need to check if the x y z block is sand, because you clicked on that block and checked for sand already.)
I will try it out, thanks!
You're welcome! Tell me if you have any problems with it!