I have created my structure and it has a several components. It is generated through a MapGen file. Below is the method that actually makes it generate. How would I increase the rate that it generates in the world?
protected boolean canSpawnStructureAtCoords(int par1, int par2)
{
byte byte0 = 27;
byte byte1 = 9;
int i = par1;
int j = par2;
if (par1 < 0)
{
par1 -= byte0 - 1;
}
if (par2 < 0)
{
par2 -= byte0 - 1;
}
int k = par1 / byte0;
int l = par2 / byte0;
Random random = worldObj.setRandomSeed(k, l, 0x9e7f70);
k *= byte0;
l *= byte0;
k += random.nextInt(byte0 - byte1);
l += random.nextInt(byte0 - byte1);
par1 = i;
par2 = j;
if (par1 == k && par2 == l)
{
boolean flag = worldObj.getWorldChunkManager().areBiomesViable(par1 * 16 + 8, par2 * 16 + 8, 0, villageSpawnBiomes);
if (flag)
{
return true;
}
}
return false;
}
I have tried a few things, but nothing seems to make it work.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
this if statement is the relavent one.. basically this checks if the value's match with the seed's effect and the chunk coordinates...
everything is based on the bytes... where their vaules have a common factor of 3. the discrepancy between the two is 18. you need to manipulate these bytes to a smaller discrepancy...
try
byte0 = 8;
byte1 = 2;
Thanks, but I don't think the structure is spawning at all. I need to find where the stronghold is set up to generate with the world.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I have tried a few things, but nothing seems to make it work.
together they are powerful beyond imagination."
this if statement is the relavent one.. basically this checks if the value's match with the seed's effect and the chunk coordinates...
everything is based on the bytes... where their vaules have a common factor of 3. the discrepancy between the two is 18. you need to manipulate these bytes to a smaller discrepancy...
try
byte0 = 8;
byte1 = 2;
together they are powerful beyond imagination."