Terraria.Player Notes

Fields

FieldTypeDescription
adjHoney, adjLava, adjWaterboolIndicates whether the player is close enough to the corresponding type of liquid to use it for crafting. Updated only for the local player while the inventory screen is open.
adjTilebool[419]Each element indicates whether the player is close enough to the corresponding type of tile to use it for crafting. Updated only for the local player while the inventory screen is open.
Some elements correspond to more than one tile type: for example, adjTile[(int) TileID.Hellforge] is also true while the player is near an adamantite forge.
oldAdjHoney, oldAdjLava, oldAdjWaterboolIndicates whether the player was close enough to the corresponding type of liquid on the last frame.
oldAdjTilebool[419]Each element indicates whether the player was close enough to the corresponding type of tile on the last frame.
anglerQuestsFinishedintSelf-explanatory.
attackCDintThe number of frames until the player can again strike with a swung weapon. Does not apply to projectiles such as spears.
autoJumpboolIndicates whether the player can jump by holding the jump button. Reset every frame.
autoPaintboolIndicates whether the player will automatically paint placed objects. Reset every frame.
babyFaceMonsterboolIndicates whether the player has a baby face monster. If set to false, the pet vanishes after 2 frames. Reset every frame.
handon, handoff, back, front, shoe, waist, shield, neck, face, balloonintDetermines which accessory sprite for the corresponding slot is drawn on the player.
bankChestThe contents of their piggy bank.
bank2ChestThe contents of their safe.
beeboolIf true, a swarm of bees will be released when the player is hit. Reset every frame.
beetleBuffboolIndicates whether the player has either Beetle buff. Reset every frame; not used.
beetleCountdownintThe amount of time since the player struck a monster with a melee attack. Affects how quickly beetleCounter counts down. Only updated while the Beetle Might set is worn.
beetleCounterintA counter that increases as you deal damage with melee attacks and decreases with time depending on how long you spend without hitting something. If above certain thresholds, you gain the Beetle Might buff. Only updated while the Beetle Might set is worn; set to 0 otherwise.
beetleFrameintAffects beetle buff visual effects. Normally between 0 and 2.
beetleFrameCounterintIncremented every frame; if it reaches 1 or higher, it's reset to zero and beetleFrame is ticked.
skinVariantintDetermines the style of the player model. If skinVariant is < 4, the player is considered male. If skinVariant is >= 4 the player is considered female.
This value is clamped between 0 and 7, inclusive.
statLifeintRepresents the current amount of health (life) the player has.
This value should never be higher than statLifeMax.
statLifeMaxintRepresents the maximum amount of health the player has.

Methods

MethodTypeDescription
AdjTiles()voidScans the area around the player for crafting stations, and updates adjTile and similar fields, and the list of available recipes. Normally run every frame on the local player while the inventory screen is open.