diff --git a/src/main/java/net/minecraftforge/fml/ModLoader.java b/src/main/java/net/minecraftforge/fml/ModLoader.java index c56073d58b..b773d5b81c 100644 --- a/src/main/java/net/minecraftforge/fml/ModLoader.java +++ b/src/main/java/net/minecraftforge/fml/ModLoader.java @@ -143,6 +143,8 @@ public class ModLoader statusConsumer.ifPresent(c->c.accept("Loading mods")); final ModList modList = ModList.of(loadingModList.getModFiles().stream().map(ModFileInfo::getFile).collect(Collectors.toList()), loadingModList.getMods()); if (!this.loadingExceptions.isEmpty()) { + LOGGER.fatal(CORE, "Error during pre-loading phase", loadingExceptions.get(0)); + modList.setLoadedMods(Collections.emptyList()); throw new LoadingFailedException(loadingExceptions); } statusConsumer.ifPresent(c->c.accept("Building Mod List")); @@ -152,7 +154,8 @@ public class ModLoader flatMap(Collection::stream). collect(Collectors.toList()); if (!loadingExceptions.isEmpty()) { - LOGGER.fatal(CORE, "Failed to initialize mod containers"); + LOGGER.fatal(CORE, "Failed to initialize mod containers", loadingExceptions.get(0)); + modList.setLoadedMods(Collections.emptyList()); throw new LoadingFailedException(loadingExceptions); } modList.setLoadedMods(modContainers); diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java b/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java index 1dd7ce9045..78c443a637 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiUtils.java @@ -466,6 +466,6 @@ public class GuiUtils if (centerX) x += (w - boundsWidth) / 2; } - AbstractGui.blit(x, y, 0, 0, rectWidth, rectHeight, boundsWidth, boundsHeight, rectWidth, rectHeight); + AbstractGui.blit(x, y, boundsWidth, boundsHeight, 0.0f,0.0f, rectWidth, rectHeight, rectWidth, rectHeight); } } diff --git a/src/main/java/net/minecraftforge/fml/client/gui/GuiModList.java b/src/main/java/net/minecraftforge/fml/client/gui/GuiModList.java index ad7bfcf173..e67c77dd93 100644 --- a/src/main/java/net/minecraftforge/fml/client/gui/GuiModList.java +++ b/src/main/java/net/minecraftforge/fml/client/gui/GuiModList.java @@ -267,7 +267,7 @@ public class GuiModList extends Screen listWidth = Math.max(listWidth,getFontRenderer().getStringWidth(mod.getDisplayName()) + 10); listWidth = Math.max(listWidth,getFontRenderer().getStringWidth(MavenVersionStringHelper.artifactVersionToString(mod.getVersion())) + 5); } - listWidth = Math.min(listWidth, 150); + listWidth = Math.max(listWidth, 100); listWidth += listWidth % numButtons != 0 ? (numButtons - listWidth % numButtons) : 0; this.modList = new GuiSlotModList(this, listWidth); this.modList.setLeftPos(6); @@ -363,7 +363,7 @@ public class GuiModList extends Screen int left = ((this.width - this.listWidth - 38) / 2) + this.listWidth + 30; String text = I18n.format("fml.menu.mods.search"); - int x = ((10 + modList.getRight()) / 2) - (getFontRenderer().getStringWidth(text) / 2); + int x = ((modList.getLeft()) / 2) - (getFontRenderer().getStringWidth(text) / 2); getFontRenderer().drawString(text, x, modList.getBottom() + 5, 0xFFFFFF); this.search.render(mouseX, mouseY, partialTicks); super.render(mouseX, mouseY, partialTicks); @@ -411,6 +411,7 @@ public class GuiModList extends Screen logo = NativeImage.read(logoResource); if (logo != null) { + return Pair.of(tm.getDynamicTextureLocation("modlogo", new DynamicTexture(logo)), new Size2i(logo.getWidth(), logo.getHeight())); } }