aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0010-Adventure.patch
diff options
context:
space:
mode:
authorJason Penilla <[email protected]>2024-04-25 19:54:07 -0700
committerJason Penilla <[email protected]>2024-04-25 19:54:07 -0700
commit7c6411b930110200a925b5173ee4883aa175d50f (patch)
tree8e43e411963cf90d302ba9dc74c96df5f813b0c4 /patches/server/0010-Adventure.patch
parentd2ef0622c92f55e3fe5567e1db2f8b847af25544 (diff)
downloadPaper-7c6411b930110200a925b5173ee4883aa175d50f.tar.gz
Paper-7c6411b930110200a925b5173ee4883aa175d50f.zip
compile fixes
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r--patches/server/0010-Adventure.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch
index 75ecfafed9..e4aba58ad5 100644
--- a/patches/server/0010-Adventure.patch
+++ b/patches/server/0010-Adventure.patch
@@ -641,7 +641,7 @@ index 0000000000000000000000000000000000000000..23bd6d2d8fed5a3491e856f8b875456d
+}
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
new file mode 100644
-index 0000000000000000000000000000000000000000..bfb1904be53112cdff62001c3307c7d5ef89704c
+index 0000000000000000000000000000000000000000..69347ac0547cba3842040f89615e721b5d1ac3ca
--- /dev/null
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
@@ -0,0 +1,376 @@
@@ -925,7 +925,7 @@ index 0000000000000000000000000000000000000000..bfb1904be53112cdff62001c3307c7d5
+
+ private net.kyori.adventure.chat.ChatType.Bound adventure(ChatType.Bound chatType) {
+ @Subst("key:value") final String stringKey = Objects.requireNonNull(
-+ ChatProcessor.this.server.registryAccess().registryOrThrow(Registries.CHAT_TYPE).getKey(chatType.chatType()),
++ chatType.chatType().unwrapKey().orElseThrow().location(),
+ () -> "No key for '%s' in CHAT_TYPE registry.".formatted(chatType)
+ ).toString();
+ net.kyori.adventure.chat.@Nullable ChatType adventure = BUILT_IN_CHAT_TYPES.get(stringKey);
@@ -934,7 +934,7 @@ index 0000000000000000000000000000000000000000..bfb1904be53112cdff62001c3307c7d5
+ }
+ return adventure.bind(
+ PaperAdventure.asAdventure(chatType.name()),
-+ PaperAdventure.asAdventure(chatType.targetName())
++ chatType.targetName().map(PaperAdventure::asAdventure).orElse(null)
+ );
+ }
+
@@ -3587,7 +3587,7 @@ index 9ef8b0327e377817faaf58b82a8fdfa5e801eac8..2dfbe061a064b0c79b96f644a1c3639b
public String getCustomName() {
BeaconBlockEntity beacon = this.getSnapshot();
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
-index f9b89a7c6ac9f7fdbd29567a5b6550398dbc7345..2789d29f5be041a550618d455bb8912ee5162663 100644
+index f9b89a7c6ac9f7fdbd29567a5b6550398dbc7345..f5b0bec4c1164fe7ef6da1f19a6ce9bb3d6864d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
@@ -45,4 +45,16 @@ public class CraftCommandBlock extends CraftBlockEntityState<CommandBlockEntity>
@@ -3603,7 +3603,7 @@ index f9b89a7c6ac9f7fdbd29567a5b6550398dbc7345..2789d29f5be041a550618d455bb8912e
+
+ @Override
+ public void name(net.kyori.adventure.text.Component name) {
-+ getSnapshot().getCommandBlock().setName(name == null ? net.minecraft.network.chat.Component.literal("@") : io.papermc.paper.adventure.PaperAdventure.asVanilla(name));
++ getSnapshot().getCommandBlock().setCustomName(name == null ? net.minecraft.network.chat.Component.literal("@") : io.papermc.paper.adventure.PaperAdventure.asVanilla(name));
+ }
+ // Paper end
}