tModLoader v2023.01
A mod to make and play Terraria mods
Terraria.ModLoader.ProjectileLoader Class Reference

This serves as the central class from which projectile-related functions are carried out. It also stores a list of mod projectiles by ID. More...

Static Public Member Functions

static T AddModHook< T > (T hook)
 
static void AI (Projectile projectile)
 
static ? bool CanCutTiles (Projectile projectile)
 
static ? bool CanDamage (Projectile projectile)
 
static ? bool CanHitNPC (Projectile projectile, NPC target)
 
static bool CanHitPlayer (Projectile projectile, Player target)
 
static bool CanHitPvp (Projectile projectile, Player target)
 
static ? bool CanUseGrapple (int type, Player player)
 
static ? bool Colliding (Projectile projectile, Rectangle projHitbox, Rectangle targetHitbox)
 
static void CutTiles (Projectile projectile)
 
static void DrawHeldProjInFrontOfHeldItemAndArms (Projectile projectile, ref bool flag)
 
static void DrawOffset (Projectile projectile, ref int offsetX, ref int offsetY, ref float originX)
 
static ? Color GetAlpha (Projectile projectile, Color lightColor)
 
static ModProjectile GetProjectile (int type)
 Gets the ModProjectile instance corresponding to the specified type. More...
 
static bool GrappleOutOfRange (float distance, Projectile projectile)
 
static void GrapplePullSpeed (Projectile projectile, Player player, ref float speed)
 
static void GrappleRetreatSpeed (Projectile projectile, Player player, ref float speed)
 
static void GrappleTargetPoint (Projectile projectile, Player player, ref float grappleX, ref float grappleY)
 
static void Kill (Projectile projectile, int timeLeft)
 
static bool MinionContactDamage (Projectile projectile)
 
static void ModifyDamageHitbox (Projectile projectile, ref Rectangle hitbox)
 
static void ModifyDamageScaling (Projectile projectile, ref float damageScale)
 
static void ModifyFishingLine (Projectile projectile, ref float polePosX, ref float polePosY, ref Color lineColor)
 
static void ModifyHitNPC (Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 
static void ModifyHitPlayer (Projectile projectile, Player target, ref int damage, ref bool crit)
 
static void ModifyHitPvp (Projectile projectile, Player target, ref int damage, ref bool crit)
 
static void NumGrappleHooks (Projectile projectile, Player player, ref int numHooks)
 
static void OnHitNPC (Projectile projectile, NPC target, int damage, float knockback, bool crit)
 
static void OnHitPlayer (Projectile projectile, Player target, int damage, bool crit)
 
static void OnHitPvp (Projectile projectile, Player target, int damage, bool crit)
 
static bool OnTileCollide (Projectile projectile, Vector2 oldVelocity)
 
static void PostAI (Projectile projectile)
 
static void PostDraw (Projectile projectile, Color lightColor)
 
static bool PreAI (Projectile projectile)
 
static bool PreDraw (Projectile projectile, ref Color lightColor)
 
static bool PreDrawExtras (Projectile projectile)
 
static bool PreKill (Projectile projectile, int timeLeft)
 
static void ProjectileAI (Projectile projectile)
 
static byte[] ReadExtraAI (BinaryReader reader)
 
static void ReceiveExtraAI (Projectile projectile, byte[] extraAI)
 
static void SendExtraAI (BinaryWriter writer, byte[] extraAI)
 
static bool ShouldUpdatePosition (Projectile projectile)
 
static ? bool SingleGrappleHook (int type, Player player)
 
static bool TileCollideStyle (Projectile projectile, ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac)
 
static void UseGrapple (Player player, ref int type)
 
static byte[] WriteExtraAI (Projectile projectile)
 

Properties

static int ProjectileCount [get]
 

Detailed Description

This serves as the central class from which projectile-related functions are carried out. It also stores a list of mod projectiles by ID.

Member Function Documentation

◆ AddModHook< T >()

static T Terraria.ModLoader.ProjectileLoader.AddModHook< T > ( hook)
static
Type Constraints
T :HookList 

◆ GetProjectile()

static ModProjectile Terraria.ModLoader.ProjectileLoader.GetProjectile ( int  type)
static

Gets the ModProjectile instance corresponding to the specified type.

Parameters
typeThe type of the projectile
Returns
The ModProjectile instance in the projectiles array, null if not found.