Update Tick Procedure for Spawning Tall Plant

Started by Tucson on Tue, 06/30/2020 - 04:39

Topic category: Help with modding (Java Edition)

Last seen on 23:13, 3. Jul 2020
Joined Feb 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Update Tick Procedure for Spawning Tall Plant
Tue, 06/30/2020 - 04:39

I want to make a new plant like tall grass and rose bush that spawn in a biome, but I was hoping someone could show me what the Update Tick procedure would look like for the bottom block if I wanted the top block to spawn on top of the bottom one. There is this thread (https://mcreator.net/forum/43203/how-do-i-create-plant-two-blocks-tall-when-placed-peony), but I was not able to open up the file.

Thanks

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
are you wanting a different…
Tue, 06/30/2020 - 04:49

are you wanting a different block for both top and bottom? or the same blocks?

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
sorry, I didn't read your…
Tue, 06/30/2020 - 05:12

sorry, I didn't read your link before first post... I did a quick mod workspace of how it can work.. there are more ways to get the job done, but I set you up with the easiest way.. the first plant is the one that spawns, the second doesn't spawn (set to 0).. the update tick tells it to place the topper block at y + 1.. Sorry it's sloppy..

http://kinyoshimods.com/plantwithtopper.zip

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
also the to plant drops the…
Tue, 06/30/2020 - 05:15

also the to plant drops the bottom one..

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
heck, the top plant breaks…
Tue, 06/30/2020 - 05:25

heck, the top plant breaks on tick.. guess I should look into it more.. sorry man, haven't tried to make a plant with a different top yet.. 

 

Last seen on 23:13, 3. Jul 2020
Joined Feb 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Thanks for the help Kinyoshi…
Tue, 06/30/2020 - 17:44

Thanks for the help Kinyoshi, it really helped and I am super close to achieving my goal! The top block breaks because it is a plant instead of a block (a block won't break). One thing though, the top block does not spawn on top of the bottom one. What exactly does the attached procedure do?

 

Procedure example

Last seen on 23:13, 3. Jul 2020
Joined Feb 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
(No subject)
Tue, 06/30/2020 - 17:45

Procedure example

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
That is the % chance it does…
Tue, 06/30/2020 - 18:19

That is the % chance it does the procedure on each tick..  the way I did it is the really bad example was 70% chance to grow on each tick.

That link you had on your first post, I downloaded and converted to 2020.3 mcreator..  that has stuff we need for plant tops..

In a little bit, I'm going to work more on this for you. Unless you already got it working,..

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Hey I wanted to let you know…
Wed, 07/01/2020 - 00:23

Hey I wanted to let you know that I finally got it working :), the plant spawns as the plant, then when it ticks I switches to the block version with the topper, when you break that it drops you the plant to start it over.. it only drops one plant item when you break either top or bottom..  and it hurts you because it's a cactus.. sorry bout the textures I used, they were dummy textures I was messing around with for my mod., you're free to use them if you'd like :).

I'm also going to post this in the tutorial section.

https://www.mediafire.com/file/8ls2xiu24fymz3k/plant_with_topper_tutorial_1.15.2.zip/file

 

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
the bounding box dimensions…
Wed, 07/01/2020 - 00:28

the bounding box dimensions could use some work though :(

Last seen on 23:13, 3. Jul 2020
Joined Feb 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Kinyoshi, I can't thank you…
Wed, 07/01/2020 - 03:46

Kinyoshi, I can't thank you enough for consistently helping me out with this!! Really means a lot.

https://imgur.com/ivEgeVL

Last seen on 04:36, 5. Jul 2020
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Not a problem man, I'm glad…
Wed, 07/01/2020 - 03:51

Not a problem man, I'm glad too, now I have this kind of plant in my modding arsenal :D