Search in sources :

Example 1 with DefaultArtifactVersion

use of net.minecraftforge.fml.common.versioning.DefaultArtifactVersion in project MinecraftForge by MinecraftForge.

the class GuiModsMissing method drawScreen.

@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
    this.drawDefaultBackground();
    int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
    String modMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies", TextFormatting.BOLD + modsMissing.getModName() + TextFormatting.RESET);
    this.drawCenteredString(this.fontRendererObj, modMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
    offset += 10;
    String fixMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies.fix", modsMissing.getModName());
    this.drawCenteredString(this.fontRendererObj, fixMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
    offset += 5;
    for (ArtifactVersion v : modsMissing.missingMods) {
        offset += 10;
        if (v instanceof DefaultArtifactVersion) {
            DefaultArtifactVersion dav = (DefaultArtifactVersion) v;
            if (dav.getRange() != null) {
                String message = String.format(TextFormatting.BOLD + "%s " + TextFormatting.RESET + "%s", v.getLabel(), dav.getRange().toStringFriendly());
                this.drawCenteredString(this.fontRendererObj, message, this.width / 2, offset, 0xEEEEEE);
                continue;
            }
        }
        this.drawCenteredString(this.fontRendererObj, String.format(TextFormatting.BOLD + "%s" + TextFormatting.RESET + " : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
    }
    offset += 20;
    String seeLogText = I18n.format("fml.messages.mod.missing.dependencies.see.log", GuiErrorBase.clientLog.getName());
    this.drawCenteredString(this.fontRendererObj, seeLogText, this.width / 2, offset, 0xFFFFFF);
    super.drawScreen(mouseX, mouseY, partialTicks);
}
Also used : DefaultArtifactVersion(net.minecraftforge.fml.common.versioning.DefaultArtifactVersion) ArtifactVersion(net.minecraftforge.fml.common.versioning.ArtifactVersion) DefaultArtifactVersion(net.minecraftforge.fml.common.versioning.DefaultArtifactVersion)

Aggregations

ArtifactVersion (net.minecraftforge.fml.common.versioning.ArtifactVersion)1 DefaultArtifactVersion (net.minecraftforge.fml.common.versioning.DefaultArtifactVersion)1