Update to Minecraft 1.18.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-03-01 02:00:00 +11:00
parent bd40300a4f
commit 9ee989ea81
184 changed files with 1785 additions and 1785 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/commands/CommandDispatcher.java
+++ b/net/minecraft/commands/CommandDispatcher.java
@@ -106,6 +106,14 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -107,6 +107,14 @@
import net.minecraft.util.profiling.jfr.JvmProfiler;
import org.slf4j.Logger;
+// CraftBukkit start
+import com.google.common.base.Joiner;
@@ -14,8 +14,8 @@
+
public class CommandDispatcher {
private static final Logger LOGGER = LogManager.getLogger();
@@ -117,6 +125,7 @@
private static final Logger LOGGER = LogUtils.getLogger();
@@ -118,6 +126,7 @@
private final com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> dispatcher = new com.mojang.brigadier.CommandDispatcher();
public CommandDispatcher(CommandDispatcher.ServerType commanddispatcher_servertype) {
@@ -23,12 +23,12 @@
CommandAdvancement.register(this.dispatcher);
CommandAttribute.register(this.dispatcher);
CommandExecute.register(this.dispatcher);
@@ -202,17 +211,63 @@
@@ -204,17 +213,63 @@
}
this.dispatcher.findAmbiguities((commandnode, commandnode1, commandnode2, collection) -> {
- CommandDispatcher.LOGGER.warn("Ambiguity between arguments {} and {} with inputs: {}", this.dispatcher.getPath(commandnode1), this.dispatcher.getPath(commandnode2), collection);
+ // CommandDispatcher.LOGGER.warn("Ambiguity between arguments {} and {} with inputs: {}", this.dispatcher.getPath(commandnode1), this.dispatcher.getPath(commandnode2), collection); // CraftBukkit
- CommandDispatcher.LOGGER.warn("Ambiguity between arguments {} and {} with inputs: {}", new Object[]{this.dispatcher.getPath(commandnode1), this.dispatcher.getPath(commandnode2), collection});
+ // CommandDispatcher.LOGGER.warn("Ambiguity between arguments {} and {} with inputs: {}", new Object[]{this.dispatcher.getPath(commandnode1), this.dispatcher.getPath(commandnode2), collection}); // CraftBukkit
});
+ // CraftBukkit start
+ }
@@ -89,7 +89,7 @@
stringreader.skip();
}
@@ -236,7 +291,7 @@
@@ -238,7 +293,7 @@
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
IChatMutableComponent ichatmutablecomponent = (new ChatComponentText("")).withStyle(EnumChatFormat.GRAY).withStyle((chatmodifier) -> {
@@ -98,7 +98,7 @@
});
if (j > 10) {
@@ -286,11 +341,36 @@
@@ -288,11 +343,36 @@
}
public void sendCommands(EntityPlayer entityplayer) {
@@ -136,7 +136,7 @@
entityplayer.connection.send(new PacketPlayOutCommands(rootcommandnode));
}
@@ -301,7 +381,7 @@
@@ -303,7 +383,7 @@
CommandNode<CommandListenerWrapper> commandnode2 = (CommandNode) iterator.next();
if (commandnode2.canUse(commandlistenerwrapper)) {
@@ -145,7 +145,7 @@
argumentbuilder.requires((icompletionprovider) -> {
return true;
@@ -324,7 +404,7 @@
@@ -326,7 +406,7 @@
argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
}