Started by
thijs_films
on
Topic category: Help with MCreator software
so im creating a mod with an entity that every in game day spawns a single item.
i have tried things with cooldowns but nothing so far has worked and at this point im back to a blank slate.
if anyone can help i would greatly appreciate it!
This is possible with nbt tags i think and i am not so good with that, so i have a makeshift solution for now.
Make a potion effect, then create a "When effect expires".
When effect expires - if (is day in the provided world) do (spawn gem [your item])
Then for your entity, go to the "entity tick update".
If Not (is day in provided world) do (add potion effect [the potion effect you made] for [5 ticks])
The item spawn when its somewhat dark so you can change the ticks in the "expired effect" to a larger number to make it spawn later.
(item spawns at 23500 ticks and one day is 24000 ticks).
So this makes the entity drop one item every day, now i only tested this in casual situations but i have no idea how this works for the entity if its for example out of range or on server. Hope this helps for now!
i tried it out and it sadly didn't work.
but thank you for the suggestion!
Yea, i tested it in 1.17, might be different if you are using another version. Hope you can figure something out!
so, i managed to do it!
by having 2 of the same entity. one that gives the item and then quickly changes into the other that waits untill the next day.
thank you for the help, because before this i didnt know of the 'is day in provided world' trigger before this, so it helped me alot!
I am happy that i was able to help!