//This is also used to skip looking on the solid sides of partially sealable blocks
if (!vec.sideDone[side])
{
// The sides 0 to 5 correspond with the ForgeDirections
// but saves a bit of time not to call ForgeDirection
BlockVec3 sideVec = vec.newVecSide(side);
if (!checkedLocal.contains(sideVec))
{
if (this.checkCount > 0)
{
this.checkCount--;
checkedLocal.add(sideVec);
Block id = sideVec.getBlockIDsafe_noChunkLoad(this.world);
// The most likely case
if (id == breatheableAirID)
{
nextLayer.add(sideVec);
}
else if (id == airID)
{
nextLayer.add(sideVec);
this.airToReplace.add(sideVec);
}
else if (id == breatheableAirIDBright)
{
nextLayer.add(sideVec);
}
else if (id == airIDBright)
{
nextLayer.add(sideVec);
this.airToReplaceBright.add(sideVec);
}
else if (id == null)
{
// Broken through to the void or the
// stratosphere (above y==255) - set
// unsealed and abort
this.checkCount = 0;
this.sealed = false;
return;
}
else if (this.canBlockPassAirCheck(id, sideVec, side))
{
nextLayer.add(sideVec);
}
else if (id == oxygenSealerID)
{
TileEntityOxygenSealer sealer = this.sealersAround.get(sideVec);
if (sealer != null && !this.sealers.contains(sealer))
{
if (side == 0)
{
this.sealers.add(sealer);
this.checkCount += sealer.getFindSealChecks();
}
else
{
//Allow this sealer to be checked from other sides
checkedLocal.remove(sideVec);
}
}
}
//If the chunk was unloaded, BlockVec3.getBlockID returns Blocks.bedrock
//which is a solid block, so the loop will treat that as a sealed edge
//and not iterate any further in that direction
}
// the if (this.isSealed) check here is unnecessary because of the returns
else
{
Block id = sideVec.getBlockIDsafe_noChunkLoad(this.world);
// id == null means the void or height y>255, both
// of which are unsealed obviously
if (id == null || id == airID || id == breatheableAirID || id == airIDBright || id == breatheableAirIDBright || this.canBlockPassAirCheck(id, sideVec, side))
{
this.sealed = false;