package aeronicamc.mods.mxtune.jei;

import aeronicamc.mods.mxtune.Reference;
import aeronicamc.mods.mxtune.init.ModItems;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.JeiPlugin;
import mezz.jei.api.ingredients.subtypes.IIngredientSubtypeInterpreter;
import mezz.jei.api.ingredients.subtypes.UidContext;
import mezz.jei.api.registration.ISubtypeRegistration;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;

@JeiPlugin
public class MxtuneJEIPlugin implements IModPlugin
{
    /**
     * The unique ID for this mod plugin.
     * The namespace should be your mod's modId.
     */
    @Override
    public ResourceLocation getPluginUid()
    {
        return new ResourceLocation(Reference.MOD_ID);
    }

    /**
     * If your item has subtypes that depend on NBT or capabilities, use this to help JEI identify those subtypes correctly.
     *
     * @param registration
     */
    @Override
    public void registerItemSubtypes(ISubtypeRegistration registration)
    {
        registration.registerSubtypeInterpreter(ModItems.MULTI_INST.get().getItem(), new MultiInstSubTypeInterpreter());
    }

    public static class MultiInstSubTypeInterpreter implements IIngredientSubtypeInterpreter<ItemStack>
    {
        @Override
        public String apply(ItemStack ingredient, UidContext context)
        {
            return Integer.toString(ingredient.getDamageValue());
        }
    }
}

@@ -384,132 +384,569 @@
 aft.
-item.ItemStack;%0Aimport net.minecraft.util.ResourceLocation;%0A%0A@JeiPlugin%0Apublic class MxtuneJEIPlugin implements IModPlugin%0A%7B
+client.Minecraft;%0Aimport net.minecraft.client.renderer.ItemModelMesher;%0Aimport net.minecraft.client.renderer.model.IBakedModel;%0Aimport net.minecraft.client.renderer.model.ItemOverride;%0Aimport net.minecraft.client.renderer.model.ItemOverrideList;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.util.ResourceLocation;%0Aimport org.apache.logging.log4j.LogManager;%0Aimport org.apache.logging.log4j.Logger;%0A%0A@JeiPlugin%0Apublic class MxtuneJEIPlugin implements IModPlugin%0A%7B%0A    private static final Logger LOGGER = LogManager.getLogger(MxtuneJEIPlugin.class);
 %0A   
@@ -1433,32 +1433,436 @@
 stration)%0A    %7B%0A
+        ItemModelMesher itemModelMesher = Minecraft.getInstance().getItemRenderer().getItemModelShaper();%0A        IBakedModel bakedModel= itemModelMesher.getItemModel(ModItems.MULTI_INST.get());%0A        if (bakedModel != null)%0A        %7B%0A            ItemOverrideList list = bakedModel.getOverrides();%0A            list.getOverrides().forEach((ItemOverride o) -%3E LOGGER.info(%22%7B%7D%22, o.getModel()));%0A        %7D%0A
         registra

Test overrides... yes they are there. JEI's fast rendering does the right, efficient thing and renders a single model. I will review my options once again and see if I can do this a different way. Metadata is dead and I should know better than force this onto the vanilla rendering pipeline.