McJtyMods / InControl

Be In Control of Mob Spawns and others
MIT License
44 stars 16 forks source link

[Suggestion] Cyclic phases #374

Closed Via-GitHub closed 1 year ago

Via-GitHub commented 1 year ago

I think It would be great if you could add some cyclic condition into phase rules, like "days in multiples of n" and/or "day 0-10, day 11-20, day 21-30, and repeat". For now it's available with Serene Seasons but the effect of the mod is kinda too large to use for the sake of a single reason.

McJty commented 1 year ago

That's a good idea. Not sure how I'm going to do it though

Via-GitHub commented 1 year ago

Oh. I hope it's feasible. Thank you!

rvveber commented 1 year ago

Devide the worldTime, not totalTime, by 24000, floor the result, and add 1. (ceil doesn't work because when the result is actually 0 then it won't be ceiled to 1, causing an exception for the first tick of a new world)

This way we start counting the first day with 1. Which means we can now easily implement a config for nth-day by just comparing that value with whatever was configured.

If you're going to add this, please backport this feature for 1.12.2 so i can use it, because i would have good use for it.

McJty commented 1 year ago

@color-space I no longer work on 1.12.2 so that's not going to happen. Sorry

McJty commented 1 year ago

This will be implemented for the next version of InControl for 1.18.2 and 1.19.2+