mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-29 03:49:21 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@a9399451 Fixup sendAllDataToRemote calls PaperMC/Paper@cb47e018 Remove more dead code, fix pre-existing desync when cancelling and closing container PaperMC/Paper@40764534 Specify the class loader when loading services (#12829) PaperMC/Paper@1bf6364b Update Mache for horse decompile fix PaperMC/Paper@76fb5060 Add vanilla error message to precondition for DialogBaseImpl (#12831) Purpur Changes: PurpurMC/Purpur@5b26bab8 Updated Upstream (Paper) PurpurMC/Purpur@8734844b sigh... PurpurMC/Purpur@09ea9cb9 fix mobs not burning in daylight (#1689) PurpurMC/Purpur@4d5a8e6e Updated Upstream (Paper) PurpurMC/Purpur@7dbe4153 Add support for "/chase", a disabled Minecraft command. (#1690) PurpurMC/Purpur@11c030a8 Updated Upstream (Paper)
30 lines
2.0 KiB
Diff
30 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Sun, 15 Jun 2025 02:20:26 +0800
|
|
Subject: [PATCH] Fix crash during parsing unknown command message
|
|
|
|
Use direct impl for unknown commands message parse to prevent crash
|
|
|
|
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
|
index 32a9d6e9b18ac1cf66c12462221ebb53f86eac3e..5f80c7b06411e0ad9b0f71f03bb4568daea3ea4d 100644
|
|
--- a/net/minecraft/commands/Commands.java
|
|
+++ b/net/minecraft/commands/Commands.java
|
|
@@ -660,7 +660,7 @@ public class Commands {
|
|
net.kyori.adventure.text.Component detailComponent = null;
|
|
|
|
if (rawMessage.contains("<message>")) {
|
|
- messageComponent = io.papermc.paper.command.brigadier.MessageComponentSerializer.message().deserialize(commandSyntaxException.getRawMessage());
|
|
+ messageComponent = io.papermc.paper.adventure.PaperAdventure.asAdventure(ComponentUtils.fromMessage(commandSyntaxException.getRawMessage())); // Leaf - Fix crash during parsing unknown command message
|
|
}
|
|
|
|
final String input = commandSyntaxException.getInput();
|
|
@@ -703,7 +703,7 @@ public class Commands {
|
|
private static net.kyori.adventure.text.Component getVanillaUnknownCommandMessage(
|
|
net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException var7, String command
|
|
) {
|
|
- builder.color(net.kyori.adventure.text.format.NamedTextColor.RED).append(io.papermc.paper.command.brigadier.MessageComponentSerializer.message().deserialize(var7.getRawMessage()));
|
|
+ builder.color(net.kyori.adventure.text.format.NamedTextColor.RED).append(io.papermc.paper.adventure.PaperAdventure.asAdventure(ComponentUtils.fromMessage(var7.getRawMessage()))); // Leaf - Fix crash during parsing unknown command message
|
|
|
|
if (var7.getInput() != null && var7.getCursor() >= 0) {
|
|
int min = Math.min(var7.getInput().length(), var7.getCursor());
|