mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 06:43:35 +00:00
53 lines
1.4 KiB
C++
53 lines
1.4 KiB
C++
#pragma once
|
|
#include "StructureFeature.h"
|
|
#include "../Structures/StructureStart.h"
|
|
class Biome;
|
|
|
|
class VillageFeature : public StructureFeature {
|
|
public:
|
|
static const std::wstring OPTION_SIZE_MODIFIER;
|
|
static const std::wstring OPTION_SPACING;
|
|
|
|
private:
|
|
int villageSizeModifier;
|
|
int townSpacing;
|
|
int minTownSeparation;
|
|
|
|
void _init(int iXZSize);
|
|
|
|
public:
|
|
static void staticCtor();
|
|
static std::vector<Biome*> allowedBiomes;
|
|
VillageFeature(int iXZSize);
|
|
VillageFeature(std::unordered_map<std::wstring, std::wstring> options,
|
|
int iXZSize);
|
|
std::wstring getFeatureName();
|
|
|
|
protected:
|
|
virtual bool isFeatureChunk(int x, int z, bool bIsSuperflat = false);
|
|
virtual StructureStart* createStructureStart(int x, int z);
|
|
|
|
public:
|
|
class VillageStart : public StructureStart {
|
|
public:
|
|
static StructureStart* Create() { return new VillageStart(); }
|
|
virtual EStructureStart GetType() {
|
|
return eStructureStart_VillageStart;
|
|
}
|
|
|
|
private:
|
|
bool valid;
|
|
int m_iXZSize;
|
|
|
|
public:
|
|
VillageStart();
|
|
VillageStart(Level* level, Random* random, int chunkX, int chunkZ,
|
|
int villageSizeModifier, int iXZSize);
|
|
bool isValid();
|
|
void addAdditonalSaveData(CompoundTag* tag);
|
|
void readAdditonalSaveData(CompoundTag* tag);
|
|
};
|
|
|
|
int m_iXZSize;
|
|
};
|