Skip to content

Commit

Permalink
Updated to 1.19 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitjsefnie authored Dec 10, 2023
1 parent 331d23c commit ee4036c
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Boolean> cir) {
cir.setReturnValue(cir.getReturnValueZ() || (editorScreen != null && editorScreen.visible));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
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;

@Environment(EnvType.CLIENT)
public class HelpToast extends DrawableHelper implements Toast {

private final TranslatableText text;
private final Text text;
private final List<OrderedText> 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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -22,7 +22,7 @@ public class ToggleButtonWidget extends ButtonWidget {
private boolean enabled = false;

public ToggleButtonWidget(int x, int y, Consumer<Boolean> 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;
Expand Down
3 changes: 2 additions & 1 deletion cpas-trinkets/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
}
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pluginManagement {
repositories {
maven("https://maven.fabricmc.net")
mavenCentral()
gradlePluginPortal()
}
}
Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit ee4036c

Please sign in to comment.