TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ NewItem() [10/10]

static int Terraria.Item.NewItem ( IEntitySource source,
Vector2 position,
Item item,
bool noBroadcast = false,
bool noGrabDelay = false,
bool reverseLookup = false )
inlinestatic



This particular overload uses an Item instead of just the item type. All modded data will be preserved.

This particular overload uses a Vector2 instead of X, Y, Width, and Height to determine the actual spawn position.

Returns

Definition at line 52041 of file Item.cs.

52042 {
52043 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
52044 //IL_0008: Unknown result type (might be due to invalid IL or missing references)
52045 return NewItem(source, (int)position.X, (int)position.Y, 0, 0, item, noBroadcast, noGrabDelay, reverseLookup);
52046 }
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int noGrabDelay
The delay, in ticks, before players can pick up this item. Usually set to 100 (approximately 1....
Definition Item.cs:183
static int NewItem(IEntitySource source, Vector2 pos, Vector2 randomBox, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
This particular overload uses two Vector2 to determine the actual spawn position.
Definition Item.cs:51478

References Terraria.Item.NewItem(), Terraria.Item.noGrabDelay, and Terraria.Entity.position.

+ Here is the call graph for this function: