mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Expose LivingEntity hurt direction
This commit is contained in:
parent
c120a1ea13
commit
b71dfe682d
2 changed files with 28 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue