Just Enough Dimensions

Just Enough Dimensions

4M Downloads

Sleeping in bed don't skip night properly with custom day cycle

QuantumStatement opened this issue ยท 1 comments

commented

Minecraft 1.12.2
Forge 14.23.5.2854
Just Enough Dimensions 1.6.0-dev.20200416.184714

If dimension day cycle longer than standart cycle in vanilla, then sleeping in bed don't skip night properly. Player may wake up in the middle of night instead of morning.

example dimensions.json
{
  "dimensions": [
    {
      "dim": 0,
      "override": true,
      "dimensiontype": {
        "id": 0,
        "name": "overworld",
        "suffix": "",
        "keeploaded": true,
        "worldprovider": "WorldProviderSurfaceJED",
        "require_exact_match": true
      },
      "jed": {
        "CustomDayCycle": true,
        "DayLength": 27600,
        "NightLength": 20400
      }
    }
  ]
}
commented

Unfortunately vanilla or Forge doesn't have any proper way to set or get the day cycle length in the world. So for example sleeping will still use the vanilla code of adding time to the next multiple of the default hard coded 24000 ticks (or whatever the offset was exactly in the sleeping code).

The only way to fix this (other than a Forge PR, which might take ages to get in, and I think can't even happen for 1.12.2 anymore?) would be to use a "coremod" to edit the vanilla code in the appropriate places. I have considered making a separate add-on coremod for JED that would fix some of the things that can't work nicely without changing how the vanilla code works. No idea if or when that might happen, as I'm very busy with working on other mods as well.