Skip to content

Commit 0abf127

Browse files
authored
fix: teleport in display command and add 1.21.9 + 1.21.10 for testing… (#192)
2 parents a59bff9 + 1cd213a commit 0abf127

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ val supportedMinecraftVersions = listOf(
3535
"1.21.6",
3636
"1.21.7",
3737
"1.21.8",
38+
"1.21.9",
39+
"1.21.10"
3840
)
3941
allprojects {
4042
apply {

src/main/java/net/onelitefeather/antiredstoneclockremastered/commands/DisplayActiveClocksCommand.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,19 @@ private String mapToCommand(int i) {
6161

6262
private Component mapClockToMessage(RedstoneClock redstoneClock) {
6363
var location = redstoneClock.getLocation();
64-
return Component.empty().hoverEvent(Component.translatable("antiredstoneclockremastered.command.display.clock.hover").asHoverEvent()).append(
65-
Component.translatable("antiredstoneclockremastered.command.display.clock.text")
66-
.arguments(
64+
return Component.empty().hoverEvent(Component.translatable("antiredstoneclockremastered.command.display.clock.hover").asHoverEvent())
65+
.append(Component.translatable("antiredstoneclockremastered.command.display.clock.text").arguments(
6766
TranslationArgument.numeric(redstoneClock.getTriggerCount()),
6867
TranslationArgument.numeric(location.getBlockX()),
6968
TranslationArgument.numeric(location.getBlockY()),
7069
TranslationArgument.numeric(location.getBlockZ()),
71-
Component.empty()
72-
.clickEvent(ClickEvent.callback(audience -> {
73-
if (audience instanceof final Player executor) {
74-
executor.teleport(location);
75-
}
76-
}))
77-
)
78-
);
70+
Component.empty() // TODO: Temporary fix for display issue
71+
).clickEvent(ClickEvent.callback(audience -> {
72+
if (audience instanceof final Player executor) {
73+
executor.teleport(location);
74+
}
75+
}))
76+
);
7977
}
8078

8179
@Override

0 commit comments

Comments
 (0)