(function LoadMicModel() {
    ModAPI.meta.title("GET A MIC");
    ModAPI.meta.credits("By ZXMushroom63 & TheIdiotPlays");
    ModAPI.meta.description("'radman screw you' - TheIdiotPlays, 2024")
    const ResourceLocationClass = ModAPI.reflect.getClassByName("ResourceLocation").class;
    const ResourceLocationRaw = ModAPI.reflect.getClassByName("ResourceLocation").constructors.find(x=>x.length===1);
    const ResourceLocation = (x)=>ResourceLocationRaw(ModAPI.util.str(x));
    const Mic$HighPolySkin = ModAPI.reflect.getClassByName("HighPolySkin").constructors[0](
        ModAPI.util.str("MIC"),
        5,
        ResourceLocation("eagler:mesh/Mic.png"),
        ResourceLocation("eagler:mesh/Mic.mdl"),
        null,
        null,
        ModAPI.array.object(ResourceLocationClass, 0),
        ModAPI.array.float(0),
        0.0,
        ResourceLocation("eagler:skins/01.default_steve.png")
    )

    const SkinModelRefClass = ModAPI.reflect.getClassByName("SkinModel");
    const Mic$SkinModel = SkinModelRefClass.constructors.find(x=>x.length===4)(ModAPI.util.str("MIC"), 8, 8, Mic$HighPolySkin);
    SkinModelRefClass.staticVariables.skinModels.data.push(Mic$SkinModel);
    SkinModelRefClass.staticVariables.skinModelsByName.$put(ModAPI.util.str("MIC"), Mic$HighPolySkin);

    const DefaultSkinsRefClass = ModAPI.reflect.getClassByName("DefaultSkins");
    const Mic$DefaultSkin = DefaultSkinsRefClass.constructors[0](ModAPI.util.str("MIC"), 29, 29, ModAPI.util.str("MIC"), ResourceLocation("eagler:skins/01.default_steve.png"), Mic$SkinModel); //name, id, id, name, location, model
    DefaultSkinsRefClass.staticVariables.defaultSkinsMap.data.push(Mic$DefaultSkin);

    ModAPI.addEventListener("lib:asyncsink", async () => {
        // MODEL DATA HERE
        AsyncSink.setFile("resourcepacks/AsyncSinkLib/assets/eagler/mesh/Mic.mdl", await (await fetch(`data:image/octet-stream;base64,[encoded data, 149492 characters]`)).arrayBuffer());
        // TEXTURE DATA HERE
        AsyncSink.setFile("resourcepacks/AsyncSinkLib/assets/eagler/mesh/Mic.png", await (await fetch(`data:image/png;base64,[encoded data, 74476 characters]`)).arrayBuffer());
    });
})();