36833 {
36834 int num =
genRand.Next(20, Main.maxTilesX - 20);
36836 for (
num2 = (Main.remixWorld ?
genRand.Next(20, Main.maxTilesY - 20) : ((
genRand.
Next(40) == 0) ?
genRand.
Next((int)(Main.rockLayer + (double)Main.maxTilesY) / 2, Main.maxTilesY - 20) : ((
genRand.
Next(10) != 0) ?
genRand.
Next((int)Main.worldSurface, Main.maxTilesY - 20) :
genRand.
Next(20, Main.maxTilesY - 20))));
num2 < Main.maxTilesY - 20 && !Main.tile[num,
num2].active();
num2++)
36837 {
36838 }
36839 if (!Main.tile[num,
num2].nactive() || Main.tile[num,
num2 - 1].active() || Main.tile[num,
num2 - 1].liquid != 0)
36840 {
36841 return;
36842 }
36846 num3 = (int)((
double)
num3 * ((double)Main.maxTilesX / 4200.0));
36847 int num6 = Utils.Clamp(num -
num3, 4, Main.maxTilesX - 4);
36848 int num7 = Utils.Clamp(num +
num3, 4, Main.maxTilesX - 4);
36849 int num8 = Utils.Clamp(
num2 -
num3, 4, Main.maxTilesY - 4);
36850 int num9 = Utils.Clamp(
num2 +
num3, 4, Main.maxTilesY - 4);
36852 {
36854 {
36855 if (Main.tileAlch[Main.tile[i,
j].type])
36856 {
36858 }
36859 }
36860 }
36862 {
36863 if (Main.tile[num,
num2].type == 2 || Main.tile[num,
num2].type == 109)
36864 {
36866 }
36867 if (Main.tile[num,
num2].type == 60)
36868 {
36870 }
36871 if (Main.tile[num,
num2].type == 0 || Main.tile[num,
num2].type == 59)
36872 {
36874 }
36875 if (Main.tile[num,
num2].type == 23 || Main.tile[num,
num2].type == 661 || Main.tile[num,
num2].type == 25 || Main.tile[num,
num2].type == 203 || Main.tile[num,
num2].type == 199 || Main.tile[num,
num2].type == 662)
36876 {
36878 }
36880 {
36882 }
36883 if (Main.tile[num,
num2].type == 57 || Main.tile[num,
num2].type == 633)
36884 {
36886 }
36887 if (Main.tile[num,
num2].type == 147 || Main.tile[num,
num2].type == 163 || Main.tile[num,
num2].type == 164 || Main.tile[num,
num2].type == 161 || Main.tile[num,
num2].type == 200)
36888 {
36890 }
36891 if (Main.tile[num,
num2 - 1].active() && Main.netMode == 2)
36892 {
36893 NetMessage.SendTileSquare(-1, num,
num2 - 1);
36894 }
36895 }
36896 }
static UnifiedRandom genRand
static readonly int beachDistance
static bool PlaceAlch(int x, int y, int style)