Vg34100 / Minecraft-SleepCycle

MIT License
0 stars 0 forks source link

Version 1.0.1 causes randomTickSpeed to be set to 0 on world load #3

Closed SidekickDART closed 3 months ago

SidekickDART commented 3 months ago

The main symptoms I noticed were that my crops weren't growing and that grass blocks weren't spreading to dirt blocks.

Steps to reproduce:

  1. Start/Join world
  2. Open world to LAN to enable cheats
  3. Run command /gamerule randomTickSpeed
  4. Chat/Console reads Gamerule randomTickSpeed is currently set to: 0
  5. Run command /gamerule randomTickSpeed 3
  6. Chat/Console reads Gamerule randomTickSpeed is now set to: 3
  7. Leave world
  8. Start/Join world
  9. Open world to LAN to enable cheats
  10. Run command /gamerule randomTickSpeed
  11. Chat/Console reads Gamerule randomTickSpeed is currently set to: 0

This is on a single player world and I've double checked that it is indeed SleepCycle casuing this issue. Also verified that version 1.0.0 does not cause this issue. I tried to test with different SleepCycle config settings but results were intermittent and I was confusing myself. I can confirm that the issue occurs with default settings.

I've also attached my game log but looking through it, it doesn't seem very insightful. SleepCycle bug.txt

SidekickDART commented 3 months ago

Upon further troubles, it seems the randomTickSpeed may also get set to 0 after sleeping on 1.0.0 but I've only just now noticed this.

Vg34100 commented 3 months ago

I see what's happening here, and I apologize for the oversight. When a player disconnects, the tick speed is set back to the original tick speed. However, the original tick speed was only saved when the player interacted with a bed. If the player doesn't sleep in a bed, the original tick speed remains uninitialized, leading to the issues you've described. I'll be uploading a fix for this very soon.