Expose LivingEntity hurt direction

This commit is contained in:
Mark Vainomaa 2020-12-13 05:32:12 +02:00
parent c120a1ea13
commit b71dfe682d
2 changed files with 28 additions and 0 deletions

View file

@ -356,6 +356,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/
public void setCooldown(@NotNull Material material, int ticks);
// Paper start
/**
* Sets player hurt direction
*
* @param hurtDirection hurt direction
*/
@Override
void setHurtDirection(float hurtDirection);
// Paper end
/**
* Check whether a cooldown is active on the specified item.
*

View file

@ -1211,4 +1211,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void playPickupItemAnimation(@NotNull Item item, int quantity);
// Paper end - pickup animation API
// Paper start - hurt direction API
/**
* Gets player hurt direction
*
* @return hurt direction
*/
float getHurtDirection();
/**
* Sets player hurt direction
*
* @param hurtDirection hurt direction
* @deprecated use {@link Player#setHurtDirection(float)}
*/
@Deprecated
void setHurtDirection(float hurtDirection);
// Paper end - hurt direction API
}