Started by
God_Of_Wood
on
Topic category: User side tutorials
I'm making a mod where the player can add bone meal in an area around them. Is there a more effective way than making a new 'bone meal block' for each specific block?
Topic category: User side tutorials
I'm making a mod where the player can add bone meal in an area around them. Is there a more effective way than making a new 'bone meal block' for each specific block?
There should be an 'apply bonemeal action' function that runs a bonemeal procedure at a position. Do you need this to work for regular, or modded blocks? I'm not totally clear on what you're trying to do.
It's mainly regular blocks, it's just that I want to add the bonemeal effect around the radius of the player both horizontally and vertically. I know I could technically do it by using the 'apply bonemeal at x,y,z' function, but I would like to know if there's a simpler or faster way to do it.
You could try using a modified version of the 'check for block in 6*6*6 box' procedure template. Just remove the bits that are checking for a block, and instead check if the block at x+sx, y+sy, z+sz, (where sx/sy/sz are the offsets from the center), are grass blocks, and, if they are, call a bonemeal event at the offset position. You can basically set the size of the box as big as you want, and use different sizes for vertical and horizontal spread.
Ok, thank you!
https://postimg.cc/yWd7mfMd
This is what I've tried, but it doesn't work, what can I do to fix it?
Where you currently have 'set 'found' to true,' get rid of the variable stuff, and add 'apply bonemeal action at x+sx, y+sy, z+sz,' possibly replacing 'y+sy' with 'y+sy+1' if it turns out you need to apply the bonemeal action one block above the grass.
Essentially, instead of checking every block and returning true if you find the correct block; you want to check every block, and run a function on each block. In this case the bonemeal thing.