Use to check if a mechanism is allowed to spawn an Item of the provided type at the provided world coordinates. Checks nearby area to see if the Spawn Limitshave been reached.
Definition at line 49504 of file Item.cs.
49505 {
49506
49507
49511 Vector2
vector =
default(Vector2);
49512 for (int i = 0; i < 200; i++)
49513 {
49514 if (Main.item[i].active && Main.item[i].type ==
type)
49515 {
49518 float num5 = Main.item[i].position.X -
vector.X;
49519 float num4 = Main.item[i].position.Y -
vector.Y;
49522 {
49524 }
49526 {
49528 }
49529 }
49530 }
49532 {
49533 return false;
49534 }
49535 return true;
49536 }
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
References Terraria.Main.item, and Terraria.Item.type.