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

◆ DefaultToPlaceableTile() [2/2]

void Terraria.Item.DefaultToPlaceableTile ( ushort tileIDToPlace,
int tileStyleToPlace = 0 )
inline

This method sets a variety of Item values common to items that place tiles.
Specifically:

createTile = tileIDToPlace; placeStyle = tileStyleToPlace; width = 14; height = 14; useStyle = F:Terraria.ID.ItemUseStyleID.Swing; useAnimation = 15; useTime = 10; maxStack = F:Terraria.Item.CommonMaxStack; useTurn = true; autoReuse = true; consumable = true;

Parameters
tileIDToPlace
tileStyleToPlace

Definition at line 48601 of file Item.cs.

48602 {
48605 width = 14;
48606 height = 14;
48607 useStyle = 1;
48608 useAnimation = 15;
48609 useTime = 10;
48611 useTurn = true;
48612 autoReuse = true;
48613 consumable = true;
48614 }
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
bool useTurn
Whether the player can turn around while the using animation of this item is happening....
Definition Item.cs:500
int useAnimation
The time span of the using animation for the item in ticks. This is independent of the time it takes ...
Definition Item.cs:384
int maxStack
The maximum number of items that can be contained within a single stack. F:Terraria....
Definition Item.cs:402
int createTile
The ID of the tile this item places on use. Either a T:Terraria.ID.TileID entry or M:Terraria....
Definition Item.cs:435
bool consumable
Whether the item is consumed after use. If consumed, the item stack will decrease by 1....
Definition Item.cs:488
int useStyle
Assign to an T:Terraria.ID.ItemUseStyleID value to give this item a specific animation while in use....
Definition Item.cs:366
static int CommonMaxStack
The default stack size for stackable items: 9999.
Definition Item.cs:94
int placeStyle
The style of the tile being placed. Used for tiles that have a different look depending on the item u...
Definition Item.cs:448
int useTime
The time span of using the item in ticks. This is independent of the time it takes for the item anima...
Definition Item.cs:391
bool autoReuse
Whether the item is in continuous use while the mouse button is held down. Defaults to false.
Definition Item.cs:494

References Terraria.Item.autoReuse, Terraria.Item.CommonMaxStack, Terraria.Item.consumable, Terraria.Item.createTile, Terraria.Entity.height, Terraria.Item.maxStack, Terraria.Item.placeStyle, Terraria.Item.useAnimation, Terraria.Item.useStyle, Terraria.Item.useTime, Terraria.Item.useTurn, and Terraria.Entity.width.