Started by
FRoginman
on
Topic category: Help with Minecraft modding (Java Edition)
can you help me? is that I did two procedures, one for a mob to appear at a certain time and I did another for it to do the same but in reverse, now the problem is that only one version appears at one time and in a game of 1000 ticks the other appears, try to do in many ways but I can't make it work, basically it's like a werewolf, during the day it would be a mob and at night another. But it doesn't work well, I am doing it in mccreator 2022.2 1.16.5 forge
It looks like you have the right idea. You want to get the world time, and MOD it out of 24000 to get the current daytime- I recommend double checking that you are running these on the update ticks of the correct entities, (either set the global trigger to 'on entity update tick' and check that it is your custom entity, or use the update tick triggers for your custom entities), and maybe use = instead of <. (It shouldn't make much of a difference, but it's more precise.) You also probably don't need to check that the world is clientside.
But yes, your code looks correct. If you want it to switch at dawn and dusk, I recommend using:
thnks guy, you are nice person.