mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Config to disable Enderman teleport on projectile hit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user