Leemyy
Terrarian
I looked into Terrarias code and this is approximately how it checks biomes for mob drops/spawns:So what should I put if Forest and Underworld don't have flags?
Code:
NPC npc = this.npc;
Player player = Main.player[(int)Player.FindClosest(npc.position, npc.width, npc.height)];
int tileX = (int)(player .Center.X / 16f);
int tileY = (int)(player .Center.Y / 16f);
bool inSky = (double)tileY < Main.worldSurface * (Main.hardMode? 0.44999998807907104 : 0.34999999403953552);
if ((tileX < 250 || tileX > Main.maxTilesX - 250) && tileY < Main.rockLayer && !inSky)
{
//In the Ocean biome
}
if (tileY > Main.maxTilesY - 190)
{
//In the Underworld
}
if (tileY < Main.worldSurface && !inSky && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneJungle && !player.ZoneSnow && !player.ZoneDesert && !player.ZoneGlowshroom)
{
//In the Forest
if (!player.ZoneMeteor && !player.ZoneTowerSolar && !player.ZoneTowerVortex && !player.ZoneTowerNebula && !player.ZoneTowerStardust)
{
//Strictly no other biomes
}
}