use of net.sistr.littlemaidmodelloader.maidmodel.IModelCaps in project LittleMaidModelLoader-Fabric by SistrScarlet.
the class MultiModelArmorLayer method renderArmorPart.
private void renderArmorPart(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, T entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch, IHasMultiModel.Part part) {
if (!entity.isArmorVisible(part)) {
return;
}
boolean glint = entity.isArmorGlint(part);
IModelCaps caps = entity.getCaps();
renderArmorLayer(matrices, vertexConsumers, light, entity, limbAngle, limbDistance, tickDelta, animationProgress, headYaw, headPitch, part, IHasMultiModel.Layer.INNER, false, caps, glint);
renderArmorLayer(matrices, vertexConsumers, light, entity, limbAngle, limbDistance, tickDelta, animationProgress, headYaw, headPitch, part, IHasMultiModel.Layer.INNER, true, caps, glint);
renderArmorLayer(matrices, vertexConsumers, light, entity, limbAngle, limbDistance, tickDelta, animationProgress, headYaw, headPitch, part, IHasMultiModel.Layer.OUTER, false, caps, glint);
renderArmorLayer(matrices, vertexConsumers, light, entity, limbAngle, limbDistance, tickDelta, animationProgress, headYaw, headPitch, part, IHasMultiModel.Layer.OUTER, true, caps, glint);
}
use of net.sistr.littlemaidmodelloader.maidmodel.IModelCaps in project LittleMaidModelLoader-Fabric by SistrScarlet.
the class MultiModelEntity method getDimensions.
// このままだとEntityDimensionsが作っては捨てられてを繰り返すのでパフォーマンスはよろしくない
@Override
public EntityDimensions getDimensions(EntityPose pose) {
EntityDimensions dimensions;
IMultiModel model = getModel(Layer.SKIN, Part.HEAD).orElse(LMModelManager.INSTANCE.getDefaultModel());
IModelCaps caps = getCaps();
MMPose mmPose = MMPose.convertPose(pose);
float height = model.getHeight(caps, mmPose);
float width = model.getWidth(caps, mmPose);
dimensions = EntityDimensions.changing(width, height);
return dimensions.scaled(getScaleFactor());
}
Aggregations