mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
futureproof stronghold (untested)
This commit is contained in:
parent
fb37ced5c2
commit
b608eaf29a
|
|
@ -33,15 +33,17 @@ void StrongholdFeature::staticCtor()
|
||||||
|
|
||||||
void StrongholdFeature::_init()
|
void StrongholdFeature::_init()
|
||||||
{
|
{
|
||||||
distance = 32;
|
distance = 32;
|
||||||
spread = 3;
|
spread = 3;
|
||||||
|
|
||||||
// 4J added initialisers
|
strongholdPos_length = 1;
|
||||||
for (int i = 0; i < strongholdPos_length; i++)
|
|
||||||
{
|
for (int i = 0; i < MAX_STRONGHOLDS; i++)
|
||||||
strongholdPos[i] = nullptr;
|
{
|
||||||
}
|
strongholdPos[i] = nullptr;
|
||||||
isSpotSelected = false;
|
}
|
||||||
|
|
||||||
|
isSpotSelected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
StrongholdFeature::StrongholdFeature() : StructureFeature()
|
StrongholdFeature::StrongholdFeature() : StructureFeature()
|
||||||
|
|
@ -89,6 +91,16 @@ bool StrongholdFeature::isFeatureChunk(int x, int z,bool bIsSuperflat)
|
||||||
{
|
{
|
||||||
if (!isSpotSelected)
|
if (!isSpotSelected)
|
||||||
{
|
{
|
||||||
|
#ifdef _LARGE_WORLDS
|
||||||
|
if (level->dimension->getXZSize() >= LEVEL_WIDTH_INFINITE)
|
||||||
|
{
|
||||||
|
strongholdPos_length = 128;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strongholdPos_length = 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Random random;
|
Random random;
|
||||||
|
|
||||||
random.setSeed(level->getSeed());
|
random.setSeed(level->getSeed());
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,11 @@ private:
|
||||||
static vector<Biome *> allowedBiomes;
|
static vector<Biome *> allowedBiomes;
|
||||||
|
|
||||||
bool isSpotSelected;
|
bool isSpotSelected;
|
||||||
static const int strongholdPos_length = 1;// Java game has 3, but xbox game only has 1 because of the world size; // 4J added
|
//static const int strongholdPos_length = 1;// Java game has 3, but xbox game only has 1 because of the world size; // 4J added
|
||||||
ChunkPos *strongholdPos[strongholdPos_length];
|
//ChunkPos *strongholdPos[strongholdPos_length];
|
||||||
|
static const int MAX_STRONGHOLDS = 128;
|
||||||
|
ChunkPos *strongholdPos[MAX_STRONGHOLDS];
|
||||||
|
int strongholdPos_length;
|
||||||
double distance;
|
double distance;
|
||||||
int spread;
|
int spread;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue