Patches 100-260 (#2729)
This commit is contained in:
@@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player
|
||||
You may cancel this, enabling ranged attacks to damage the enderman for example.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
index 99391c0562..de320f8885 100644
|
||||
index 4519be39a..60ff02770 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
@@ -33,28 +33,28 @@ index 99391c0562..de320f8885 100644
|
||||
public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
||||
if (!super.setGoalTarget(entityliving, reason, fireEvent)) {
|
||||
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
|
||||
if (this.world.J() && this.ticksLived >= this.bC + 600) {
|
||||
float f = this.aF();
|
||||
if (this.world.J() && this.ticksLived >= this.bA + 600) {
|
||||
float f = this.aI();
|
||||
|
||||
- if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
|
||||
+ if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper
|
||||
this.setGoalTarget((EntityLiving) null);
|
||||
this.dV();
|
||||
this.eq();
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
|
||||
} else if (!(damagesource instanceof EntityDamageSourceIndirect) && damagesource != DamageSource.FIREWORKS) {
|
||||
boolean flag = super.damageEntity(damagesource, f);
|
||||
|
||||
- if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0) {
|
||||
+ if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && this.tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper
|
||||
this.dV();
|
||||
- if (!this.world.p_() && damagesource.ignoresArmor() && this.random.nextInt(10) != 0) {
|
||||
+ if (!this.world.p_() && damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && this.tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper
|
||||
this.eq();
|
||||
}
|
||||
|
||||
return flag;
|
||||
} else {
|
||||
+ if (this.tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start
|
||||
for (int i = 0; i < 64; ++i) {
|
||||
if (this.dV()) {
|
||||
if (this.eq()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ index 99391c0562..de320f8885 100644
|
||||
if (this.i.f((EntityHuman) this.c)) {
|
||||
- if (this.c.h((Entity) this.i) < 16.0D) {
|
||||
+ if (this.c.h((Entity) this.i) < 16.0D && this.getEnderman().tryEscape(EndermanEscapeEvent.Reason.STARE)) {
|
||||
this.i.dV();
|
||||
this.i.eq();
|
||||
}
|
||||
|
||||
--
|
||||
Reference in New Issue
Block a user