@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/commands/CommandDispatcher.java
|
||||
+++ b/net/minecraft/commands/CommandDispatcher.java
|
||||
@@ -134,6 +134,14 @@
|
||||
@@ -136,6 +136,14 @@
|
||||
import net.minecraft.world.level.GameRules;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
public class CommandDispatcher {
|
||||
|
||||
private static final ThreadLocal<ExecutionContext<CommandListenerWrapper>> CURRENT_EXECUTION_CONTEXT = new ThreadLocal();
|
||||
@@ -146,6 +154,7 @@
|
||||
@@ -148,6 +156,7 @@
|
||||
private final com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> dispatcher = new com.mojang.brigadier.CommandDispatcher();
|
||||
|
||||
public CommandDispatcher(CommandDispatcher.ServerType commanddispatcher_servertype, CommandBuildContext commandbuildcontext) {
|
||||
@@ -23,7 +23,7 @@
|
||||
CommandAdvancement.register(this.dispatcher);
|
||||
CommandAttribute.register(this.dispatcher, commandbuildcontext);
|
||||
CommandExecute.register(this.dispatcher, commandbuildcontext);
|
||||
@@ -246,6 +255,11 @@
|
||||
@@ -249,6 +258,11 @@
|
||||
CommandPublish.register(this.dispatcher);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
this.dispatcher.setConsumer(ExecutionCommandSource.resultConsumer());
|
||||
}
|
||||
|
||||
@@ -256,18 +270,65 @@
|
||||
@@ -259,18 +273,65 @@
|
||||
return new ParseResults(commandcontextbuilder1, parseresults.getReader(), parseresults.getExceptions());
|
||||
}
|
||||
|
||||
@@ -98,12 +98,12 @@
|
||||
commandlistenerwrapper.getServer().getProfiler().push(() -> {
|
||||
return "/" + s;
|
||||
});
|
||||
- ContextChain contextchain = finishParsing(parseresults, s, commandlistenerwrapper);
|
||||
+ ContextChain contextchain = finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit
|
||||
- ContextChain<CommandListenerWrapper> contextchain = finishParsing(parseresults, s, commandlistenerwrapper);
|
||||
+ ContextChain<CommandListenerWrapper> contextchain = finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit
|
||||
|
||||
try {
|
||||
if (contextchain != null) {
|
||||
@@ -301,7 +362,7 @@
|
||||
@@ -304,7 +365,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -112,7 +112,7 @@
|
||||
try {
|
||||
validateParseResults(parseresults);
|
||||
return (ContextChain) ContextChain.tryFlatten(parseresults.getContext().build(s)).orElseThrow(() -> {
|
||||
@@ -312,7 +373,7 @@
|
||||
@@ -315,7 +376,7 @@
|
||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||
IChatMutableComponent ichatmutablecomponent = IChatBaseComponent.empty().withStyle(EnumChatFormat.GRAY).withStyle((chatmodifier) -> {
|
||||
@@ -121,7 +121,7 @@
|
||||
});
|
||||
|
||||
if (i > 10) {
|
||||
@@ -362,7 +423,7 @@
|
||||
@@ -365,7 +426,7 @@
|
||||
|
||||
executioncontext1.close();
|
||||
} finally {
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
} else {
|
||||
consumer.accept(executioncontext);
|
||||
@@ -371,11 +432,36 @@
|
||||
@@ -374,11 +435,36 @@
|
||||
}
|
||||
|
||||
public void sendCommands(EntityPlayer entityplayer) {
|
||||
@@ -168,7 +168,7 @@
|
||||
entityplayer.connection.send(new PacketPlayOutCommands(rootcommandnode));
|
||||
}
|
||||
|
||||
@@ -386,7 +472,7 @@
|
||||
@@ -389,7 +475,7 @@
|
||||
CommandNode<CommandListenerWrapper> commandnode2 = (CommandNode) iterator.next();
|
||||
|
||||
if (commandnode2.canUse(commandlistenerwrapper)) {
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
argumentbuilder.requires((icompletionprovider) -> {
|
||||
return true;
|
||||
@@ -409,7 +495,7 @@
|
||||
@@ -412,7 +498,7 @@
|
||||
argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
|
||||
}
|
||||
|
||||
@@ -186,3 +186,12 @@
|
||||
|
||||
map.put(commandnode2, commandnode3);
|
||||
commandnode1.addChild(commandnode3);
|
||||
@@ -473,7 +559,7 @@
|
||||
}
|
||||
|
||||
private <T> HolderLookup.b.a<T> createLookup(final HolderLookup.b<T> holderlookup_b) {
|
||||
- return new HolderLookup.b.a<T>(this) {
|
||||
+ return new HolderLookup.b.a<T>() { // CraftBukkit - decompile error
|
||||
@Override
|
||||
public HolderLookup.b<T> parent() {
|
||||
return holderlookup_b;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
public Vec3D getPosition() {
|
||||
return this.worldPosition;
|
||||
}
|
||||
@@ -304,7 +321,7 @@
|
||||
@@ -300,7 +317,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
entityplayer.sendSystemMessage(ichatmutablecomponent);
|
||||
}
|
||||
}
|
||||
@@ -397,4 +414,10 @@
|
||||
@@ -393,4 +410,10 @@
|
||||
public boolean isSilent() {
|
||||
return this.silent;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
||||
+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
||||
@@ -68,7 +68,7 @@
|
||||
@@ -67,7 +67,7 @@
|
||||
private final StringReader reader;
|
||||
private final boolean forTesting;
|
||||
private final boolean allowNbt;
|
||||
@@ -9,16 +9,16 @@
|
||||
private final Map<String, String> vagueProperties = Maps.newHashMap();
|
||||
private MinecraftKey id = new MinecraftKey("");
|
||||
@Nullable
|
||||
@@ -276,7 +276,7 @@
|
||||
@@ -275,7 +275,7 @@
|
||||
Iterator iterator = iblockstate.getPossibleValues().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
- T t0 = (Comparable) iterator.next();
|
||||
+ T t0 = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
|
||||
if (t0 instanceof Integer) {
|
||||
Integer integer = (Integer) t0;
|
||||
@@ -548,7 +548,7 @@
|
||||
if (t0 instanceof Integer integer) {
|
||||
suggestionsbuilder.suggest(integer);
|
||||
@@ -545,7 +545,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);
|
||||
@@ -584,7 +584,7 @@
|
||||
@@ -581,7 +581,7 @@
|
||||
private static <T extends Comparable<T>> void appendProperty(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
|
||||
stringbuilder.append(iblockstate.getName());
|
||||
stringbuilder.append('=');
|
||||
|
||||
Reference in New Issue
Block a user