Skip to content

Commit 75300a9

Browse files
committed
Update to 1.19
1 parent c1f8551 commit 75300a9

38 files changed

+141
-148
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ dependencies {
4747
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
4848

4949
// Cloth Config API
50-
include "me.shedaniel.cloth:cloth-config-fabric:6.2.57"
51-
modImplementation "me.shedaniel.cloth:cloth-config-fabric:6.2.57"
50+
include "me.shedaniel.cloth:cloth-config-fabric:8.0.75"
51+
modImplementation "me.shedaniel.cloth:cloth-config-fabric:8.0.75"
5252

5353
// Fabric API. This is technically optional, but you probably want it anyway.
5454
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
org.gradle.jvmargs=-Xmx1G
33
# Fabric Properties
44
# check these on https://modmuss50.me/fabric.html
5-
minecraft_version=1.18.2
6-
yarn_mappings=1.18.2+build.2
7-
loader_version=0.13.3
5+
minecraft_version=1.19.2
6+
yarn_mappings=1.19.2+build.1
7+
loader_version=0.14.8
88
# Mod Properties
99
mod_version=1.0-SNAPSHOT
10-
maven_group=io.github.codeutilities
11-
archives_base_name=CodeUtilities
10+
maven_group=io.github.techstreet.dfscript
11+
archives_base_name=DFScript
1212
# Dependencies
1313
# check this on https://modmuss50.me/fabric.html
14-
fabric_version=0.48.0+1.18.2
14+
fabric_version=0.58.6+1.19.2

src/main/java/io/github/techstreet/dfscript/commands/Command.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.mojang.brigadier.arguments.ArgumentType;
55
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
66
import com.mojang.brigadier.builder.RequiredArgumentBuilder;
7-
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
7+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
88

99
public interface Command {
1010

src/main/java/io/github/techstreet/dfscript/commands/CommandManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import java.util.List;
99

1010
import io.github.techstreet.dfscript.util.hypercube.HypercubeRank;
11-
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
12-
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
11+
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
12+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
1313

1414
public class CommandManager implements Loadable {
1515

@@ -35,7 +35,7 @@ public void load() {
3535
// Example of registering commands with a required df rank
3636
// rankedCommands.put(new TestCommand(), DFRank.JRHELPER);
3737

38-
attachTo(ClientCommandManager.DISPATCHER);
38+
attachTo(ClientCommandManager.getActiveDispatcher());
3939
}
4040

4141
private void attachTo(CommandDispatcher<FabricClientCommandSource> cd) {

src/main/java/io/github/techstreet/dfscript/commands/arguments/StringListArgumentType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
import com.mojang.brigadier.suggestion.Suggestions;
99
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
1010
import net.minecraft.command.CommandSource;
11-
import net.minecraft.text.LiteralText;
11+
import net.minecraft.text.Text;
1212

1313
import java.util.Arrays;
1414
import java.util.concurrent.CompletableFuture;
1515

1616
public class StringListArgumentType implements ArgumentType<String> {
17-
public static final SimpleCommandExceptionType UNKNOWN_TYPE_EXCEPTION = new SimpleCommandExceptionType(new LiteralText("Unknown type"));
17+
public static final SimpleCommandExceptionType UNKNOWN_TYPE_EXCEPTION = new SimpleCommandExceptionType(Text.literal("Unknown type"));
1818
private final String[] suggestions;
1919

2020
public StringListArgumentType(String[] suggestions) {

src/main/java/io/github/techstreet/dfscript/commands/misc/PingCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import io.github.techstreet.dfscript.event.system.EventManager;
88
import io.github.techstreet.dfscript.util.chat.ChatType;
99
import io.github.techstreet.dfscript.util.chat.ChatUtil;
10-
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
10+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
1111

1212
import java.util.Date;
1313

@@ -50,8 +50,8 @@ public void register(CommandDispatcher<FabricClientCommandSource> cd) {
5050

5151
cd.register(
5252
literal("ping").executes(ctx -> {
53-
io.github.techstreet.dfscript.DFScript.MC.player.sendChatMessage("/server");
54-
DFScript.MC.player.sendChatMessage("/plot");
53+
io.github.techstreet.dfscript.DFScript.MC.player.sendCommand("/server");
54+
DFScript.MC.player.sendCommand("/plot");
5555

5656
serverPing = new Date().getTime();
5757
proxyPing = new Date().getTime();

src/main/java/io/github/techstreet/dfscript/commands/misc/ScriptsCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import java.util.ArrayList;
1414
import java.util.List;
1515
import java.util.Map.Entry;
16-
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
16+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
1717

1818
public class ScriptsCommand implements Command {
1919

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package io.github.techstreet.dfscript.config.internal;
22

3-
import net.minecraft.text.TranslatableText;
3+
import net.minecraft.text.MutableText;
4+
import net.minecraft.text.Text;
45

56
public interface ITranslatable {
6-
default TranslatableText getTranslation(String key) {
7+
default MutableText getTranslation(String key) {
78
return ITranslatable.get(key);
89
}
910

10-
static TranslatableText get(String key) {
11-
return new TranslatableText(key);
11+
static MutableText get(String key) {
12+
return Text.translatable(key);
1213
}
1314
}

src/main/java/io/github/techstreet/dfscript/config/menu/ConfigScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ private static Text getTitle(Text origin) {
257257

258258
private static Text getTooltip(Text title, Text origin) {
259259
MutableText titleText = title.copy();
260-
titleText.append(new LiteralText("\n\n"));
260+
titleText.append(Text.literal("\n\n"));
261261

262-
LiteralText description = new LiteralText("» ");
262+
MutableText description = Text.literal("» ");
263263
Style style = description.getStyle();
264264
style.withColor(TextColor.fromFormatting(Formatting.AQUA));
265265
description.setStyle(style);

src/main/java/io/github/techstreet/dfscript/config/structure/ConfigGroup.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import io.github.techstreet.dfscript.loader.v2.IManager;
44
import io.github.techstreet.dfscript.util.hypercube.HypercubeRank;
5-
import net.minecraft.text.LiteralText;
5+
import net.minecraft.text.Text;
66

77
import java.util.ArrayList;
88
import java.util.List;
@@ -14,20 +14,20 @@ public abstract class ConfigGroup implements IManager<ConfigSubGroup>, IRawTrans
1414
private final String name;
1515
private HypercubeRank rank = HypercubeRank.DEFAULT;
1616

17-
private LiteralText rawKey = null;
17+
private Text rawKey = null;
1818

1919
public ConfigGroup(String name) {
2020
this.name = name;
2121
}
2222

2323
@Override
2424
public ConfigGroup setRawKey(String key) {
25-
this.rawKey = new LiteralText(key);
25+
this.rawKey = Text.literal(key);
2626
return this;
2727
}
2828

2929
@Override
30-
public Optional<LiteralText> getRawKey() {
30+
public Optional<Text> getRawKey() {
3131
return Optional.ofNullable(rawKey);
3232
}
3333

0 commit comments

Comments
 (0)