Fill in various missing documentation

This commit is contained in:
Sollace 2018-10-12 18:09:40 +02:00
parent da5c985148
commit 34071a46c6
6 changed files with 42 additions and 2 deletions

View file

@ -11,5 +11,8 @@ import javax.annotation.Nullable;
public interface IArmorTextureResolver<T extends EntityLivingBase> {
/**
* Gets the armour texture to be used for the given entity, armour piece, slot, and render layer.
*/
ResourceLocation getArmorTexture(T entity, ItemStack itemstack, EntityEquipmentSlot slot, ArmorLayer layer, @Nullable String type);
}

View file

@ -6,10 +6,22 @@ import com.minelittlepony.model.capabilities.IModelArmor;
import com.minelittlepony.model.capabilities.IModelWrapper;
public interface IEquestrianArmor<V extends ModelBiped & IModelArmor> extends IModelWrapper {
/**
* Gets the armour model to render for the given layer.
*/
V getArmorForLayer(ArmorLayer layer);
/**
* The layer used to render a given armour piece.
*/
enum ArmorLayer {
/**
* Fits snugly to the player's model.
*/
INNER,
/**
* Hanging loose and sagging free
*/
OUTER
}
}

View file

@ -20,6 +20,9 @@ public interface IModel extends ICapitated {
*/
void transform(BodyPart part);
/**
* Gets the active scaling profile used to lay out this model's parts.
*/
PonySize getSize();
/**
@ -27,6 +30,9 @@ public interface IModel extends ICapitated {
*/
IEquestrianArmor<?> createArmour();
/**
* Gets the skin metadata associated with this model.
*/
IPonyData getMetadata();
/**
@ -77,12 +83,24 @@ public interface IModel extends ICapitated {
*/
boolean isChild();
/**
* Gets the current leg swing amount.
*/
float getSwingAmount();
/**
* Gets the y-offset applied to entities riding this one.
*/
float getRiderYOffset();
/**
* Gets the actual, visible height of this model when rendered.
*/
float getModelHeight();
/**
* Tests if this model is wearing the given piece of gear.
*/
default boolean isWearing(PonyWearable wearable) {
return getMetadata().isWearing(wearable);
}

View file

@ -17,7 +17,7 @@ public interface IModelPart {
*/
default void setRotationAndAngles(boolean rainboom, float move, float swing, float bodySwing, float ticks) {
};
}
/**
* Renders this model component.

View file

@ -14,7 +14,11 @@ public interface IModelPegasus extends IModel {
return (isSwimming() || isFlying() || isCrouching()) && !isElytraFlying();
}
/**
* Determines angle used to animate wing flaps whilst flying/swimming.
*
* @param ticks Partial render ticks
*/
default float getWingRotationFactor(float ticks) {
if (isSwimming()) {
return (MathHelper.sin(ticks * 0.136f) / 2) + ROTATE_270;

View file

@ -5,6 +5,9 @@ import net.minecraft.util.EnumHandSide;
import com.minelittlepony.render.model.PonyRenderer;
public interface IModelUnicorn extends IModel {
/**
* Gets the arm used for holding items in their magic.
*/
PonyRenderer getUnicornArmForSide(EnumHandSide side);
/**