I recently followed the kaupenjoe mantis entity tutorial but I did so on 1.21.4. I got everything working but my method for rendering baby mantis was just by downscaling the parent model by Overriding the Render function in MantisRenderer. This felt a bit odd since there is a distinct spot to put a baby model in the MantsisRenderer function. I went looking at how minecraft handles baby entities and found that most animals with baby variants have a ModelTransformer variable called BABY_TRANSFORMER. (Code examples are from CamelEntityModel.class)
public class CamelEntityModel extends EntityModel<CamelEntityRenderState> {
private static final float LIMB_ANGLE_SCALE = 2.0F;
private static final float LIMB_DISTANCE_SCALE = 2.5F;
public static final ModelTransformer BABY_TRANSFORMER = ModelTransformer.scaling(0.45F); // <--
private static final String SADDLE = "saddle";
private static final String BRIDLE = "bridle";
private static final String REINS = "reins";
private final ModelPart head;
private final ModelPart[] saddleAndBridle;
private final ModelPart[] reins;```
All references to this variable were obfuscated in the MC code, and while my current code works, I would like to know if anyone has gotten the BABY_TRANSFORMER way to work.