From ee4036cb700f54201a396d707aeb31c32db1e47d Mon Sep 17 00:00:00 2001 From: Nitj'sefni <75166987+Nitjsefnie@users.noreply.github.com> Date: Sun, 10 Dec 2023 16:09:17 +0100 Subject: [PATCH] Updated to 1.19 (#17) --- build.gradle.kts | 2 +- .../cpas/runtime/mixin/MixinHandledScreen.java | 2 +- .../cpas/runtime/toast/HelpToast.java | 6 +++--- .../cpas/runtime/widget/FakeButtonWidget.java | 4 ++-- .../cpas/runtime/widget/ToggleButtonWidget.java | 4 ++-- cpas-trinkets/build.gradle.kts | 3 ++- gradle.properties | 16 ++++++++-------- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 1 + src/main/resources/fabric.mod.json | 7 +++---- 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 12a963c..f199502 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ import com.matthewprenger.cursegradle.CurseProject import com.matthewprenger.cursegradle.CurseRelation plugins { - id("fabric-loom").version("0.10.+") + id("fabric-loom").version("1.4.+") id("com.matthewprenger.cursegradle").version("1.4.0") } diff --git a/cpas-runtime/src/main/java/badasintended/cpas/runtime/mixin/MixinHandledScreen.java b/cpas-runtime/src/main/java/badasintended/cpas/runtime/mixin/MixinHandledScreen.java index 491a92d..eb509cf 100644 --- a/cpas-runtime/src/main/java/badasintended/cpas/runtime/mixin/MixinHandledScreen.java +++ b/cpas-runtime/src/main/java/badasintended/cpas/runtime/mixin/MixinHandledScreen.java @@ -37,7 +37,7 @@ private void drawSlot(MatrixStack matrices, Slot slot, CallbackInfo ci) { ci.cancel(); } - @Inject(method = "isPauseScreen", at = @At("RETURN"), cancellable = true) + @Inject(method = "shouldPause", at = @At("RETURN"), cancellable = true) private void isPauseScreen(CallbackInfoReturnable cir) { cir.setReturnValue(cir.getReturnValueZ() || (editorScreen != null && editorScreen.visible)); } diff --git a/cpas-runtime/src/main/java/badasintended/cpas/runtime/toast/HelpToast.java b/cpas-runtime/src/main/java/badasintended/cpas/runtime/toast/HelpToast.java index 54d0b84..2f28bb6 100644 --- a/cpas-runtime/src/main/java/badasintended/cpas/runtime/toast/HelpToast.java +++ b/cpas-runtime/src/main/java/badasintended/cpas/runtime/toast/HelpToast.java @@ -10,7 +10,7 @@ import net.minecraft.client.toast.ToastManager; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.OrderedText; -import net.minecraft.text.TranslatableText; +import net.minecraft.text.Text; import static badasintended.cpas.runtime.CpasClient.bindTexture; import static badasintended.cpas.runtime.CpasClient.getTextRenderer; @@ -18,11 +18,11 @@ @Environment(EnvType.CLIENT) public class HelpToast extends DrawableHelper implements Toast { - private final TranslatableText text; + private final Text text; private final List warpedText; public HelpToast() { - text = new TranslatableText("tutorial.cpas", CpasClient.EDIT.getBoundKeyLocalizedText().getString().toUpperCase()); + text = Text.translatable("tutorial.cpas", CpasClient.EDIT.getBoundKeyLocalizedText().getString().toUpperCase()); warpedText = getTextRenderer().wrapLines(text, getWidth() - 32); } diff --git a/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/FakeButtonWidget.java b/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/FakeButtonWidget.java index 5b1c277..800d9b2 100644 --- a/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/FakeButtonWidget.java +++ b/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/FakeButtonWidget.java @@ -6,7 +6,7 @@ import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.gui.widget.ClickableWidget; import net.minecraft.client.sound.SoundManager; -import net.minecraft.text.LiteralText; +import net.minecraft.text.Text; @Environment(EnvType.CLIENT) public abstract class FakeButtonWidget extends ClickableWidget { @@ -18,7 +18,7 @@ public FakeButtonWidget(int x, int y, int width, int height) { } public FakeButtonWidget(int x, int y, int width, int height, boolean sound) { - super(x, y, width, height, LiteralText.EMPTY); + super(x, y, width, height, Text.empty()); this.sound = sound; } diff --git a/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/ToggleButtonWidget.java b/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/ToggleButtonWidget.java index dd18505..dcde166 100644 --- a/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/ToggleButtonWidget.java +++ b/cpas-runtime/src/main/java/badasintended/cpas/runtime/widget/ToggleButtonWidget.java @@ -6,7 +6,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.text.TranslatableText; +import net.minecraft.text.Text; import static badasintended.cpas.runtime.CpasClient.bindTexture; import static badasintended.cpas.runtime.CpasClient.drawNinePatch; @@ -22,7 +22,7 @@ public class ToggleButtonWidget extends ButtonWidget { private boolean enabled = false; public ToggleButtonWidget(int x, int y, Consumer consumer, String tlKey, Object... args) { - super(x, y, 22, 13, new TranslatableText(tlKey, args), w -> { + super(x, y, 22, 13, Text.translatable(tlKey, args),w -> { }); this.consumer = consumer; diff --git a/cpas-trinkets/build.gradle.kts b/cpas-trinkets/build.gradle.kts index 8c6fbb4..0df50ca 100644 --- a/cpas-trinkets/build.gradle.kts +++ b/cpas-trinkets/build.gradle.kts @@ -1,10 +1,11 @@ repositories { maven("https://maven.terraformersmc.com/releases") - maven("https://ladysnake.jfrog.io/artifactory/mods") + maven("https://maven.ladysnake.org/releases") } dependencies { implementation(project(":cpas-api")) modApi("dev.emi:trinkets:${rootProp["trinkets"]}") + modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-base:5.0.0") } diff --git a/gradle.properties b/gradle.properties index 812a6e0..92f35d6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,21 +1,21 @@ -org.gradle.jvmargs = -Xmx1G +org.gradle.jvmargs = -Xmx4G -minecraft = 1.18 -yarn = 1.18+build.1 -loader = 0.12.8 +minecraft = 1.19 +yarn = 1.19+build.1 +loader = 0.14.25 # Mod Properties group = lol.bai archiveBaseName = cpas # Dependencies -fabric = 0.43.0+1.18 -trinkets = 3.1.0 -rei = 7.0.341 +fabric = 0.58.0+1.19 +trinkets = 3.4.0 +rei = 9.1.668 # CurseForge cf.projectId = 422447 cf.releaseType = release -cf.gameVersion = 1.18 +cf.gameVersion = 1.19 cf.require = fabric-api cf.optional = roughly-enough-items, trinkets-fabric diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e750102..db9a6b8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index cfc25a8..7b48a42 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,7 @@ pluginManagement { repositories { maven("https://maven.fabricmc.net") + mavenCentral() gradlePluginPortal() } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 3a18afe..1a5ea95 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -10,11 +10,10 @@ "issues" : "https://github.com/badasintended/cpas/issues" }, "license" : "MIT", - "icon" : "assets/cpas/icon.png", "environment" : "*", "depends" : { - "fabricloader": ">=0.12", - "fabric" : ">=0.43", - "minecraft" : "1.18.x" + "fabricloader": ">=0.14.25", + "fabric" : ">=0.58", + "minecraft" : ">=1.19" } }