Definition at line 17682 of file WorldGen.cs.
17683 {
17684 int num = 0;
17685 for (
int i = 20; (double)i < Main.worldSurface;
i++)
17686 {
17687 for (
int j = 20;
j < Main.maxTilesX - 20;
j++)
17688 {
17690 {
17692 break;
17693 }
17694 }
17695 }
17696 byte b = (byte)
genRand.Next(13, 25);
17697 for (
int k = 0;
k < Main.maxTilesX;
k++)
17698 {
17699 bool flag = false;
17700 for (
int l = 0;
l < Main.maxTilesY;
l++)
17701 {
17702 if (!Main.tile[
k,
l].active() || !Main.tileDungeon[Main.tile[
k,
l].type])
17703 {
17704 continue;
17705 }
17706 if (Main.tile[
k,
l].type == 44)
17707 {
17710 {
17712 }
17713 }
17714 if (Main.tile[
k,
l].type == 43)
17715 {
17717 }
17718 if (Main.tile[
k,
l].type == 41)
17719 {
17721 }
17722 }
17723 if (flag)
17724 {
17725 break;
17726 }
17727 }
17728 for (
int m = 0;
m < Main.maxTilesX;
m++)
17729 {
17730 for (
int n = 5;
n < Main.maxTilesY - 5;
n++)
17731 {
17733 {
17734 Main.tile[
m,
n].color(
b);
17735 }
17736 if (Main.wallDungeon[Main.tile[
m,
n].wall])
17737 {
17738 Main.tile[
m,
n].wallColor(
b);
17739 }
17740 if (Main.tile[
m,
n].active())
17741 {
17742 bool flag2 =
false;
17743 if (Main.tile[
m,
n].type == 226)
17744 {
17746 }
17747 if (Main.tile[
m,
n].type == 137)
17748 {
17749 int num2 = Main.tile[
m,
n].frameY / 18;
17751 {
17753 }
17754 }
17756 {
17757 Main.tile[
m,
n].color(17);
17758 }
17759 }
17760 if (Main.tile[
m,
n].wall == 87)
17761 {
17762 Main.tile[
m,
n].wallColor(25);
17763 }
17764 if (!Main.tile[
m,
n].active())
17765 {
17766 continue;
17767 }
17769 {
17770 if (Main.tile[
m,
n - 1].type == 57)
17771 {
17772 Main.tile[
m,
n].active(active:
false);
17773 }
17774 Main.tile[
m,
n].liquid =
byte.MaxValue;
17775 Main.tile[
m,
n].lava(lava:
true);
17776 }
17777 if (
n < num && Main.tile[
m,
n].type == 2)
17778 {
17780 {
17781 Main.tile[
m,
n].type = 199;
17782 }
17783 else
17784 {
17785 Main.tile[
m,
n].type = 23;
17786 }
17787 if (Main.tile[
m,
n - 1].type == 3)
17788 {
17789 Main.tile[
m,
n - 1].active(active:
false);
17790 }
17791 if (Main.tile[
m,
n - 1].type == 73)
17792 {
17793 Main.tile[
m,
n - 1].active(active:
false);
17794 }
17795 if (Main.tile[
m,
n - 1].type == 27)
17796 {
17798 }
17799 if (Main.tile[
m,
n - 1].type == 596)
17800 {
17802 }
17803 if (Main.tile[
m,
n - 1].type == 616)
17804 {
17806 }
17807 if (Main.tile[
m,
n - 1].type == 82)
17808 {
17810 }
17811 if (Main.tile[
m,
n - 1].type == 83)
17812 {
17814 }
17815 if (Main.tile[
m,
n - 1].type == 186)
17816 {
17818 }
17819 if (Main.tile[
m,
n - 1].type == 187)
17820 {
17822 }
17823 if (Main.tile[
m,
n - 1].type == 185)
17824 {
17826 }
17827 if (Main.tile[
m,
n - 1].type == 227)
17828 {
17830 }
17831 }
17832 }
17833 }
17835 {
17836 if (
genRand.Next(10) != 0 || Main.chest[
num3].item[1].stack == 0)
17837 {
17838 continue;
17839 }
17841 {
17842 if (Main.chest[
num3].item[
num4].stack == 0)
17843 {
17844 Main.chest[
num3].item[
num4].SetDefaults(678);
17845 break;
17846 }
17847 }
17848 }
17849 }
static bool[] CrackedBricks
static bool remixWorldGen
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static UnifiedRandom genRand
References Terraria.Main.chest, Terraria.ID.TileID.Sets.Clouds, Terraria.ID.TileID.Sets.CrackedBricks, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Terraria.Main.tileDungeon, Terraria.Main.wallDungeon, and Terraria.Main.worldSurface.