diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aaac1e..83aa531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.15.4+1.20.4] - 2024-04-22 + +### Added + +- Support Minecraft 1.20.4 + ## [1.15.3+1.20.2] - 2024-03-29 ### Fixed diff --git a/build.gradle b/build.gradle index e5c1601..57249e6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ import groovy.json.JsonSlurper plugins { - id 'fabric-loom' version '1.5-SNAPSHOT' + id 'fabric-loom' version '1.6-SNAPSHOT' id 'maven-publish' id 'com.modrinth.minotaur' version '2.+' } diff --git a/gradle.properties b/gradle.properties index b21fb80..45acd24 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,18 +11,18 @@ project_slug = watson modrinth_debug = false #Current and version -mod_version = 1.15.3 +mod_version = 1.15.4 #Required malilib version -malilib_version = 0.17.0 -malilib_mod_version = >=0.17.0 +malilib_version = 0.18.1 +malilib_mod_version = >=0.18.1 # Minecraft, Fabric and mappings versions -minecraft_version_malilib = 1.20.2 -minecraft_version_mod = 1.20.2 -minecraft_version = 1.20.2 -minecraft_version_dependency = 1.20.2 -mappings_version = 1.20.2+build.2 +minecraft_version_malilib = 1.20.4 +minecraft_version_mod = 1.20.4 +minecraft_version = 1.20.4 +minecraft_version_dependency = 1.20.4 +mappings_version = 1.20.4+build.1 -fabric_loader_version = 0.14.23 -mod_menu_version = 8.0.0 \ No newline at end of file +fabric_loader_version = 0.15.9 +mod_menu_version = 9.0.0 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd49..e644113 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1af9e09..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 2d26e43..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -131,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. diff --git a/gradlew.bat b/gradlew.bat index 93e3f59..25da30d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/src/main/java/eu/minemania/watson/chat/command/ClientCommandManager.java b/src/main/java/eu/minemania/watson/chat/command/ClientCommandManager.java index 4f04774..8b1572b 100644 --- a/src/main/java/eu/minemania/watson/chat/command/ClientCommandManager.java +++ b/src/main/java/eu/minemania/watson/chat/command/ClientCommandManager.java @@ -8,7 +8,6 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.command.CommandException; import net.minecraft.text.*; import net.minecraft.util.Formatting; @@ -62,10 +61,6 @@ public static int executeCommand(StringReader reader, String command) { return player.networkHandler.getCommandDispatcher().execute(reader, new FakeCommandSource(player)); } - catch (CommandException e) - { - ClientCommandManager.sendError(e.getTextMessage()); - } catch (CommandSyntaxException e) { ClientCommandManager.sendError(Texts.toText(e.getRawMessage())); diff --git a/src/main/java/eu/minemania/watson/chat/command/FakeCommandSource.java b/src/main/java/eu/minemania/watson/chat/command/FakeCommandSource.java index 3566aad..780f594 100644 --- a/src/main/java/eu/minemania/watson/chat/command/FakeCommandSource.java +++ b/src/main/java/eu/minemania/watson/chat/command/FakeCommandSource.java @@ -16,7 +16,7 @@ public class FakeCommandSource extends ServerCommandSource public FakeCommandSource(ClientPlayerEntity player) { - super(player, player.getPos(), player.getRotationClient(), null, 0, player.getEntityName(), player.getName(), null, player); + super(player, player.getPos(), player.getRotationClient(), null, 0, player.getName().getString(), player.getDisplayName(), null, player); } @Override diff --git a/src/main/java/eu/minemania/watson/mixin/MixinPlayerEntity.java b/src/main/java/eu/minemania/watson/mixin/MixinPlayerEntity.java index debe89d..ccc6d81 100644 --- a/src/main/java/eu/minemania/watson/mixin/MixinPlayerEntity.java +++ b/src/main/java/eu/minemania/watson/mixin/MixinPlayerEntity.java @@ -1,5 +1,6 @@ package eu.minemania.watson.mixin; +import net.minecraft.scoreboard.Team; import net.minecraft.text.MutableText; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -11,7 +12,6 @@ import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.scoreboard.AbstractTeam; import net.minecraft.text.Text; import net.minecraft.world.World; @@ -26,8 +26,8 @@ protected MixinPlayerEntity(World world, GameProfile gameprofile) super(EntityType.PLAYER, world); } - @Redirect(method = "getDisplayName", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;getScoreboardTeam()Lnet/minecraft/scoreboard/AbstractTeam;")) - private AbstractTeam getCustomScoreboardTeam(PlayerEntity player) + @Redirect(method = "getDisplayName", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;getScoreboardTeam()Lnet/minecraft/scoreboard/Team;")) + private Team getCustomScoreboardTeam(PlayerEntity player) { if (Highlight.changeUsername) {