Package net.glowstone.io.structure
Class StructureStore<T extends GlowStructure>
java.lang.Object
net.glowstone.io.structure.StructureStore<T>
- Type Parameters:
T
- The type of structure being stored.
- Direct Known Subclasses:
TempleStore
The base for structure store classes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
abstract T
createNewStructure
(GlowWorld world, Random random, int chunkX, int chunkZ) Create a new structure of this store's type in the given world.abstract T
createStructure
(GlowWorld world, int chunkX, int chunkZ) Create a structure of this store's type in the given world.boolean
getId()
getType()
int
hashCode()
void
load
(T structure, CompoundTag compound) Load structure data of the appropriate type from the given compound tag.void
save
(T structure, CompoundTag compound) Save information about this structure to the given tag.toString()
-
Constructor Details
-
StructureStore
-
-
Method Details
-
createStructure
Create a structure of this store's type in the given world. The load method will be called separately.- Parameters:
world
- The target world.chunkX
- The structure chunk X.chunkZ
- The structure chunk Z.- Returns:
- The structure.
-
createNewStructure
Create a new structure of this store's type in the given world. The load method will be called separately.- Parameters:
world
- The target world.random
- The seeded random.chunkX
- The structure chunk X.chunkZ
- The structure chunk Z.- Returns:
- The new structure.
-
load
Load structure data of the appropriate type from the given compound tag.- Parameters:
structure
- The target structure.compound
- The structure's tag.
-
save
Save information about this structure to the given tag.- Parameters:
structure
- The structure to save.compound
- The target tag.
-
getType
-
getId
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-