private static int LoadWorld_Version2(BinaryReader reader)
        {
            reader.BaseStream.Position = 0L;
            bool[] importance;
            int[]  array;
            if (!WorldFile.LoadFileFormatHeader(reader, out importance, out array))
            {
                return(5);
            }
            if (reader.BaseStream.Position != (long)array[0])
            {
                return(5);
            }
            WorldFile.LoadHeader(reader);
            if (reader.BaseStream.Position != (long)array[1])
            {
                return(5);
            }

            // ======================
            CreateCustomTileProvider();
            // ======================

            WorldFile.LoadWorldTiles(reader, importance);

            if (reader.BaseStream.Position != (long)array[2])
            {
                return(5);
            }
            WorldFile.LoadChests(reader);
            if (reader.BaseStream.Position != (long)array[3])
            {
                return(5);
            }
            WorldFile.LoadSigns(reader);
            if (reader.BaseStream.Position != (long)array[4])
            {
                return(5);
            }
            WorldFile.LoadNPCs(reader);
            if (reader.BaseStream.Position != (long)array[5])
            {
                return(5);
            }
            if (WorldFile.versionNumber >= 116)
            {
                if (WorldFile.versionNumber < 122)
                {
                    WorldFile.LoadDummies(reader);
                    if (reader.BaseStream.Position != (long)array[6])
                    {
                        return(5);
                    }
                }
                else
                {
                    WorldFile.LoadTileEntities(reader);
                    if (reader.BaseStream.Position != (long)array[6])
                    {
                        return(5);
                    }
                }
            }
            if (WorldFile.versionNumber >= 170)
            {
                WorldFile.LoadWeightedPressurePlates(reader);
                if (reader.BaseStream.Position != (long)array[7])
                {
                    return(5);
                }
            }
            if (WorldFile.versionNumber >= 189)
            {
                WorldFile.LoadTownManager(reader);
                if (reader.BaseStream.Position != (long)array[8])
                {
                    return(5);
                }
            }
            return(WorldFile.LoadFooter(reader));
        }