Dryad, a mob that plants saplings! (How do I slow her planting down?)

Started by FaeTheWanderer on

Topic category: Help with modding (Java Edition)

Last seen on 03:36, 14. Dec 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dryad, a mob that plants saplings! (How do I slow her planting down?)
Mon, 06/13/2022 - 04:17 (edited)

So, i'm super close to being able to release my first mod! I am having one issue, though!

I'm wanting to make a dryad mob that wanders around the forests, but can be led someplace else with a sapling, and that plants a random sapling for one of the new types of trees i've made as she wanders around! I kinda like the idea that dryads work to spread their forests wherever they go if left alone! 
I've kinda got that working. . . however she places the saplings down way waaaay too quickly! She is spamming them so quickly that you can watch them change under her feet like some kind of visual randomizer. While a cool effect, i'm pretty sure that's gonna cause a TON of lag, so i don't want to leave it that way!

So my question is, what's the best way to tell her to only place down one of her saplings every, say 5-10 minutes or so?

Edited by FaeTheWanderer on Mon, 06/13/2022 - 04:17
Last seen on 07:34, 25. Oct 2023
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello there, could you…
Mon, 06/13/2022 - 04:49

Hello there, could you screenshot your procedure, the one that make your dryad plants tree? It would be nice to have something to work with rather than some blank words.

Last seen on 03:36, 14. Dec 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sure thing!  I left out the…
Mon, 06/13/2022 - 05:09

Sure thing! 
I left out the middle part as it's the same thing, just with even more saplings!start of procedure
end of procedure

Last seen on 03:36, 14. Dec 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I am also kinda proud how…
Mon, 06/13/2022 - 05:18

I am also kinda proud how the mob turned out too! Still wanna fix her hair and make it more leafy, but i think it's a good start!
I gave her a sheleighly as a weapon that causes knockback, and if i can, i think it would be cool if she summoned wolves to help defend her!
For now, i'll be happy just getting her sapling planting right! lol
Dryad

Last seen on 07:34, 25. Oct 2023
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello again, I assume that…
Mon, 06/13/2022 - 05:48

Hello again, I assume that you put this procedure in "On entity tick update" right? If so, you could use the timer for it, here an example: 

https://ibb.co/rt9LjrT

Oh and I think you should get rid the " wait 1200 ticks,..." thingy.\

Anyway, hope it helps and good luck on your mod. 

Last seen on 03:36, 14. Dec 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ah, perfect! thanks so much!…
Mon, 06/13/2022 - 06:45

Ah, perfect! thanks so much!! 
Yeah, the wait thing didn't work like i thought it would!