Bonemeal plants in an area

Started by God_Of_Wood on

Topic category: User side tutorials

Last seen on 16:55, 21. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bonemeal plants in an area

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?

Last seen on 14:57, 22. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There should be an 'apply…
Tue, 11/14/2023 - 15:11

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.

Last seen on 16:55, 21. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's mainly regular blocks,…
Tue, 11/14/2023 - 20:01

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. 

Last seen on 14:57, 22. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could try using a…
Tue, 11/14/2023 - 20:42

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. 

Last seen on 16:55, 21. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, thank you!
Wed, 11/15/2023 - 13:02

Ok, thank you!

Last seen on 16:55, 21. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://postimg.cc/yWd7mfMd…
Wed, 11/15/2023 - 13:18

https://postimg.cc/yWd7mfMd

This is what I've tried, but it doesn't work, what can I do to fix it?

Last seen on 14:57, 22. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where you currently have …
Thu, 11/16/2023 - 15:48

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.