How to disable NPCs from triggering RaidBlock?

Is there a way to disable the raid block affect when an NPC damages a player entity? There are no fields for raid block like the ones for combat block to keep the raid block from happening.

 
 
通用领域
适当位置添加如下代码

适当位置添加如下代码

适当位置添加如下代码

10/1000
 
 
 

Add the following code at the appropriate location:

if (raider == raider.IsNpc) return;