Et Futurum Requiem

Et Futurum Requiem

105k Downloads

Witchery Dream Weavers Don't Trigger with /gamerule playersSleepingPercentage

DarianLStephens opened this issue ยท 9 comments

commented

Initial Questions

  • I have searched this issue tracker and there is nothing similar already, and this is not on the list of known issues. Posting on a closed issue saying the bug still exists will prompt us to investigate and reopen it once we confirm your report.
  • I have verified that this issue occurs in a SUPPORTED environment, meaning I can reproduce this WITHOUT OptiFine, and without Bukkit+Forge server software like KCauldron, Thermos, Crucible, Mohist etc

Mod Version

etfuturum-2.6.2.jar

Describe the Issue

Normally, when sleeping with a Dream Weaver nearby, you will get the effects of that Dream Weaver.
If the playersSleepingPercentage is below 100, though, then you won't, even if you're the one doing the sleeping.
If you're the only player on the server, or playersSleepingPercentage is 100 and everyone sleeps, then they trigger normally.

This issue has been present in every night skip mod I've ever used in conjunction with Witchery, and this backported option in Et Futurum Requiem is no exception.
The exception is the Dream Weaver of Nightmares, which affects Witchery's sleeping brew and is unrelated to actual bed sleep.

Conflicting Mods

Witchery's Dream Weavers don't work when skipping the night with playersSleepingPercentage < 100.

Crash Report

No response

Other Details

No response

commented

Actually, I just tested it again on the server with playersSleepingPercentage 100, and it still didn't work.
Even being the only player didn't work. Does Et Futurum Requiem completely take over the sleeping, or is something else going on?

commented
commented

feel free to cope because unlike most other nightskip mods my impl defers everything to vanilla methods

commented

bitchery iterates over every player on the server to check if they're in bed
not sure why it misfires with gamerule 100 because no logic whatsoever is run in that case, I'd blame emoniph for using esoteric hacks
Image

commented

mayhaps this could be fixed with the use of reflection or ATs to probe ServerWorld#allPlayersSleeping instead of whatever this is, it could be a mixin but it's not on efr to fix witchery

commented

I'm assuming that part of the reason this happens might be the overwrite you put on the player sleeping logic. At least I think that's how you do it. I don't remember and I can't check right now. I can definitely change it to inject and other logic later. I was planning on doing it myself anyways, but now it's more of a priority.

commented

meds schizo
Image

commented

Something more seems to be strange.
I tried turning off the mixin, and the dream weaver worked, but then I turned it back on and it still worked after restarting.
Maybe something to note, the sleeping where it worked had the normal transition, with the screen darkening and it taking a few seconds, but the failed weaver attempts had the sleeping happen near instantly, skipping most the transition and just immediately awakening after laying down.

commented

the night shouldn't be skipped unless entityplayer.isPlayerFullyAsleep() returns true on all sleeping players, which happens after a value is incremented for 100 consecutive ticks while inside a bed
I don't touch anything in regards to that specific part so I have no clue why it would be misfiring like this