As i say in the title, I would like to generate a structure when blocks at certain position are destroyed, equal air. I tried some things,but it was a failure,so I shall return to the forum...
Here 's my code :
( As you can see, I've tried to add an update on the block who need to be destroyed for spawn structure )
public void generateSurface(World world, Random rand, int i, int j)
{
for(int k = 0; k < 1; k++)
{
int RandPosX = i + rand.nextInt(16);
int RandPosY = rand.nextInt(128);
int RandPosZ = j + rand.nextInt(16);
(new WorldGenEternalFrostDungeon()).generate(world, rand, RandPosX, RandPosY, RandPosZ);
world.markBlockNeedsUpdate(RandPosX + -24, RandPosY + 1, RandPosZ + 14);
world.markBlockNeedsUpdate(RandPosX + -24, RandPosY + 1, RandPosZ + 14);
int l = world.getBlockId(RandPosX + -24, RandPosY + 1, RandPosZ + 14);
int m = world.getBlockId(RandPosX + -20, RandPosY + 1, RandPosZ + 14);
if (l == 0 && m == 0)
{
(new WorldGenEternalFrostDungeon2()).generate(world, rand, RandPosX, RandPosY, RandPosZ);
}
}
}











