package com.minelittlepony.client.model;

import net.minecraft.entity.LivingEntity;

import com.minelittlepony.api.model.IModel;
import com.minelittlepony.api.model.IModelWrapper;
import com.minelittlepony.api.model.armour.IArmour;
import com.minelittlepony.api.pony.IPonyData;
import com.minelittlepony.mson.api.ModelKey;

/**
 * Container class for the various models and their associated piece of armour.
 */
public record ModelWrapper<T extends LivingEntity, M extends IModel> (
        M body,
        IArmour<?> armor
) implements IModelWrapper {
    /**
     * Creates a new model wrapper to contain the given pony.
     */
    public static <T extends LivingEntity, M extends IModel> ModelWrapper<T, M> of(ModelKey<?> key) {
        M body = key.createModel();
        IArmour<?> armor = body.createArmour();
        armor.applyMetadata(body.getMetadata());
        return new ModelWrapper<>(body, armor);
    }

    @Override
    public ModelWrapper<T, M> applyMetadata(IPonyData meta) {
        body.setMetadata(meta);
        armor.applyMetadata(meta);
        return this;
    }
}

@@ -722,24 +722,63 @@
 y%3C?%3E key) %7B%0A
+        @SuppressWarnings(%22unchecked%22)%0A
         M bo
@@ -782,16 +782,19 @@
  body = 
+(M)
 key.crea

Fix build