Package net.glowstone.io.nbt
Class NbtWorldMetadataService
java.lang.Object
net.glowstone.io.nbt.NbtWorldMetadataService
- All Implemented Interfaces:
WorldMetadataService
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.glowstone.io.WorldMetadataService
WorldMetadataService.WorldFinalValues
-
Constructor Summary
ConstructorDescriptionNbtWorldMetadataService
(GlowWorld world, File dir) Creates the instance for the given world's metadata. -
Method Summary
Modifier and TypeMethodDescriptionReads the world's metadata from storage, including final values such as seed and UUID that are only set on first load.void
Write the world's metadata to storage.
-
Constructor Details
-
NbtWorldMetadataService
Creates the instance for the given world's metadata.- Parameters:
world
- the worlddir
- the world's metadata folder, containing uid.dat and level.dat if the world has been previously saved; if this folder doesn't exist, it is created
-
-
Method Details
-
readWorldData
Description copied from interface:WorldMetadataService
Reads the world's metadata from storage, including final values such as seed and UUID that are only set on first load.- Specified by:
readWorldData
in interfaceWorldMetadataService
- Returns:
- A
WorldMetadataService.WorldFinalValues
with the seed and UUID.
-
writeWorldData
Description copied from interface:WorldMetadataService
Write the world's metadata to storage.- Specified by:
writeWorldData
in interfaceWorldMetadataService
- Throws:
IOException
- if an I/O error occurs.
-