Somnia Awoken

Somnia Awoken

27.3k Downloads

With Mahou Tsukai installed, mana use increases but not mana regen when sleeping

aaronhowser1 opened this issue ยท 5 comments

commented

Hi,

I'm Mahou dev,

This is likely cause the mana regen is done by doing something like

if(world.getTotalWorldTime() % 100 == 0)
regenMana()

I had to change it to this from just using world.getWorldTime() cause some dimensions freeze time and mana regen would regen infinitely in those dimensions.

I doubt it's fixable and it'd probably be easier to just fire PlayerWakeUpEvent after the sleep, if you're not already

commented

Thanks for the explanation. Somnia lets vanilla handle the sleep wherever possible, including wakeup. EntityPlayer#wakeUpPlayer is called, which fires the said PlayerWakeUpEvent. @aaronhowser1 did the mana regen when you woke up?

commented

I believe I also check the time they wake up (to make sure its morning) so it's possible it only regens sometimes, but that's not that big of a deal I'd say

commented

What time was it?

commented

Yes, the mana started regenning when I woke up. Or rather, it stopped getting used faster. It was still regenning when I was sleeping, it's just that it was getting used faster