illusivesoulworks / comforts

Minecraft Mod: Adds sleeping bags and hammocks for, respectively, portability and turning day to night, without setting new spawns. Comes in 16 different colors!
https://www.curseforge.com/minecraft/mc-mods/comforts
Other
46 stars 31 forks source link

[Bug]: Comforts' sleeptime check completly ignores other mods #122

Closed Cheaterpaul closed 1 year ago

Cheaterpaul commented 1 year ago

Minecraft Version

1.19.2

What happened?

Comforts sleep time check event handler ignores the result of other event handler

https://github.com/illusivesoulworks/comforts/blob/c77d7f8c2679cc5e94a8ab9cb66787cdbd41a8e6/forge/src/main/java/com/illusivesoulworks/comforts/common/ComfortsCommonEventsListener.java#L42C4-L52

Comforts sets the result of the event in any case. This will result in overriding the previous result. If your own result is DEFAULT you should not change anything about the event.

How do you trigger this bug?

  1. Use Vampirism and Comforts (and hope that Vampirism's event handler are invoked before comforts'. I used https://feed-the-beast.com/modpacks/101-ftb-presents-direwolf20-119 to reproduce it myself)
  2. Be a vampire /vampirism level vampirism:vampire 1
  3. Place coffin
  4. interact with the coffin at day
  5. get the message you can only sleep at day

Loader

Forge

Loader Version

43.2.6

API Version

No response

Mod Version

6.0.3+1.19.2

Relevant Log Outputs

No response