history_manager

class amulet.api.history_manager.ChunkHistoryManager(temp_dir)[source]

Bases: object

Class to manage changes and deletions of chunks

add_original_chunk(chunk, dimension)[source]

Adds the given chunk to the chunk history

create_snapshot(chunk_cache)[source]

Find all the chunks which have changed since the last snapshot, serialise them and store the path to the file (or None if it has been deleted)

mark_saved()[source]

Let the history manager know that the world has been saved

redo(chunk_cache)[source]

Re-increments the internal change index and un-serialises the chunks from the next newest change

undo(chunk_cache)[source]

Decrements the internal change index and un-serialises the last save state for each chunk changed

unsaved_changes

The number of changes that have been made since the last save

Return type:int