How do I make a working sapling?

Started by Hello_There on Wed, 08/04/2021 - 04:22

Topic category: Help with modding (Java Edition)

Last seen on 01:08, 7. Sep 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I make a working sapling?
Wed, 08/04/2021 - 04:22

Hey, so, I can't figure out how to make tree saplings that grow and was hoping someone here could help.

Last seen on 22:09, 20. Sep 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Go to mcreator and create a…
Wed, 08/04/2021 - 14:55

Go to mcreator and create a plant

Last seen on 18:39, 22. Sep 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
In MCreator, create a new…
Wed, 08/04/2021 - 17:02

In MCreator, create a new plant. Add in all the different variables of your desired sapling.
Then make sure to apply "Force Ticking" box, as this will set the sapling to tick randomly. Go to the procedures, and choose the "Update Tick" one, then add in a new procedure that will remove the sapling, and will place the structure instead (You can search for the procedures in the search tab in MCreator's procedure window).

For the bonemeal, simply add a "Upon right click" procedure, then add in a block that checks for the bonemeal in either the main hand or the offhand of the player. (use a "OR" block here), then add a block that also removes the block and replaces it with a the tree structure you made. (If you want the tree to not grow instantly, simply do add a random variable from the template of procedures (Do with 70% chance) and attach it to your main block. You can fiddle with the chance the way you see fit.)

Lastly, for the finer details, add in a new block to the "Upon Right Click" procedure, where it spawns the "VILLAGER_HAPPY" particles (same ones used for bonemeal when applied) around the sapling when right clicked with a bonemeal.

That should be it. 

Things to note, make sure that your tree structure has the air blocks replaced with structure void. Otherwise it will replace any blocks that used to occupy the place where the air blocks now occupy.

If you need anything else, feel free to let me know!

Last seen on 01:08, 7. Sep 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks, that helped a lot!…
Wed, 08/04/2021 - 22:42

Thanks, that helped a lot! The tree spawns a few blocks away from the sapling though and was wondering if you knew how to fix that.

Last seen on 09:27, 15. Sep 2021
Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Well, maybe you could adjust…
Thu, 08/05/2021 - 01:25

Well, maybe you could adjust your x and z coordinates and see which adjustment actually works in the procedure (for example: x+2, z-3 etc)

Last seen on 01:08, 7. Sep 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How would I do that?
Thu, 08/05/2021 - 02:33

How would I do that?

Last seen on 05:11, 17. Sep 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
just change the procedure!
Thu, 08/05/2021 - 03:08

just change the procedure!

Last seen on 18:39, 22. Sep 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Simply in the place…
Thu, 08/05/2021 - 16:14

Simply in the place structure procedure, change the X, and the Z to numbers that correlate to your structure. Add in a [ ] + [ ] block from the math procedures, and add in the X in either of the boxes of the math block, then, once again in math, grab the number block, and add it to the other box of the main math block. (So it would look something like this: [X] + [Your Number Here].

To find out what numbers to add, simply count how many blocks in both the X and the Z axis respectively your center block of the structure (tree) away from the structure block. 

That should be it.