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
ConstructorsConstructorDescriptionNbtWorldMetadataService(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.voidWrite 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:WorldMetadataServiceReads the world's metadata from storage, including final values such as seed and UUID that are only set on first load.- Specified by:
readWorldDatain interfaceWorldMetadataService- Returns:
- A
WorldMetadataService.WorldFinalValueswith the seed and UUID.
-
writeWorldData
Description copied from interface:WorldMetadataServiceWrite the world's metadata to storage.- Specified by:
writeWorldDatain interfaceWorldMetadataService- Throws:
IOException- if an I/O error occurs.
-