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()
|
||||
{
|
||||
distance = 32;
|
||||
spread = 3;
|
||||
distance = 32;
|
||||
spread = 3;
|
||||
|
||||
// 4J added initialisers
|
||||
for (int i = 0; i < strongholdPos_length; i++)
|
||||
{
|
||||
strongholdPos[i] = nullptr;
|
||||
}
|
||||
isSpotSelected = false;
|
||||
strongholdPos_length = 1;
|
||||
|
||||
for (int i = 0; i < MAX_STRONGHOLDS; i++)
|
||||
{
|
||||
strongholdPos[i] = nullptr;
|
||||
}
|
||||
|
||||
isSpotSelected = false;
|
||||
}
|
||||
|
||||
StrongholdFeature::StrongholdFeature() : StructureFeature()
|
||||
|
|
@ -89,6 +91,16 @@ bool StrongholdFeature::isFeatureChunk(int x, int z,bool bIsSuperflat)
|
|||
{
|
||||
if (!isSpotSelected)
|
||||
{
|
||||
#ifdef _LARGE_WORLDS
|
||||
if (level->dimension->getXZSize() >= LEVEL_WIDTH_INFINITE)
|
||||
{
|
||||
strongholdPos_length = 128;
|
||||
}
|
||||
else
|
||||
{
|
||||
strongholdPos_length = 1;
|
||||
}
|
||||
#endif
|
||||
Random random;
|
||||
|
||||
random.setSeed(level->getSeed());
|
||||
|
|
|
|||
|
|
@ -29,8 +29,11 @@ private:
|
|||
static vector<Biome *> allowedBiomes;
|
||||
|
||||
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
|
||||
ChunkPos *strongholdPos[strongholdPos_length];
|
||||
//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];
|
||||
static const int MAX_STRONGHOLDS = 128;
|
||||
ChunkPos *strongholdPos[MAX_STRONGHOLDS];
|
||||
int strongholdPos_length;
|
||||
double distance;
|
||||
int spread;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue