More compile fixes

This commit is contained in:
Nassim Jahnke 2023-12-06 20:10:59 +01:00
parent 05148728de
commit 1d028f3853
10 changed files with 38 additions and 58 deletions

View file

@ -1659,10 +1659,10 @@ index db93483cfee13ca4303d7452ecbb47507dc5f89e..b836a85ce3a4374e94061fe9368e86a6
public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) {
this(output, pos, rot, world, level, name, displayName, server, entity, false, CommandResultCallback.EMPTY, EntityAnchorArgument.Anchor.FEET, CommandSigningContext.ANONYMOUS, TaskChainer.immediate(server));
diff --git a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java
index 979ea69678319338c543185ba026ad0699a388d6..5885657a1bf9fe5b93cb711d5d1f723642756352 100644
index 979ea69678319338c543185ba026ad0699a388d6..03bdc7531fad9a69a86f2afd4a4ebe195d892dd5 100644
--- a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java
+++ b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java
@@ -51,17 +51,25 @@ public class MessageArgument implements SignedArgument<MessageArgument.Message>
@@ -51,17 +51,21 @@ public class MessageArgument implements SignedArgument<MessageArgument.Message>
private static void resolveSignedMessage(Consumer<PlayerChatMessage> callback, CommandSourceStack source, PlayerChatMessage message) {
MinecraftServer minecraftServer = source.getServer();
CompletableFuture<FilteredText> completableFuture = filterPlainText(source, message);
@ -1683,12 +1683,8 @@ index 979ea69678319338c543185ba026ad0699a388d6..5885657a1bf9fe5b93cb711d5d1f7236
- Component component = chatDecorator.decorate(source.getPlayer(), message.decoratedContent());
- callback.accept(message.withUnsignedContent(component));
+ // Paper start
+ source.getChatMessageChainer().append(executor -> {
+ CompletableFuture<ChatDecorator.Result> componentFuture = chatDecorator.decorate(source.getPlayer(), source, message.decoratedContent());
+ return componentFuture.thenAcceptAsync((result) -> {
+ callback.accept(message.withUnsignedContent(result.component()));
+ }, executor);
+ });
+ CompletableFuture<ChatDecorator.Result> componentFuture = chatDecorator.decorate(source.getPlayer(), source, message.decoratedContent());
+ source.getChatMessageChainer().append(() -> componentFuture.thenAccept((result) -> callback.accept(message.withUnsignedContent(result.component()))));
+ // Paper end
}