SleepWarp

SleepWarp

Mod

Accelerates time when sleeping instead of skipping directly to day.

Server AdventureDecorationGame MechanicsSocialUtility

421.0k downloads
546 followers
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!
Filter versions...
Filter channels...
  • Updated mappings to Minecraft 1.20.1 (compatible with 1.20)
  • Identified and fixed serious block duplication bug when tick_random_block was enabled
  • Improved usage of multithreading to improve throughput of warp world tick execution
  • Worlds which don't allow sleeping will not be ticked

This is not a release build. Please report any issues to GitHub or Discord!

Basically everything has been overhauled and improved.

  • Specific Fabric API modules are no longer bundled (jar-in-jar)
    • Fabric API is now a required dependency for both single player and dedicated server
  • Replaced .prop config files with JSON
    • All existing config files will no longer function.
  • Improved time acceleration and world simulation performance
    • Time is now ticked multiple times synchronously before ticking the world, and if there still time before dawn, then the various portions of the world will be ticked on one of three single-thread executors; monsters and animals will be ticked on one, random block ticks on another, and everything else will be ran on the third. This setup allows time to advance at a steady rate while the additional world ticks are processed sequentially and asynchronously on other threads.
  • The weather cycle is now ticked while sleeping
  • Added client configuration screen for ModMenu through YetAnotherConfigLib
  • Added action bar messages
    • Number of players required to sleep
      • Only when config option use_sleep_percentage is true
    • Remaining time until thunderstorm passes
    • Remaining time until players wake up
    • Current day
      • When waking up at dawn
  • Added /sleepwarp command
    • /sleepwarp config: Allows for real-time modification of configuration options.
    • /sleepwarp status: Displays each player and whether or not they're sleeping.
    • /sleep alias for /sleepwarp (e.g. /sleep config)
  • Added action_bar_messages configuration option, default true
  • Added tick_block_entities configuration option, default true
  • Added tick_random_block configuration option, default true
  • Added tick_snow_accumulation configuration option, default true
  • Added tick_ice_freezing configuration option, default true
  • Added tick_lightning configuration option, default true
  • Added tick_animals configuration option, default false
  • Added tick_monsters configuration option, default false
  • Added animal_tick_multiplier configuration option, default 0.25
    • Scales the amount of times passive animals are ticked
  • Added monster_tick_multiplier configuration option, default 0.25
    • Scales the amount of times hostile mobs are ticked
  • Changed max_ticks_added configuration option default value from 60 to 40
  • Changed player_scale configuration option default value from 0.2 to 0.4
  • Removed tick_chunks configuration option
    • Ticking whole chunks was a huge performance intensive option which became undesirable to use even in single player. If you simply wanted faster random tick speeds to increase sapling and crop growth, you had to also tick many things which you might not want to continually tick (like mob spawns).

Commit log: https://github.com/Giggitybyte/SleepWarp/compare/1.2.0...2.0.0

2.0.0 Change Log

2.0.0 Rewrite

Basically everything has been overhauled and improved.

  • Specific Fabric API modules are no longer bundled (jar-in-jar) with SleepWarp
    • Fabric API is now a required dependency for both single player and dedicated server
  • Replaced .prop config files with JSON
    • All existing config files will no longer function.
  • Added client configuration screen for ModMenu through YetAnotherConfigLib
  • Added action bar messages
    • Number of players required to sleep
      • Only when config option use_sleep_percentage is true
    • Remaining time until thunderstorm passes
    • Remaining time until players wake up
    • Current day
      • When waking up at dawn
  • Added /sleepwarp command
    • /sleepwarp config: Allows for real-time modification of configuration options.
    • /sleepwarp status: Displays each player and whether or not they're sleeping.
    • /sleep alias for /sleepwarp (e.g. /sleep config)
  • Improved time acceleration and world simulation performance
    • Time is now ticked multiple times synchronously before ticking the world, and if there still time before dawn, then the various portions of the world will be ticked on one of three single-thread executors; monsters and animals will be ticked on one, random block ticks on another, and everything else will be ran on the third. This setup allows time to advance at a steady rate while the additional world ticks are processed sequentially and asynchronously on other threads.
  • The weather cycle is now ticked while sleeping
  • Added action_bar_messages configuration option, default true
  • Added tick_block_entities configuration option, default true
  • Added tick_random_block configuration option, default true
  • Added tick_snow_accumulation configuration option, default true
  • Added tick_ice_freezing configuration option, default true
  • Added tick_lightning configuration option, default true
  • Added tick_animals configuration option, default false
  • Added tick_monsters configuration option, default false
  • Added animal_tick_multiplier configuration option, default 0.25
    • Scales the amount of times passive animals are ticked
  • Added monster_tick_multiplier configuration option, default 0.25
    • Scales the amount of times hostile mobs are ticked
  • Changed max_ticks_added configuration option default value from 60 to 40
  • Changed player_scale configuration option default value from 0.2 to 0.4
  • Removed tick_chunks configuration option
    • Ticking whole chunks was a huge performance intensive option which became undesirable to use even in single player. If you simply wanted faster random tick speeds to increase sapling and crop growth, you had to also tick many things which you might not want to continually tick (like mob spawns).

