Skip to content

Commit

Permalink
Btaified
Browse files Browse the repository at this point in the history
  • Loading branch information
UselessBullets committed Dec 3, 2023
1 parent fb4bb88 commit 9fdf0f9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.daemon=false

mod_version=2.0.2-7.1
mod_version=2.0.3-7.1
mod_group=io.github.turniplabs
mod_name=modmenu-bta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ public void render(int index, int y, int x, int rowWidth, int rowHeight, int mou
GL11.glColor4f(1f, 1f, 1f, 1f);
this.bindIconTexture();
internalRender(y, x);
String name = HardcodedUtil.formatFabricModuleName(metadata.getName());
String name = metadata.getName();
if (name.equals("Minecraft")){ // BAD CODE
name = "Better than Adventure";
}
name = HardcodedUtil.formatFabricModuleName(name);
String trimmedName = name;
int maxNameWidth = rowWidth - 32 - 3;
FontRenderer font = this.client.fontRenderer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.render.FontRenderer;
import net.minecraft.client.render.Tessellator;
import net.minecraft.core.Global;
import net.minecraft.core.lang.I18n;
import org.lwjgl.Sys;
import org.lwjgl.input.Keyboard;
Expand Down Expand Up @@ -313,6 +314,9 @@ public void drawScreen(int mouseX, int mouseY, float delta) {
int lineSpacing = 9 + 1;
int imageOffset = 36;
String name = metadata.getName();
if (name.equals("Minecraft")){ // BAD CODE
name = "Better than Adventure";
}
name = HardcodedUtil.formatFabricModuleName(name);
String trimmedName = name;
int maxNameWidth = this.width - (x + imageOffset);
Expand All @@ -326,7 +330,13 @@ public void drawScreen(int mouseX, int mouseY, float delta) {
init = false;
}
badgeRenderer.draw(mouseX, mouseY);
font.drawString("v" + metadata.getVersion().getFriendlyString(), x + imageOffset, paneY + 2 + lineSpacing, 0x808080);
String versionString;
if (metadata.getName().equals("Minecraft")){ // BAD CODE
versionString = Global.VERSION;
} else {
versionString = metadata.getVersion().getFriendlyString();
}
font.drawString("v" + versionString, x + imageOffset, paneY + 2 + lineSpacing, 0x808080);
String authors;
List<String> names = new ArrayList<>();

Expand Down
Binary file modified src/main/resources/assets/modmenu/mc_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9fdf0f9

Please sign in to comment.