T
- The type of structure being stored.public abstract class StructureStore<T extends GlowStructure> extends Object
Constructor and Description |
---|
StructureStore(Class<T> type,
String id) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
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 |
equals(Object o) |
String |
getId() |
Class<T> |
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.
|
String |
toString() |
public abstract T createStructure(GlowWorld world, int chunkX, int chunkZ)
world
- The target world.chunkX
- The structure chunk X.chunkZ
- The structure chunk Z.public abstract T createNewStructure(GlowWorld world, Random random, int chunkX, int chunkZ)
world
- The target world.random
- The seeded random.chunkX
- The structure chunk X.chunkZ
- The structure chunk Z.public void load(T structure, CompoundTag compound)
structure
- The target structure.compound
- The structure's tag.public void save(T structure, CompoundTag compound)
structure
- The structure to save.compound
- The target tag.public String getId()
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.