lumien231 / Bloodmoon

The source code for the Bloodmoon Mod
23 stars 27 forks source link

Players able to sleep through blood moon with NoSleep=true #20

Open t2pellet opened 7 years ago

t2pellet commented 7 years ago

Title explains the issue. Bloodmoon version 1.5.1 (MC1.10.2) forge-1.10.2-12.18.3.2254-universal Sponge is included on the server. (spongeforge-1.10.2-2254-5.2.0-BETA-2254) Lots of other mods but i dont see why they would cause issues, but they incl foamfix, surge and betterfps

t2pellet commented 7 years ago

Probably should note this is with vanilla beds, and that the message "You don't feel tired enough to sleep" still pops up.

lumien231 commented 7 years ago

So can you reproduce this with only the Bloodmoon mod installed? (Without sponge)

Corosauce commented 5 years ago

With a friends modpack we have this issue too, the morpheus sleep mod (and possibly quarks sleep feature too) does some weird stuff that makes cancelling PlayerSleepInBedEvent ineffective.

I have an invasion mod that I've been testing a lot recently that also prevents sleep during some nights, here is my workaround to the problem, basically kick them out of bed if they somehow get into it:

https://github.com/Corosauce/HostileWorlds_Invasions/blob/1.12.x/src/main/java/com/corosus/inv/InvasionManager.java#L154-L165

Tested with many players, works great!