some more compile fixes

This commit is contained in:
Jake Potrebic
2024-04-25 18:51:28 -07:00
parent 2432de7be3
commit 88a3dac057
11 changed files with 87 additions and 44 deletions

View File

@@ -3624,7 +3624,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ @Override
+ public void customName(final net.kyori.adventure.text.Component customName) {
+ this.getSnapshot().setCustomName(customName != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(customName) : null);
+ this.getSnapshot().name = (customName != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(customName) : null);
+ }
+ // Paper end
+
@@ -3642,7 +3642,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start
+ @Override
+ public net.kyori.adventure.text.Component customName() {
+ final EnchantmentTableBlockEntity be = this.getSnapshot();
+ final EnchantingTableBlockEntity be = this.getSnapshot();
+ return be.hasCustomName() ? io.papermc.paper.adventure.PaperAdventure.asAdventure(be.getCustomName()) : null;
+ }
+
@@ -4351,9 +4351,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ net.minecraft.core.Registry<net.minecraft.network.chat.ChatType> chatTypeRegistry = this.getHandle().level().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.CHAT_TYPE);
+
+ return new net.minecraft.network.chat.ChatType.Bound(
+ chatTypeRegistry.get(io.papermc.paper.adventure.PaperAdventure.asVanilla(boundChatType.type().key())),
+ chatTypeRegistry.getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.CHAT_TYPE, io.papermc.paper.adventure.PaperAdventure.asVanilla(boundChatType.type().key()))),
+ io.papermc.paper.adventure.PaperAdventure.asVanilla(boundChatType.name()),
+ io.papermc.paper.adventure.PaperAdventure.asVanilla(boundChatType.target())
+ Optional.ofNullable(io.papermc.paper.adventure.PaperAdventure.asVanilla(boundChatType.target()))
+ );
+ }
+
@@ -4400,8 +4400,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ @Override
+ public void sendActionBar(final net.kyori.adventure.text.Component message) {
+ final net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket packet = new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket((net.minecraft.network.chat.Component) null);
+ packet.adventure$text = message;
+ final net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket packet = new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanillaNullToEmpty(message));
+ this.getHandle().connection.send(packet);
+ }
+