Files

44 lines
987 B
C
Raw Permalink Normal View History

2026-03-01 12:16:08 +08:00
#pragma once
class StructurePiece;
class BoundingBox;
#include "StructureFeatureIO.h"
2026-03-01 12:16:08 +08:00
class StructureStart
{
public:
list<StructurePiece *> pieces;
2026-03-01 12:16:08 +08:00
protected:
BoundingBox *boundingBox;
private:
int chunkX, chunkZ;
2026-03-01 12:16:08 +08:00
public:
StructureStart();
StructureStart(int x, int z);
2026-03-01 12:16:08 +08:00
~StructureStart();
BoundingBox *getBoundingBox();
list<StructurePiece *> *getPieces();
void postProcess(Level *level, Random *random, BoundingBox *chunkBB);
2026-03-01 12:16:08 +08:00
protected:
void calculateBoundingBox();
public:
virtual CompoundTag *createTag(int chunkX, int chunkZ);
virtual void addAdditonalSaveData(CompoundTag *tag);
virtual void load(Level *level, CompoundTag *tag);
virtual void readAdditonalSaveData(CompoundTag *tag);
protected:
void moveBelowSeaLevel(Level *level, Random *random, int offset);
2026-03-01 12:16:08 +08:00
void moveInsideHeights(Level *level, Random *random, int lowestAllowed, int highestAllowed);
public:
bool isValid();
int getChunkX();
int getChunkZ();
2026-03-01 12:16:08 +08:00
virtual EStructureStart GetType() = 0;
2026-03-01 12:16:08 +08:00
};