Commit log: https://github.com/Giggitybyte/SleepWarp/compare/1.2.0...2.0.0

  • Specific Fabric API modules and YetAnotherConfigLib (YACL) are no longer bundled (jar-in-jar) with SleepWarp
    • Fabric API is now a required dependency for both client and dedicated server.
    • ModMenu and YACL are optional dependencies on the client to access the configuration screen.
  • Improved world simulation performance
  • Removed config options:
    • performance_mode
      • Performance mode and the TickMonitor class have been removed
    • tick_entities
      • This would end up ticking everything, including the items on the ground and the player
      • Replaced by tick_animals and tick_monsters
    • tick_mob_spawn
      • Too much processing time for no real gameplay benefit
    • tick_spawners
      • The code behind this actually was ticking something that wasn't spawner blocks
      • I also decided it was silly to tick spawners while you're sleeping
  • Added config options:
    • tick_monsters
    • tick_animals
    • monster_tick_multiplier
      • Not implemented
    • animal_tick_multiplier
      • Not implemented
  • Action bar messages were tweaked
  • Made improvements to the client settings screen by separating the options in each category into labeled groups, swap boolean toggle buttons out for tick boxes, and spruced up option tooltips.

I was still not happy with the overall performance when all world simulation features were enabled. Time, weather, and additional world ticks were done synchronously and sequentially right at the end of the world tick, meaning at default settings the world would be ticked 60 times over before the next world tick would begin.

My solution is to tick time and weather synchronously before world ticking, and if there still time before dawn, then the various portions of the world will be ticked on one of three single-thread executors; monsters and animals will be ticked on one, random block ticks on another, and everything else will be ran on the third. This setup allows time to advance at a steady rate while the additional world ticks are processed sequentially and asynchronously on other threads.

  • Updated to Minecraft 1.19.4
  • Majority of the code was completely overhauled; should be smoother and more efficient
  • Replaced .prop config files with JSON.
    • All existing config files will no longer function.
  • Added ModMenu support through YetAnotherConfigLib.
  • Added /sleepwarp command
    • /sleepwarp config: Allows for real-time modification of configuration options.
    • /sleepwarp status: Displays each player and whether or not they're sleeping.
  • Added /sleep alias for /sleepwarp command
  • Added action bar messages
    • Number of players required to sleep
      • Only when config option use_sleep_percentage is true
    • Remaining time until players wake up
    • Current day when waking up
  • Weather is now ticked while sleeping
  • Changed player_scale configuration option default value from 0.2 to 0.6
  • Removed tick_chunks configuration option
    • Ticking chunks was a huge performance intensive option which became undesirable to use even in single player. If you simply wanted faster random tick speeds to increase sapling and crop growth, you had to also tick many things which you might not want to continually tick (like mob spawns).
    • I made this better by hand writing custom world tick code which iterates over chunks once and only ticks parts of the world that the user wants.
  • Added action_bar_messages configuration option, default true
  • Added tick_block_entities configuration option, default true
  • Added tick_random_block configuration option, default true
  • Added tick_snow_accumulation configuration option, default true
  • Added tick_ice_freezing configuration option, default true
  • Added tick_lightning configuration option, default true
  • Added tick_entities configuration option, default false
  • Added tick_mob_spawn configuration option, default false
  • Added tick_spawners configuration option, default false
  • Added performance_mode configuration option , default false

Commit log: https://github.com/Giggitybyte/SleepWarp/compare/1.2.0...2.0.0-rc1

The 1.17 branch was a based off of the 1.18 branch and used a Java version newer than 16, which was causing launch issues for users playing on 1.17. The required Java version has been changed to 16, with no additional adjustments to the code; users should now be able to use this mod without any issue!

The 1.16 branch was a based off of the 1.18 branch and uses a Java version newer than 8, which is causing launch issues for users playing on 1.16. The required Java version has been changed to 8 in with this commit and the code has been adjusted to match the available language features; users should now be able to use this mod without any issue!

Updated to Minecraft 1.19

  • Port of version 1.1.0 to MC 1.16.5
  • Port of version 1.1.0 to MC 1.17.1
  • Migrated codebase to Minecraft 1.18.2
  • Set minimum Minecraft version to 1.18.2

The latest Minecraft version brought a handful of breaking changes, including some modifications to some method signatures; those changes are not backwards compatible with older Minecraft 1.18 versions. As such, from this version on, Minecraft 1.18.2 will be the minimum supported version. I may backport version 1.1.0 to Minecraft 1.17 and below at some point, but fixes and new features will only be available for Minecraft 1.18.2 (1.1.1) and above.

Sleep Warp 1.1.0

This version brings two new opt-in features which provide a little more realism

Block Entity Simulation

Block entities (e.g. furnaces, spawners, pistons) can be ticked at the same rate as the time warp to simulate the passage of time.

Furnace Demo

To enable this feature, set tickBlockEntities=true in the configuration file.

Chunk Simulation

Chunks can be ticked at the same rate as the time warp to simulate the passage of time.

Growing Demo

Each chunk tick is responsible for most of the world simulation (e.g. crop growth, fire spread, mob spawns).

Geode Demo

To enable this feature, set tickChunks=true in the configuration file.


Project members

Giggitybyte

Owner

Details

Licensed MPL-2.0
Published 3 years ago
Updated a year ago