Started by
ItsTaRealChewie
on
Topic category: Help with Minecraft modding (Java Edition)
Alright, I've been trying to figure this out for awhile, but I've gotten nowhere.
Wondering if there's a way to set specific timing on procedures and stuff, example:
Say I make a block,
"When block broken"
Let's say I wanted to make it spawn xp orbs for 30 seconds
Or another example:
say I made a mob, and I wanted it to send chat messages when spawned
Send chat message "hi"
wait for 2 seconds
Send chat message "hi again"
Would i have to edit the code manually or is there a way I could do it by simply making procedures
One word: timers
I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
here is a example how to do that:
(Set this procedure on your Entity - 'When entity spawns') - 20 ticks = 1 second so 2 seconds is 40 ticks;
the procedure will say 'hi' when the entity spawn, then it will 'count' to 40 ticks, when it reach 40 it fires the other message, in this case it only make this once, but you can use 'when entity/block/item Ticks' to create loops and timers for machine sounds for example, and many many other things... i believe there is a way to do that without NBT tags, not sure how thou.
Thank you, it worked
Thanks!