diff --git a/spark-forge/build.gradle b/spark-forge/build.gradle index 87948094..e4b2deb1 100644 --- a/spark-forge/build.gradle +++ b/spark-forge/build.gradle @@ -1,15 +1,15 @@ plugins { id 'io.github.goooler.shadow' version '8.1.7' - id 'net.minecraftforge.gradle' version '[6.0,6.2)' + id 'net.minecraftforge.gradle' version '[6.0.24,6.2)' } tasks.withType(JavaCompile) { - // override, compile targeting J17 - options.release = 17 + // override, compile targeting J21 + options.release = 21 } minecraft { - mappings channel: 'official', version: '1.20.4' + mappings channel: 'official', version: '1.20.6' accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') } @@ -19,7 +19,7 @@ configurations { } dependencies { - minecraft 'net.minecraftforge:forge:1.20.4-49.0.3' + minecraft 'net.minecraftforge:forge:1.20.6-50.0.6' shade project(':spark-common') } diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java index 93536688..2b147656 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java @@ -26,6 +26,7 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; import net.minecraft.commands.CommandSource; +import net.minecraft.core.RegistryAccess; import net.minecraft.network.chat.Component.Serializer; import net.minecraft.network.chat.MutableComponent; import net.minecraft.server.MinecraftServer; @@ -66,7 +67,7 @@ public UUID getUniqueId() { @Override public void sendMessage(Component message) { - MutableComponent component = Serializer.fromJson(GsonComponentSerializer.gson().serializeToTree(message)); + MutableComponent component = Serializer.fromJson(GsonComponentSerializer.gson().serializeToTree(message), RegistryAccess.EMPTY); Objects.requireNonNull(component, "component"); super.delegate.sendSystemMessage(component); }