Package net.glowstone.io.nbt
Class NbtStructureDataService
java.lang.Object
net.glowstone.io.nbt.NbtStructureDataService
- All Implemented Interfaces:
StructureDataService
-
Constructor Summary
ConstructorDescriptionNbtStructureDataService
(GlowWorld world, File structureDir) Creates the instance for the given world's structures. -
Method Summary
Modifier and TypeMethodDescriptionReads the structures data from storage.void
writeStructuresData
(Map<Integer, GlowStructure> structures) Write the structures data to storage.
-
Constructor Details
-
NbtStructureDataService
Creates the instance for the given world's structures.- Parameters:
world
- the worldstructureDir
- the world's structure-data folder, which is created if it doesn't exist
-
-
Method Details
-
readStructuresData
Description copied from interface:StructureDataService
Reads the structures data from storage.- Specified by:
readStructuresData
in interfaceStructureDataService
- Returns:
- A map containing structures indexed by their chunk hash.
-
writeStructuresData
Description copied from interface:StructureDataService
Write the structures data to storage.- Specified by:
writeStructuresData
in interfaceStructureDataService
- Parameters:
structures
- The structures to write to storage.
-