@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
entityplayer.sendMessage(ichatmutablecomponent, SystemUtils.NIL_UUID);
|
||||
}
|
||||
}
|
||||
@@ -279,4 +296,10 @@
|
||||
@@ -287,4 +304,10 @@
|
||||
public IRegistryCustom registryAccess() {
|
||||
return this.server.registryAccess();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
private final Map<String, String> vagueProperties = Maps.newHashMap();
|
||||
private MinecraftKey id = new MinecraftKey("");
|
||||
private BlockStateList<Block, IBlockData> definition;
|
||||
@@ -237,7 +237,7 @@
|
||||
@@ -230,7 +230,7 @@
|
||||
Iterator iterator = iblockstate.getPossibleValues().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
if (t0 instanceof Integer) {
|
||||
suggestionsbuilder.suggest((Integer) t0);
|
||||
@@ -506,7 +506,7 @@
|
||||
@@ -493,7 +493,7 @@
|
||||
Optional<T> optional = iblockstate.getValue(s);
|
||||
|
||||
if (optional.isPresent()) {
|
||||
@@ -27,7 +27,7 @@
|
||||
this.properties.put(iblockstate, (Comparable) optional.get());
|
||||
} else {
|
||||
this.reader.setCursor(i);
|
||||
@@ -540,7 +540,7 @@
|
||||
@@ -527,7 +527,7 @@
|
||||
private static <T extends Comparable<T>> void appendProperty(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
|
||||
stringbuilder.append(iblockstate.getName());
|
||||
stringbuilder.append('=');
|
||||
@@ -35,4 +35,4 @@
|
||||
+ stringbuilder.append(iblockstate.getName((T) comparable)); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
public CompletableFuture<Suggestions> fillSuggestions(SuggestionsBuilder suggestionsbuilder, Tags<Block> tags) {
|
||||
public CompletableFuture<Suggestions> fillSuggestions(SuggestionsBuilder suggestionsbuilder, IRegistry<Block> iregistry) {
|
||||
|
||||
Reference in New Issue
Block a user