Survivor's Elegy

Survivor's Elegy

2.9k Downloads

Sleeping skips several days

CiscuLog opened this issue ยท 1 comments

commented

As of 1.0.0, sleeping skips multiple days.

Cause

The issue lies in this file.
The sleeping module doesn't stop when the player wakes up, as the function detects it's still nighttime and re-schedules itself.

Fix

Tie the schedule function to "SkipNight siscu.sleep_time" score so it only runs when the score is "0". This would stop the module and only 1 night would be skipped.

commented

To that i might add, the entire module is dogshit and should be rewritten so it's consistent altoghether.

What do you mean with these two commands??

execute as @a[gamemode=!spectator] if score @s siscu.sleep_time matches 99.. run scoreboard players add conditions_met siscu.sleep_time 1

execute if score conditions_met siscu.sleep_time = players_sleeping siscu.sleep_time if score players_sleeping siscu.sleep_time >= player_percentage siscu.day run scoreboard players set SkipNight siscu.sleep_time 1

The score @s siscu.sleep_time should go up to 109! We are implying running the day skip function up to 11 times!

Also the last command:

execute if predicate siscu:world/check_nighttime run schedule function siscu:world/day_features/sleeping 1t

With the newer, more precise daytime manipulation tools, no wonder this breaks apart! This could be forgiven with the old night skipping function, as it is now, it just keeps calling the sleeping module.

Geez, me, get it together...