Config to disable Enderman teleport on projectile hit

This commit is contained in:
Encode42
2025-01-12 11:47:45 -08:00
committed by granny
parent 8fcf3141c4
commit a771a5beb7
3 changed files with 10 additions and 38 deletions

View File

@@ -26,6 +26,14 @@
} else {
boolean flag = damageSource.getDirectEntity() instanceof ThrownPotion;
if (!damageSource.is(DamageTypeTags.IS_PROJECTILE) && !flag) {
@@ -397,6 +_,7 @@
} else {
boolean flag1 = flag && this.hurtWithCleanWater(level, damageSource, (ThrownPotion)damageSource.getDirectEntity(), amount);
+ if (!flag1 && level.purpurConfig.endermanIgnoreProjectiles) return super.hurtServer(level, damageSource, amount); // Purpur - Config to disable Enderman teleport on projectile hit
if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent
for (int i = 0; i < 64; i++) {
if (this.teleport()) {
@@ -440,7 +_,7 @@
@Override