diff --git a/gradle.properties b/gradle.properties index 83b292d..b4bf440 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/versions.html - minecraft_version=1.18.1 - yarn_mappings=1.18.1+build.22 + minecraft_version=1.19 + yarn_mappings=1.19+build.1 loader_version=0.12.12 # Mod Properties - mod_version = 1.1.0 + mod_version = 1.1.1 maven_group = hibi.boathud archives_base_name = boathud # Dependencies - fabric_version=0.46.2+1.18 - menu_version=3.0.1 - cloth_version=5.0.38 + fabric_version=0.55.2+1.19 + menu_version=4.0.0 + cloth_version=7.0.65 diff --git a/src/main/java/hibi/boathud/HudRenderer.java b/src/main/java/hibi/boathud/HudRenderer.java index af9ff84..4a57dc9 100644 --- a/src/main/java/hibi/boathud/HudRenderer.java +++ b/src/main/java/hibi/boathud/HudRenderer.java @@ -56,13 +56,13 @@ public void render(MatrixStack stack, float tickDelta) { // Sprites // Left-right - this.drawTexture(stack, i - 86, this.scaledHeight - 65, 61, this.client.options.keyLeft.isPressed() ? 38 : 30, 17, 8); - this.drawTexture(stack, i - 63, this.scaledHeight - 65, 79, this.client.options.keyRight.isPressed() ? 38 : 30, 17, 8); + this.drawTexture(stack, i - 86, this.scaledHeight - 65, 61, this.client.options.leftKey.isPressed() ? 38 : 30, 17, 8); + this.drawTexture(stack, i - 63, this.scaledHeight - 65, 79, this.client.options.rightKey.isPressed() ? 38 : 30, 17, 8); // Ping this.renderPing(stack, i + 75 - nameLen, this.scaledHeight - 65); // Brake-throttle bar - this.drawTexture(stack, i, this.scaledHeight - 55, 0, this.client.options.keyForward.isPressed() ? 45 : 40, 61, 5); - this.drawTexture(stack, i - 61, this.scaledHeight - 55, 0, this.client.options.keyBack.isPressed() ? 35 : 30, 61, 5); + this.drawTexture(stack, i, this.scaledHeight - 55, 0, this.client.options.forwardKey.isPressed() ? 45 : 40, 61, 5); + this.drawTexture(stack, i - 61, this.scaledHeight - 55, 0, this.client.options.backKey.isPressed() ? 35 : 30, 61, 5); // Text // First Row diff --git a/src/main/java/hibi/boathud/MenuInteg.java b/src/main/java/hibi/boathud/MenuInteg.java index 7117d72..a61a5fc 100644 --- a/src/main/java/hibi/boathud/MenuInteg.java +++ b/src/main/java/hibi/boathud/MenuInteg.java @@ -3,7 +3,8 @@ import com.terraformersmc.modmenu.api.ConfigScreenFactory; import com.terraformersmc.modmenu.api.ModMenuApi; -import net.minecraft.text.TranslatableText; +import net.minecraft.text.MutableText; +import net.minecraft.text.Text; import me.shedaniel.clothconfig2.api.ConfigBuilder; import me.shedaniel.clothconfig2.api.ConfigEntryBuilder; @@ -32,14 +33,14 @@ public ConfigScreenFactory getModConfigScreenFactory() { .addEntry(entryBuilder.startEnumSelector(SPEED_FORMAT, SpeedFormat.class, SpeedFormat.values()[Config.configSpeedType]) .setDefaultValue(SpeedFormat.KMPH) .setSaveConsumer(newVal -> Config.setUnit(newVal.ordinal())) - .setEnumNameProvider(value -> new TranslatableText("boathud.option.speed_format." + value.toString())) + .setEnumNameProvider(value -> Text.translatable("boathud.option.speed_format." + value.toString())) .build()) .addEntry(entryBuilder.startEnumSelector(BAR_TYPE, BarType.class, BarType.values()[Config.barType]) .setDefaultValue(BarType.PACKED) .setTooltip(TIP_BAR, TIP_BAR_PACKED, TIP_BAR_MIXED, TIP_BAR_BLUE) .setSaveConsumer(newVal -> Config.barType = newVal.ordinal()) - .setEnumNameProvider(value -> new TranslatableText("boathud.option.bar_type." + value.toString())) + .setEnumNameProvider(value -> Text.translatable("boathud.option.bar_type." + value.toString())) .build()); builder.setSavingRunnable(() -> Config.save()); @@ -54,16 +55,16 @@ public enum SpeedFormat { MS, KMPH, MPH, KT } - private static final TranslatableText - TITLE = new TranslatableText("boathud.config.title"), - CAT = new TranslatableText("boathud.config.cat"), - ENABLED = new TranslatableText("boathud.option.enabled"), - EXTENDED = new TranslatableText("boathud.option.extended"), - BAR_TYPE = new TranslatableText("boathud.option.bar_type"), - SPEED_FORMAT = new TranslatableText("boathud.option.speed_format"), - TIP_EXTENDED = new TranslatableText("boathud.tooltip.extended"), - TIP_BAR = new TranslatableText("boathud.tooltip.bar_type"), - TIP_BAR_PACKED = new TranslatableText("boathud.tooltip.bar_type.packed"), - TIP_BAR_MIXED = new TranslatableText("boathud.tooltip.bar_type.mixed"), - TIP_BAR_BLUE = new TranslatableText("boathud.tooltip.bar_type.blue"); + private static final MutableText + TITLE = Text.translatable("boathud.config.title"), + CAT = Text.translatable("boathud.config.cat"), + ENABLED = Text.translatable("boathud.option.enabled"), + EXTENDED = Text.translatable("boathud.option.extended"), + BAR_TYPE = Text.translatable("boathud.option.bar_type"), + SPEED_FORMAT = Text.translatable("boathud.option.speed_format"), + TIP_EXTENDED = Text.translatable("boathud.tooltip.extended"), + TIP_BAR = Text.translatable("boathud.tooltip.bar_type"), + TIP_BAR_PACKED = Text.translatable("boathud.tooltip.bar_type.packed"), + TIP_BAR_MIXED = Text.translatable("boathud.tooltip.bar_type.mixed"), + TIP_BAR_BLUE = Text.translatable("boathud.tooltip.bar_type.blue"); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 94f38f4..26929d0 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -31,14 +31,16 @@ "depends": { "fabricloader": ">=0.12.12", "fabric": "*", - "minecraft": ">=1.17", + "minecraft": ">=1.19", "java": ">=17", - "cloth-config2": ">=5.0" + "cloth-config2": ">=7.0" }, "custom": { "modmenu": { "links": { "modmenu.github_releases": "https://github.com/Hibiii/BoatHud/releases", + "modmenu.curseforge": "https://www.curseforge.com/minecraft/mc-mods/boathud", + "modmenu.modrinth": "https://modrinth.com/mod/boathud/", "modmenu.discord": "https://discord.gg/Zef3c27dN2" } }