mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-03-25 05:00:55 +01:00
26 lines
646 B
Java
26 lines
646 B
Java
package com.minelittlepony.api.model;
|
|
|
|
public interface IPegasus extends IModel {
|
|
|
|
/**
|
|
* Returns true if the wings are spread.
|
|
*/
|
|
default boolean wingsAreOpen() {
|
|
return (getAttributes().isSwimming || isFlying() || getAttributes().isCrouching) && !getAttributes().isGliding;
|
|
}
|
|
|
|
/**
|
|
* Gets the wings of this pegasus/flying creature
|
|
*/
|
|
IPart getWings();
|
|
|
|
/**
|
|
* Determines angle used to animate wing flaps whilst flying/swimming.
|
|
*
|
|
* @param ticks Partial render ticks
|
|
*/
|
|
default float getWingRotationFactor(float ticks) {
|
|
return getAttributes().wingAngle;
|
|
}
|
|
|
|
}
|