Upgrade Fabric/Forge to MC 1.20.4

This commit is contained in:
Luck 2023-12-11 19:29:39 +00:00
parent 43f4d490bb
commit 5f87de3569
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
4 changed files with 9 additions and 8 deletions

View File

@ -13,9 +13,9 @@ repositories {
dependencies {
// https://modmuss50.me/fabric.html
minecraft 'com.mojang:minecraft:1.20.3'
mappings 'net.fabricmc:yarn:1.20.3+build.1:v2'
modImplementation 'net.fabricmc:fabric-loader:0.15.0'
minecraft 'com.mojang:minecraft:1.20.4'
mappings 'net.fabricmc:yarn:1.20.4+build.1:v2'
modImplementation 'net.fabricmc:fabric-loader:0.15.1'
Set<String> apiModules = [
'fabric-api-base',
@ -25,7 +25,7 @@ dependencies {
]
apiModules.forEach {
modImplementation(fabricApi.module(it, '0.91.1+1.20.3'))
modImplementation(fabricApi.module(it, '0.91.2+1.20.4'))
}
include(modImplementation('me.lucko:fabric-permissions-api:0.2-SNAPSHOT'))

View File

@ -117,6 +117,6 @@ public class FabricSenderFactory extends SenderFactory<LPFabricPlugin, ServerCom
}
public static Text toNativeText(Component component) {
return Text.Serialization.fromJson(GsonComponentSerializer.gson().serialize(component));
return Text.Serialization.fromJsonTree(GsonComponentSerializer.gson().serializeToTree(component));
}
}

View File

@ -1,2 +1,2 @@
minecraftVersion=1.20.2
forgeVersion=48.0.49
minecraftVersion=1.20.4
forgeVersion=49.0.3

View File

@ -40,6 +40,7 @@ import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import net.luckperms.api.util.Tristate;
import net.minecraft.commands.CommandSource;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.Component.Serializer;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.rcon.RconConsoleSource;
import net.minecraft.world.entity.player.Player;
@ -116,7 +117,7 @@ public class ForgeSenderFactory extends SenderFactory<LPForgePlugin, CommandSour
}
public static net.minecraft.network.chat.Component toNativeText(Component component) {
return net.minecraft.network.chat.Component.Serializer.fromJson(GsonComponentSerializer.gson().serialize(component));
return Serializer.fromJson(GsonComponentSerializer.gson().serializeToTree(component));
}
}