callumerrington / Somnia

A Minecraft mod which adds realistic sleeping by simulating the world
10 stars 9 forks source link

UI Fails on Alternate Beds #24

Open ghost opened 8 years ago

ghost commented 8 years ago

I noticed that the Somnia UI does not work if I sleep in an OpenBlocks sleeping bag, or a Carpenter's Bed; you just get the "wake up" button, and an otherwise blank screen. Additionally, this also means you can sleep forever unless you press the button to wake up. If you sleep on a vanilla bed, however, everything seems to work properly.

callumerrington commented 8 years ago

I'd have to look at how those mods handle sleeping with their custom items/blocks. Right now I hook the interact event with the vanilla bed block, however there are some checks that occur every tick so that certain processes happen when the player is asleep. I'm guessing since those per-tick checks still pass but the initial sleep event is never triggered, there's some unexpected behaviour.

I'll have a look into it, and possibly work towards some kind of common sleeping framework that other mods (including Somnia) can use. Right now it seems that most mods that modify or extend sleeping behaviour conflict with each other.

ghost commented 8 years ago

Fair enough.

DragGon7601 commented 8 years ago

DecoCraft also adds some beds and a hammock. It would be nice if it worked with these too.