mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 03:25:18 +00:00
Fix Forge error screen not rendering text correctly. Closes #10569
This commit is contained in:
10 files changed
+8
-15
No files matched your search
@@ -96,14 +96,14 @@ public final class ForgeDevLocator extends AbstractModProvider implements IModLo
|
||||
|
||||
// Find resource directories for every mod in this group
|
||||
var paths = new LinkedHashSet<Path>();
|
||||
for (var modid : modids) {
|
||||
for (var modid : modids.stream().sorted().toList()) {
|
||||
var rsc = path.resolve(modid);
|
||||
if (Files.exists(rsc))
|
||||
paths.add(rsc);
|
||||
}
|
||||
|
||||
var root = memory.getPath(modids.iterator().next()); // use the first modid as our root
|
||||
buildModsToml(paths, modids, root);
|
||||
buildModsToml(paths, modids, root, pkg.startsWith("net/minecraftforge/debug/client/"));
|
||||
buildPackMeta(paths, root);
|
||||
moveModuleInfo(paths, root);
|
||||
|
||||
@@ -187,7 +187,7 @@ public final class ForgeDevLocator extends AbstractModProvider implements IModLo
|
||||
}
|
||||
|
||||
// Builds or update the mods.toml file for all @Mods in this package
|
||||
private static void buildModsToml(Set<Path> resources, Set<String> modids, Path root) {
|
||||
private static void buildModsToml(Set<Path> resources, Set<String> modids, Path root, boolean clientOnly) {
|
||||
var toml = resources.stream()
|
||||
.map(p -> p.resolve(MODS_TOML))
|
||||
.filter(Files::exists)
|
||||
@@ -205,7 +205,8 @@ public final class ForgeDevLocator extends AbstractModProvider implements IModLo
|
||||
var defaults = Map.of(
|
||||
"modLoader", "javafml",
|
||||
"loaderVersion", "[0,)",
|
||||
"license", "Doesnt fucking matter"
|
||||
"license", "Doesnt fucking matter",
|
||||
"clientSideOnly", clientOnly
|
||||
);
|
||||
|
||||
for (var key : defaults.keySet()) {
|
||||
|
||||
@@ -78,7 +78,7 @@ public class LoadingErrorScreen extends ErrorScreen {
|
||||
|
||||
private void drawMultiLineCenteredString(GuiGraphics guiGraphics, Font fr, Component str, int x, int y) {
|
||||
for (FormattedCharSequence s : fr.split(str, this.width)) {
|
||||
guiGraphics.drawString(fr, s, x - fr.width(s) / 2, y, 0xFFFFFF);
|
||||
guiGraphics.drawString(fr, s, x - fr.width(s) / 2, y, 0xFFFFFFFF);
|
||||
y += fr.lineHeight;
|
||||
}
|
||||
}
|
||||
@@ -134,9 +134,9 @@ public class LoadingErrorScreen extends ErrorScreen {
|
||||
int y = top + 2;
|
||||
for (var string : strings) {
|
||||
if (center)
|
||||
guiGraphics.drawString(font, string, left + (width / 2) - (font.width(string) / 2), y, 0xFFFFFF, false);
|
||||
guiGraphics.drawString(font, string, left + (width / 2) - (font.width(string) / 2), y, 0xFFFFFFFF, false);
|
||||
else
|
||||
guiGraphics.drawString(font, string, left + 5, y, 0xFFFFFF, false);
|
||||
guiGraphics.drawString(font, string, left + 5, y, 0xFFFFFFFF, false);
|
||||
y += font.lineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
@@ -1 +0,0 @@
|
||||
clientSideOnly=true
|
||||
Reference in new issue
Block a user