T
- The type of structure piece being stored.public abstract class StructurePieceStore<T extends GlowStructurePiece> extends Object
Constructor and Description |
---|
StructurePieceStore(Class<T> type,
String id) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
abstract T |
createStructurePiece()
Create a structure piece of this store's type.
|
boolean |
equals(Object o) |
String |
getId() |
Class<T> |
getType() |
int |
hashCode() |
void |
load(T structurePiece,
CompoundTag compound)
Load structure piece data of the appropriate type from the given compound tag.
|
void |
save(T structurePiece,
CompoundTag compound)
Save information about this structure piece to the given tag.
|
String |
toString() |
public abstract T createStructurePiece()
The load method will be called separately.
public void load(T structurePiece, CompoundTag compound)
structurePiece
- The target structure piece.compound
- The structure piece's tag.public void save(T structurePiece, CompoundTag compound)
structurePiece
- The structure piece to save.compound
- The target tag.public String getId()
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.