拥有此效果时,取消外来伤害。
此处摘取部分源代码:
public void onLivingPotionEvent(LivingAttackEvent event) {
EntityLivingBase target = event.getEntityLiving();
DamageSource damage = event.getSource();
float amount = event.getAmount();
if (target != null && !target.field_70170_p.field_72995_K) {
if (target.func_70644_a(TFCore.DAMAGE_CANCEL))
event.setCanceled(true);
资料分类: | BUFF-1.12 |