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

◆ CanVisuallyHoldItem()

bool Terraria.Player.CanVisuallyHoldItem ( Item item)
inline

Definition at line 50998 of file Player.cs.

50999 {
51000 if (item.holdStyle == 4)
51001 {
51002 if (isPettingAnimal)
51003 {
51004 return false;
51005 }
51006 if (pulley)
51007 {
51008 return false;
51009 }
51010 if (gravDir == -1f)
51011 {
51012 return false;
51013 }
51014 if (velocity.Y != 0f)
51015 {
51016 return false;
51017 }
51018 if (mount.Active)
51019 {
51020 return false;
51021 }
51022 }
51023 if (item.holdStyle == 6 && isPettingAnimal)
51024 {
51025 return false;
51026 }
51027 if (item.holdStyle == 5 && isPettingAnimal)
51028 {
51029 return false;
51030 }
51031 return true;
51032 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
bool Active
Definition Mount.cs:348
bool isPettingAnimal
Definition Player.cs:3005
Mount mount
This player's T:Terraria.Mount. Do not overwrite this value. Instead, call M:Terraria....
Definition Player.cs:2323

References Terraria.Mount.Active, Terraria.Player.gravDir, Terraria.Item.holdStyle, Terraria.Player.isPettingAnimal, Terraria.Player.mount, Terraria.Player.pulley, and Terraria.Entity.velocity.

Referenced by Terraria.Player.ItemCheck_ApplyHoldStyle_Inner(), and Terraria.Player.PlayerFrame().

+ Here is the caller graph for this function: