Skip to content

Commit

Permalink
Disable Holy water damage when pvp is turned off.
Browse files Browse the repository at this point in the history
closes #1263
  • Loading branch information
maxanier committed Oct 14, 2023
1 parent 7733252 commit f4ba45b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public void onImpact(ThrowableItemEntity entity, ItemStack stack, RayTraceResult

if (!list1.isEmpty()) {
for (LivingEntity entitylivingbase : list1) {
if(thrower instanceof PlayerEntity && entitylivingbase instanceof PlayerEntity && !((PlayerEntity)thrower).canHarmPlayer((PlayerEntity) entitylivingbase)){
continue;
}
DamageHandler.affectEntityHolyWaterSplash(entitylivingbase, getStrength(tier), entity.distanceToSqr(entitylivingbase), result.getType() == RayTraceResult.Type.ENTITY, thrower instanceof LivingEntity ? (LivingEntity) thrower : null);
}
}
Expand Down

0 comments on commit f4ba45b

Please sign in to comment.