Skip to content

Commit 9c68cd5

Browse files
committed
Updated to MC 1.21.5
1 parent f434488 commit 9c68cd5

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/develop/
6-
minecraft_version=1.21.3
7-
yarn_mappings=1.21.3+build.2
8-
loader_version=0.16.7
6+
minecraft_version=1.21.5
7+
yarn_mappings=1.21.5+build.1
8+
loader_version=0.16.10
99

1010
# check available versions on maven for the given minecraft version you are using
1111
# https://masa.dy.fi/maven/carpet/fabric-carpet/
12-
carpet_minecraft_version=1.21.2
13-
carpet_core_version=1.4.158+v241022
12+
carpet_minecraft_version=1.21.5
13+
carpet_core_version=1.4.169+v250325
1414

1515
# Mod Properties
1616
mod_version = 1.5.5

src/main/java/net/replaceitem/discarpet/commands/DiscarpetCommand.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
import net.minecraft.util.Formatting;
1717
import net.replaceitem.discarpet.config.Bot;
1818

19+
import java.net.URI;
1920
import java.util.Set;
2021

2122
import static net.minecraft.server.command.CommandManager.literal;
2223

2324
public class DiscarpetCommand {
25+
public static final URI DOCS_URI = URI.create("https://replaceitem.github.io/carpet-discarpet/");
2426
private static final SuggestionProvider<ServerCommandSource> BOTS = (commandContext, suggestionsBuilder) ->
2527
CommandSource.suggestMatching(Discarpet.discordBots.keySet().stream(), suggestionsBuilder);
2628

@@ -32,8 +34,8 @@ public static void register(CommandDispatcher<ServerCommandSource> dispatcher)
3234
MutableText text = Text.literal("Discarpet version " + version).formatted(Formatting.BLUE);
3335
text.append("\nFor help, see the ");
3436
text.append(Text.literal("documentation").setStyle(Style.EMPTY
35-
.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL,"https://replaceitem.github.io/carpet-discarpet/"))
36-
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,Text.literal("Click to get to the Discarpet documentation")))
37+
.withClickEvent(new ClickEvent.OpenUrl(DOCS_URI))
38+
.withHoverEvent(new HoverEvent.ShowText(Text.literal("Click to get to the Discarpet documentation")))
3739
.withFormatting(Formatting.UNDERLINE)
3840
.withColor(Formatting.DARK_BLUE)));
3941
return text;
@@ -43,7 +45,7 @@ public static void register(CommandDispatcher<ServerCommandSource> dispatcher)
4345
executes(commandContext->{
4446
commandContext.getSource().sendFeedback(() -> {
4547
Set<String> botIDs = Discarpet.discordBots.keySet();
46-
if(botIDs.size() == 0) return Text.literal("There are no bots active").formatted(Formatting.RED);
48+
if(botIDs.isEmpty()) return Text.literal("There are no bots active").formatted(Formatting.RED);
4749
final MutableText t = Text.literal("There are " + botIDs.size() + " bots active").formatted(Formatting.GREEN);
4850
botIDs.forEach(id -> t.append(Text.literal("\n" + id).formatted(Formatting.BLUE)));
4951
return t;
@@ -61,8 +63,8 @@ public static void register(CommandDispatcher<ServerCommandSource> dispatcher)
6163
return Text.literal("Click here to get the invite link for the bot")
6264
.styled((style) -> style.withColor(Formatting.BLUE)
6365
.withFormatting(Formatting.UNDERLINE)
64-
.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, invite))
65-
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Click to open the invite link")))
66+
.withClickEvent(new ClickEvent.OpenUrl(URI.create(invite)))
67+
.withHoverEvent(new HoverEvent.ShowText(Text.literal("Click to open the invite link")))
6668
.withInsertion(invite));
6769
},false);
6870
return 1;

0 commit comments

Comments
 (0)