Terraria.Player.AdjTiles C# (CSharp) Method

AdjTiles() public method

public AdjTiles ( ) : void
return void
        public void AdjTiles()
        {
            int num1 = 4;
            int num2 = 3;
            for (int index = 0; index < 419; ++index)
            {
                this.oldAdjTile[index] = this.adjTile[index];
                this.adjTile[index] = false;
            }
            this.oldAdjWater = this.adjWater;
            this.adjWater = false;
            this.oldAdjHoney = this.adjHoney;
            this.adjHoney = false;
            this.oldAdjLava = this.adjLava;
            this.adjLava = false;
            this.alchemyTable = false;
            int num3 = (int)(((double)this.position.X + (double)(this.width / 2)) / 16.0);
            int num4 = (int)(((double)this.position.Y + (double)this.height) / 16.0);
            for (int index1 = num3 - num1; index1 <= num3 + num1; ++index1)
            {
                for (int index2 = num4 - num2; index2 < num4 + num2; ++index2)
                {
                    if (Main.tile[index1, index2].active())
                    {
                        this.adjTile[(int)Main.tile[index1, index2].type] = true;
                        if ((int)Main.tile[index1, index2].type == 302)
                            this.adjTile[17] = true;
                        if ((int)Main.tile[index1, index2].type == 77)
                            this.adjTile[17] = true;
                        if ((int)Main.tile[index1, index2].type == 133)
                        {
                            this.adjTile[17] = true;
                            this.adjTile[77] = true;
                        }
                        if ((int)Main.tile[index1, index2].type == 134)
                            this.adjTile[16] = true;
                        if ((int)Main.tile[index1, index2].type == 354)
                            this.adjTile[14] = true;
                        if ((int)Main.tile[index1, index2].type == 355)
                        {
                            this.adjTile[13] = true;
                            this.adjTile[14] = true;
                            this.alchemyTable = true;
                        }
                    }
                    if ((int)Main.tile[index1, index2].liquid > 200 && (int)Main.tile[index1, index2].liquidType() == 0)
                        this.adjWater = true;
                    if ((int)Main.tile[index1, index2].liquid > 200 && (int)Main.tile[index1, index2].liquidType() == 2)
                        this.adjHoney = true;
                    if ((int)Main.tile[index1, index2].liquid > 200 && (int)Main.tile[index1, index2].liquidType() == 1)
                        this.adjLava = true;
                }
            }
            if (!Main.playerInventory)
                return;
            bool flag = false;
            for (int index = 0; index < 419; ++index)
            {
                if (this.oldAdjTile[index] != this.adjTile[index])
                {
                    flag = true;
                    break;
                }
            }
            if (this.adjWater != this.oldAdjWater)
                flag = true;
            if (this.adjHoney != this.oldAdjHoney)
                flag = true;
            if (this.adjLava != this.oldAdjLava)
                flag = true;
            if (!flag)
                return;
            Recipe.FindRecipes();
        }
Player