Add Entity Body Yaw API

This commit is contained in:
TheTuso 2023-02-02 16:40:11 +01:00
parent 7e5c1f612a
commit 1a9500ec94
2 changed files with 55 additions and 0 deletions

View file

@ -1041,6 +1041,43 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* @return true if in powdered snow.
*/
boolean isInPowderedSnow();
/**
* Gets the x-coordinate of this entity
*
* @return x-coordinate
*/
double getX();
/**
* Gets the y-coordinate of this entity
*
* @return y-coordinate
*/
double getY();
/**
* Gets the z-coordinate of this entity
*
* @return z-coordinate
*/
double getZ();
/**
* Gets this entity's pitch
*
* @see Location#getPitch()
* @return the entity's pitch
*/
float getPitch();
/**
* Gets this entity's yaw
*
* @see Location#getYaw()
* @return the entity's yaw
*/
float getYaw();
// Paper end
// Paper start - Collision API

View file

@ -1424,4 +1424,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
// Paper end - ItemStack damage API
// Paper start - body yaw API
/**
* Gets entity body yaw
*
* @return entity body yaw
* @see Location#getYaw()
*/
float getBodyYaw();
/**
* Sets entity body yaw
*
* @param bodyYaw new entity body yaw
* @see Location#setYaw(float)
*/
void setBodyYaw(float bodyYaw);
// Paper end - body yaw API
}