61697 {
61700 {
61701 return;
61702 }
61703 int num = 90;
61705 {
61706 num = 240;
61707 }
61708 if (((
double)
j < Main.worldSurface ||
remixWorldGen) && (!Main.tile[
i,
j - 1].active() || Main.tile[
i,
j - 1].type == 3 || Main.tile[
i,
j - 1].type == 51 || Main.tile[
i,
j - 1].type == 61 || Main.tile[
i,
j - 1].type == 73 || Main.tile[
i,
j - 1].type == 74 || Main.tile[
i,
j - 1].type == 184))
61709 {
61710 int num2 = Utils.Clamp(i - num, 1, Main.maxTilesX - 1 - 1);
61711 int num3 = Utils.Clamp(i + num, 1, Main.maxTilesX - 1 - 1);
61712 int num4 = Utils.Clamp(
j - num, 1, Main.maxTilesY - 1 - 1);
61713 int num5 = Utils.Clamp(
j + num, 1, Main.maxTilesY - 1 - 1);
61715 {
61717 {
61718 if (Main.tile[
k,
l].active() && Main.tile[
k,
l].type == 227 && (!
exoticPlant || Main.tile[
k,
l].frameX >= 272) && (
exoticPlant || Main.tile[
k,
l].frameX < 272))
61719 {
61720 return;
61721 }
61722 }
61723 }
61725 {
61726 int type = Main.tile[
i,
j].type;
61728 if (Main.tile[i,
j - 1].liquid > 0 && (Main.tile[i,
j - 1].lava() || Main.tile[
i,
j - 1].honey()))
61729 {
61730 flag = false;
61731 }
61732 if (flag)
61733 {
61735 }
61736 }
61737 else if (Main.tile[i,
j].type == 2 || Main.tile[i,
j].type == 109)
61738 {
61740 {
61742 }
61743 else
61744 {
61746 }
61747 }
61748 else if (Main.tile[i,
j].type == 60)
61749 {
61751 {
61753 }
61754 else
61755 {
61757 }
61758 }
61759 else if (Main.tile[i,
j].type == 53 && Main.tile[i,
j - 1].liquid ==
byte.MaxValue && Main.tile[i,
j - 2].liquid ==
byte.MaxValue)
61760 {
61762 }
61763 else if (Main.tile[i,
j].type == 80 && !Main.tile[i - 1,
j - 1].active() && !Main.tile[i + 1,
j - 1].active())
61764 {
61765 try
61766 {
61768 for (
int m = i - 5;
m <=
i + 5;
m++)
61769 {
61770 for (
int n =
j - 5;
n <=
j + 15;
n++)
61771 {
61772 if (Main.tile[
m,
n].active() && (Main.tile[
m,
n].type == 112 || Main.tile[
m,
n].type == 234))
61773 {
61775 }
61776 }
61777 }
61779 {
61781 }
61782 }
61783 catch
61784 {
61785 }
61786 }
61787 }
61788 if ((!((
double)
j >= Main.worldSurface) && !
remixWorldGen) ||
j >= Main.UnderworldLayer)
61789 {
61790 return;
61791 }
61792 if (!Main.tile[i,
j - 1].active() || Main.tile[i,
j - 1].type == 3 || Main.tile[i,
j - 1].type == 51 || Main.tile[i,
j - 1].type == 61 || Main.tile[i,
j - 1].type == 73 || Main.tile[i,
j - 1].type == 74 || Main.tile[i,
j - 1].type == 184)
61793 {
61794 int num6 = Utils.Clamp(i - num, 1, Main.maxTilesX - 1 - 1);
61795 int num7 = Utils.Clamp(i + num, 1, Main.maxTilesX - 1 - 1);
61796 int num8 = Utils.Clamp(
j - num, 1, Main.maxTilesY - 1 - 1);
61797 int num9 = Utils.Clamp(
j + num, 1, Main.maxTilesY - 1 - 1);
61799 {
61801 {
61803 {
61804 return;
61805 }
61806 }
61807 }
61809 {
61810 int type2 = Main.tile[
i,
j].type;
61812 {
61814 }
61815 }
61816 else if (Main.tile[i,
j].type == 60)
61817 {
61819 {
61821 }
61823 {
61825 }
61826 else
61827 {
61829 }
61830 }
61831 else if (Main.tile[i,
j].type == 0 || Main.tile[i,
j].type == 1 || Main.tile[i,
j].type == 59)
61832 {
61834 {
61836 }
61837 else
61838 {
61840 }
61841 }
61842 else if (Main.tile[i,
j - 1].liquid ==
byte.MaxValue && Main.tile[i,
j - 2].liquid ==
byte.MaxValue)
61843 {
61845 }
61846 }
61848 {
61849 return;
61850 }
61852 {
61854 {
61856 {
61857 return;
61858 }
61859 }
61860 }
61861 if (Main.tile[i,
j].type == 0)
61862 {
61864 }
61865 }
static bool remixWorldGen
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static UnifiedRandom genRand