TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Calendar data saved in non-standard NTFS Alternate Stream format

AnodeCathode opened this issue ยท 2 comments

commented

The calendar data for the world is saved in a file named TFC:calendar.dat The colon in the filename causes it to store the data on Windows in an alternate data stream. Leaving a file named TFC in the world/data folder with zero bytes. This causes backups to break as the calendar will be reset if a backup is restored.

Make sure to include:

  1. What did you expect to happen? Restoring a backup, or moving a world from one computer to another should not reset the calendar date.
  2. What actually happened instead (i.e. what was the bug). The calendar resets completely.

To Reproduce
Attention to detail is important!

  1. Do 'have a world'.
    Take a backup of the world.
    Restore the backup.
    The calendar will have reset to June 1, 1000
  • TFC Latest.
commented

Some more context:

This is the source of the file name, which evidently cannot be namespaced with a colon:

private static final String NAME = MOD_ID + ":calendar";

In the interest of not breaking world compatibility, if this does get fixed it should be behind a config option, which defaults to the old behavior (for 1.12). As fixing this would break some serious assumptions about PLAYER_TIME which should never be violated (as they essentially break all of time tracking)

commented

Well anyone making world backups and hoping to use them or ever moving a world save from one location to another will be in for a nasty surprise.