mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
Fixy
This commit is contained in:
parent
ea5c599077
commit
c31ab10475
1 changed files with 7 additions and 12 deletions
|
@ -1,14 +1,12 @@
|
||||||
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
@@ -116,10 +_,26 @@
|
@@ -117,7 +_,23 @@
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
- public void setTarget(@Nullable LivingEntity livingEntity) {
|
public void setTarget(@Nullable LivingEntity livingEntity) {
|
||||||
- super.setTarget(livingEntity);
|
- super.setTarget(livingEntity);
|
||||||
+ public void setTarget(@Nullable LivingEntity target) {
|
|
||||||
+ // CraftBukkit start - fire event
|
+ // CraftBukkit start - fire event
|
||||||
+ this.setTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true);
|
+ this.setTarget(livingEntity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // Paper start - EndermanEscapeEvent
|
+ // Paper start - EndermanEscapeEvent
|
||||||
|
@ -18,18 +16,15 @@
|
||||||
+ // Paper end - EndermanEscapeEvent
|
+ // Paper end - EndermanEscapeEvent
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean setTarget(LivingEntity target, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
+ public boolean setTarget(LivingEntity livingEntity, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
||||||
+ if (!super.setTarget(target, reason, fireEvent)) {
|
+ if (!super.setTarget(livingEntity, reason, fireEvent)) {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ target = this.getTarget();
|
+ livingEntity = this.getTarget();
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||||
- if (livingEntity == null) {
|
if (livingEntity == null) {
|
||||||
+ if (target == null) {
|
|
||||||
this.targetChangeTime = 0;
|
this.targetChangeTime = 0;
|
||||||
this.entityData.set(DATA_CREEPY, false);
|
|
||||||
this.entityData.set(DATA_STARED_AT, false);
|
|
||||||
@@ -131,6 +_,7 @@
|
@@ -131,6 +_,7 @@
|
||||||
attribute.addTransientModifier(SPEED_MODIFIER_ATTACKING);
|
attribute.addTransientModifier(SPEED_MODIFIER_ATTACKING);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue