mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-29 15:37:59 +01:00
Fill in various missing documentation
This commit is contained in:
parent
da5c985148
commit
34071a46c6
6 changed files with 42 additions and 2 deletions
|
@ -11,5 +11,8 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
public interface IArmorTextureResolver<T extends EntityLivingBase> {
|
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);
|
ResourceLocation getArmorTexture(T entity, ItemStack itemstack, EntityEquipmentSlot slot, ArmorLayer layer, @Nullable String type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,22 @@ import com.minelittlepony.model.capabilities.IModelArmor;
|
||||||
import com.minelittlepony.model.capabilities.IModelWrapper;
|
import com.minelittlepony.model.capabilities.IModelWrapper;
|
||||||
|
|
||||||
public interface IEquestrianArmor<V extends ModelBiped & IModelArmor> extends IModelWrapper {
|
public interface IEquestrianArmor<V extends ModelBiped & IModelArmor> extends IModelWrapper {
|
||||||
|
/**
|
||||||
|
* Gets the armour model to render for the given layer.
|
||||||
|
*/
|
||||||
V getArmorForLayer(ArmorLayer layer);
|
V getArmorForLayer(ArmorLayer layer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The layer used to render a given armour piece.
|
||||||
|
*/
|
||||||
enum ArmorLayer {
|
enum ArmorLayer {
|
||||||
|
/**
|
||||||
|
* Fits snugly to the player's model.
|
||||||
|
*/
|
||||||
INNER,
|
INNER,
|
||||||
|
/**
|
||||||
|
* Hanging loose and sagging free
|
||||||
|
*/
|
||||||
OUTER
|
OUTER
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,9 @@ public interface IModel extends ICapitated {
|
||||||
*/
|
*/
|
||||||
void transform(BodyPart part);
|
void transform(BodyPart part);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the active scaling profile used to lay out this model's parts.
|
||||||
|
*/
|
||||||
PonySize getSize();
|
PonySize getSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,6 +30,9 @@ public interface IModel extends ICapitated {
|
||||||
*/
|
*/
|
||||||
IEquestrianArmor<?> createArmour();
|
IEquestrianArmor<?> createArmour();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the skin metadata associated with this model.
|
||||||
|
*/
|
||||||
IPonyData getMetadata();
|
IPonyData getMetadata();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,12 +83,24 @@ public interface IModel extends ICapitated {
|
||||||
*/
|
*/
|
||||||
boolean isChild();
|
boolean isChild();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the current leg swing amount.
|
||||||
|
*/
|
||||||
float getSwingAmount();
|
float getSwingAmount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the y-offset applied to entities riding this one.
|
||||||
|
*/
|
||||||
float getRiderYOffset();
|
float getRiderYOffset();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the actual, visible height of this model when rendered.
|
||||||
|
*/
|
||||||
float getModelHeight();
|
float getModelHeight();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this model is wearing the given piece of gear.
|
||||||
|
*/
|
||||||
default boolean isWearing(PonyWearable wearable) {
|
default boolean isWearing(PonyWearable wearable) {
|
||||||
return getMetadata().isWearing(wearable);
|
return getMetadata().isWearing(wearable);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ public interface IModelPart {
|
||||||
*/
|
*/
|
||||||
default void setRotationAndAngles(boolean rainboom, float move, float swing, float bodySwing, float ticks) {
|
default void setRotationAndAngles(boolean rainboom, float move, float swing, float bodySwing, float ticks) {
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders this model component.
|
* Renders this model component.
|
||||||
|
|
|
@ -14,7 +14,11 @@ public interface IModelPegasus extends IModel {
|
||||||
return (isSwimming() || isFlying() || isCrouching()) && !isElytraFlying();
|
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) {
|
default float getWingRotationFactor(float ticks) {
|
||||||
if (isSwimming()) {
|
if (isSwimming()) {
|
||||||
return (MathHelper.sin(ticks * 0.136f) / 2) + ROTATE_270;
|
return (MathHelper.sin(ticks * 0.136f) / 2) + ROTATE_270;
|
||||||
|
|
|
@ -5,6 +5,9 @@ import net.minecraft.util.EnumHandSide;
|
||||||
import com.minelittlepony.render.model.PonyRenderer;
|
import com.minelittlepony.render.model.PonyRenderer;
|
||||||
|
|
||||||
public interface IModelUnicorn extends IModel {
|
public interface IModelUnicorn extends IModel {
|
||||||
|
/**
|
||||||
|
* Gets the arm used for holding items in their magic.
|
||||||
|
*/
|
||||||
PonyRenderer getUnicornArmForSide(EnumHandSide side);
|
PonyRenderer getUnicornArmForSide(EnumHandSide side);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue