Search in sources :

Example 1 with BakedModelManager

use of net.minecraft.client.render.model.BakedModelManager in project fabric by Legacy-Fabric.

the class ClientResourceReloadListenerMixins method getFabricId.

@SuppressWarnings("ConstantConditions")
@Override
public Identifier getFabricId() {
    if (this.fabric_id == null) {
        Object self = this;
        if (self instanceof SoundManager) {
            this.fabric_id = ResourceReloadListenerKeys.SOUNDS;
        } else if (self instanceof TextRenderer) {
            this.fabric_id = ResourceReloadListenerKeys.FONTS;
        } else if (self instanceof BakedModelManager) {
            this.fabric_id = ResourceReloadListenerKeys.MODELS;
        } else if (self instanceof LanguageManager) {
            this.fabric_id = ResourceReloadListenerKeys.LANGUAGES;
        } else if (self instanceof TextureManager) {
            this.fabric_id = ResourceReloadListenerKeys.TEXTURES;
        } else {
            MappingResolver resolver = FabricLoader.getInstance().getMappingResolver();
            this.fabric_id = new Identifier("minecraft", "private/" + resolver.mapClassName("intermediary", self.getClass().getName()).toLowerCase(Locale.ROOT));
        }
    }
    return this.fabric_id;
}
Also used : BakedModelManager(net.minecraft.client.render.model.BakedModelManager) TextureManager(net.minecraft.client.texture.TextureManager) Identifier(net.minecraft.util.Identifier) LanguageManager(net.minecraft.client.resource.language.LanguageManager) MappingResolver(net.fabricmc.loader.api.MappingResolver) SoundManager(net.minecraft.client.sound.SoundManager) TextRenderer(net.minecraft.client.font.TextRenderer)

Aggregations

MappingResolver (net.fabricmc.loader.api.MappingResolver)1 TextRenderer (net.minecraft.client.font.TextRenderer)1 BakedModelManager (net.minecraft.client.render.model.BakedModelManager)1 LanguageManager (net.minecraft.client.resource.language.LanguageManager)1 SoundManager (net.minecraft.client.sound.SoundManager)1 TextureManager (net.minecraft.client.texture.TextureManager)1 Identifier (net.minecraft.util.Identifier)1