From 9555cac002972909f345f1bbb96f25607893436e Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Mon, 26 Dec 2022 17:24:55 -0800 Subject: [PATCH] Update #5 - Fixed edit book screen not showing text --- client_version | 2 +- .../client/gui/FontRenderer.edit.java | 24 ++++++++++++++++--- .../client/gui/GuiScreenBook.edit.java | 8 ++++--- .../eaglercraft/v1_8/EaglercraftVersion.java | 4 ++-- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/client_version b/client_version index aadad0e..f191f0e 100644 --- a/client_version +++ b/client_version @@ -1 +1 @@ -u4 \ No newline at end of file +u5 \ No newline at end of file diff --git a/patches/minecraft/net/minecraft/client/gui/FontRenderer.edit.java b/patches/minecraft/net/minecraft/client/gui/FontRenderer.edit.java index 6d4e0d2..7a27e65 100644 --- a/patches/minecraft/net/minecraft/client/gui/FontRenderer.edit.java +++ b/patches/minecraft/net/minecraft/client/gui/FontRenderer.edit.java @@ -130,6 +130,18 @@ ~ int i1 = "0123456789abcdefklmnor".indexOf(Character.toLowerCase(parString1.charAt(i + 1))); +> CHANGE 418 : 419 @ 404 : 405 + +~ private int renderStringAligned(String text, int x, int y, int wrapWidth, int color, boolean parFlag) { + +> CHANGE 421 : 422 @ 407 : 408 + +~ x = x + wrapWidth - i; + +> CHANGE 424 : 425 @ 410 : 411 + +~ return this.renderString(text, (float) x, (float) y, color, parFlag); + > CHANGE 429 : 431 @ 415 : 416 ~ this.posX = x; @@ -141,18 +153,24 @@ + return (int) this.posX; -> CHANGE 603 : 604 @ 588 : 589 +> INSERT 573 : 576 @ 558 + ++ if ((textColor & -67108864) == 0) { ++ textColor |= -16777216; ++ } + +> CHANGE 606 : 607 @ 588 : 589 ~ return Arrays.asList(this.wrapFormattedStringToWidth(str, wrapWidth, 0).split("\n")); -> CHANGE 606 : 610 @ 591 : 592 +> CHANGE 609 : 613 @ 591 : 592 ~ String wrapFormattedStringToWidth(String str, int wrapWidth, int depthCheck) { // TODO: fix recursive ~ if (depthCheck > 20) { ~ return str; ~ } -> CHANGE 618 : 619 @ 600 : 601 +> CHANGE 621 : 622 @ 600 : 601 ~ return s + "\n" + this.wrapFormattedStringToWidth(s1, wrapWidth, ++depthCheck); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.edit.java b/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.edit.java index 98735f5..d4e8314 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.edit.java +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.edit.java @@ -28,15 +28,17 @@ ~ protected void actionPerformed(GuiButton parGuiButton) { -> CHANGE 208 : 209 @ 209 : 210 +> CHANGE 208 : 209 @ 209 : 211 ~ protected void keyTyped(char parChar1, int parInt1) { -> CHANGE 346 : 347 @ 347 : 348 +> DELETE 215 @ 217 : 218 + +> CHANGE 344 : 345 @ 347 : 348 ~ } catch (JSONException var13) { -> CHANGE 381 : 382 @ 382 : 383 +> CHANGE 379 : 380 @ 382 : 383 ~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) { diff --git a/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java b/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java index 9f1e9a3..31411ba 100644 --- a/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java +++ b/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java @@ -8,7 +8,7 @@ public class EaglercraftVersion { /// Customize these to fit your fork: public static final String projectForkName = "EaglercraftX"; - public static final String projectForkVersion = "u4"; + public static final String projectForkVersion = "u5"; public static final String projectForkVendor = "lax1dude"; public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; @@ -23,7 +23,7 @@ public class EaglercraftVersion { public static final String projectOriginName = "EaglercraftX"; public static final String projectOriginAuthor = "lax1dude"; public static final String projectOriginRevision = "1.8"; - public static final String projectOriginVersion = "u4"; + public static final String projectOriginVersion = "u5"; public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";