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

◆ CanBeHitByItem()

virtual ? bool Terraria.ModLoader.ModNPC.CanBeHitByItem ( Player player,
Item item )
inlinevirtual

Allows you to determine whether this NPC can be hit by the given melee weapon when swung. Return true to allow hitting the NPC, return false to block hitting the NPC, and return null to use the vanilla code for whether the NPC can be hit. Returns null by default.

Parameters
player
item
Returns

Definition at line 475 of file ModNPC.cs.

476 {
477 return null;
478 }