mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-10-01 00:27:45 +02:00
Trial change to knockback in 1.8.8
This commit is contained in:
parent
d00678b208
commit
96a5889111
@ -118,18 +118,13 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||||
|
boolean damaged = super.damageEntity(damagesource, f);
|
||||||
|
|
||||||
// knock back velocity is cancelled and sent to client for handling when
|
// knock back velocity is cancelled and sent to client for handling when
|
||||||
// the entity is a player. there is no client so make this happen
|
// the entity is a player. there is no client so make this happen
|
||||||
// manually.
|
// manually.
|
||||||
boolean damaged = super.damageEntity(damagesource, f);
|
|
||||||
if (damaged && velocityChanged) {
|
if (damaged && velocityChanged) {
|
||||||
velocityChanged = false;
|
velocityChanged = false;
|
||||||
Bukkit.getScheduler().runTask(CitizensAPI.getPlugin(), new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
EntityHumanNPC.this.velocityChanged = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return damaged;
|
return damaged;
|
||||||
}
|
}
|
||||||
@ -287,6 +282,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
super.l();
|
super.l();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.K();
|
super.K();
|
||||||
boolean navigating = npc.getNavigator().isNavigating();
|
boolean navigating = npc.getNavigator().isNavigating();
|
||||||
if (!navigating && getBukkitEntity() != null
|
if (!navigating && getBukkitEntity() != null
|
||||||
|
Loading…
Reference in New Issue
Block a user