package net.minecraft.client.gui.font.glyphs;

import net.minecraft.Util;
import com.mojang.blaze3d.platform.NativeImage;
import com.mojang.blaze3d.font.RawGlyph;

public enum MissingGlyph implements RawGlyph {
    INSTANCE;
    
    private static final NativeImage IMAGE_DATA;
    
    @Override
    public int getPixelWidth() {
        return 5;
    }
    
    @Override
    public int getPixelHeight() {
        return 8;
    }
    
    @Override
    public float getAdvance() {
        return 6.0f;
    }
    
    @Override
    public float getOversample() {
        return 1.0f;
    }
    
    @Override
    public void upload(final int integer1, final int integer2) {
        MissingGlyph.IMAGE_DATA.upload(0, integer1, integer2, false);
    }
    
    @Override
    public boolean isColored() {
        return true;
    }
    
    static {
        int integer2;
        int integer3;
        boolean boolean4;
        IMAGE_DATA = Util.<NativeImage>make(new NativeImage(NativeImage.Format.RGBA, 5, 8, false), dgs -> {
            for (integer2 = 0; integer2 < 8; ++integer2) {
                for (integer3 = 0; integer3 < 5; ++integer3) {
                    boolean4 = (integer3 == 0 || integer3 + 1 == 5 || integer2 == 0 || integer2 + 1 == 8);
                    dgs.setPixelRGBA(integer3, integer2, boolean4 ? -1 : 0);
                }
            }
            dgs.untrack();
        });
    }
}
