mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 22:40:21 +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
|
||||
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -116,10 +_,26 @@
|
||||
}
|
||||
@@ -117,7 +_,23 @@
|
||||
|
||||
@Override
|
||||
- public void setTarget(@Nullable LivingEntity livingEntity) {
|
||||
public void setTarget(@Nullable LivingEntity livingEntity) {
|
||||
- super.setTarget(livingEntity);
|
||||
+ public void setTarget(@Nullable LivingEntity target) {
|
||||
+ // 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
|
||||
|
@ -18,18 +16,15 @@
|
|||
+ // Paper end - EndermanEscapeEvent
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean setTarget(LivingEntity target, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
||||
+ if (!super.setTarget(target, reason, fireEvent)) {
|
||||
+ public boolean setTarget(LivingEntity livingEntity, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
||||
+ if (!super.setTarget(livingEntity, reason, fireEvent)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ target = this.getTarget();
|
||||
+ livingEntity = this.getTarget();
|
||||
+ // CraftBukkit end
|
||||
AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||
- if (livingEntity == null) {
|
||||
+ if (target == null) {
|
||||
if (livingEntity == null) {
|
||||
this.targetChangeTime = 0;
|
||||
this.entityData.set(DATA_CREEPY, false);
|
||||
this.entityData.set(DATA_STARED_AT, false);
|
||||
@@ -131,6 +_,7 @@
|
||||
attribute.addTransientModifier(SPEED_MODIFIER_ATTACKING);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue