mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 20:07:41 +01:00
Add Entity Body Yaw API
This commit is contained in:
parent
db1df52d4c
commit
d1abd737aa
@ -1179,6 +1179,33 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
}
|
||||
// Paper end - entity powdered snow API
|
||||
|
||||
// Paper start - entity body yaw API
|
||||
@Override
|
||||
public double getX() {
|
||||
return this.entity.getX();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getY() {
|
||||
return this.entity.getY();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getZ() {
|
||||
return this.entity.getZ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getPitch() {
|
||||
return this.entity.getXRot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getYaw() {
|
||||
return this.entity.getBukkitYaw();
|
||||
}
|
||||
// Paper end - entity body yaw API
|
||||
|
||||
// Paper start - missing entity api
|
||||
@Override
|
||||
public boolean isInvisible() { // Paper - moved up from LivingEntity
|
||||
|
@ -1211,4 +1211,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
this.getHandle().frictionState = state;
|
||||
}
|
||||
// Paper end - friction API
|
||||
|
||||
// Paper start - body yaw API
|
||||
@Override
|
||||
public float getBodyYaw() {
|
||||
return this.getHandle().getVisualRotationYInDegrees();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBodyYaw(final float bodyYaw) {
|
||||
this.getHandle().setYBodyRot(bodyYaw);
|
||||
}
|
||||
// Paper end - body yaw API
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user