Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Celestials compatibility problem #6

Closed
GauntAndreX8 opened this issue Aug 22, 2021 · 10 comments
Closed

Enhanced Celestials compatibility problem #6

GauntAndreX8 opened this issue Aug 22, 2021 · 10 comments
Labels
incompatibility Incompatibility with another mod

Comments

@GauntAndreX8
Copy link

There is a bug with Enchanced Celestial like when I go sleep during bloodmoon I’m in a bed for a sec but later automatically made me leave the bed saying it’s bloodmoon and it causes to forward time a bit more so I suggest like They should only speed up time after the player actually sleeps

@DuckyCrayfish DuckyCrayfish added bug Something isn't working incompatibility Incompatibility with another mod and removed bug Something isn't working labels Aug 23, 2021
@DuckyCrayfish
Copy link
Owner

I was about to go digging, thanks for saving me the trouble @CorgiTaco

@DuckyCrayfish DuckyCrayfish changed the title Compatible problem Enhanced Celestials compatibility problem Aug 23, 2021
@GauntAndreX8
Copy link
Author

Wait so is the problem fixed or you guys still doing your thing

@GauntAndreX8
Copy link
Author

When I mean thing I mean still working on it

@DuckyCrayfish
Copy link
Owner

@CorgiTaco I have a suggestion. If you're comfortable having Forge events in your mod (it seems you prefer sponge methods), using the SleepingTimeCheckEvent event will not only prevent time from starting to progress in Hourglass, but it will also prevent the "blinking in an out of bed" effect that currently happens when you try to get in bed during a blood moon. It will instead prevent the player from getting into bed in the first place while presenting them with your red Game Info message, similar to how vanilla handles a player trying to sleep during the day.

Unfortunately this event does not get called on other LivingEntities like villagers, so this event will have to be implemented alongside either your current method of sleep prevention, or alongside an additional SleepingLocationCheckEvent, which is called for villagers.

@DuckyCrayfish
Copy link
Owner

While troubleshooting this issue I noticed that Lunar Event chat notifications will sometimes get sent twice. I'll work on fixing this as well.

@CorgiTaco
Copy link

Wouldn't the simplest solution here be firing the the boolean I mixin before anything? To me that makes the most sense and it also works on fabric, the reason I've exclusively used mixins here is due to my mod needing to work on both forge + fabric w/ little to no changes.

@CorgiTaco
Copy link

And on top of that, fabric does not have the mentioned forge events on their side of the fence, so I'm basically forced to use mixin.

@DuckyCrayfish
Copy link
Owner

Ahh, I understand. I did not realize your mod supports Fabric as well.

I agree that your suggestion is the easiest route. Another possibility is delaying time changes until the second tick in bed (more compatible with other Forge exclusive mods that utilize the SleepingLocationCheck).

I only asked in case the blink effect was something you were interested in preventing.

DuckyCrayfish added a commit that referenced this issue Aug 24, 2021
This commit changes the way sleeping players are counted to only include
those who have been sleeping longer than one tick. This is to increase
comptibility with mods like Enhanced Celestials which prevent the player
from sleeping by kicking them out of bed after 1 tick, which previously
allowed time to pass prematurely.

Fixes: #6
DuckyCrayfish added a commit that referenced this issue Aug 24, 2021
This commit changes the way sleeping players are counted to only include
those who have been sleeping longer than one tick. This is to increase
comptibility with mods like Enhanced Celestials which prevent the player
from sleeping by kicking them out of bed after 1 tick, which previously
allowed time to pass prematurely.

Fixes: #6
@DuckyCrayfish
Copy link
Owner

Issue fix released in v1.16.5-1.1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incompatibility Incompatibility with another mod
Projects
None yet
Development

No branches or pull requests

3 participants