Update to Minecraft 1.19.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-12-08 03:00:00 +11:00
parent a13136ada2
commit 8b26bb8f3e
305 changed files with 3331 additions and 2864 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/CommandDispatcher.java
+++ b/net/minecraft/commands/CommandDispatcher.java
@@ -109,6 +109,14 @@
@@ -116,6 +116,14 @@
import net.minecraft.util.profiling.jfr.JvmProfiler;
import org.slf4j.Logger;
@@ -15,15 +15,15 @@
public class CommandDispatcher {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -120,6 +128,7 @@
@@ -127,6 +135,7 @@
private final com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> dispatcher = new com.mojang.brigadier.CommandDispatcher();
public CommandDispatcher(CommandDispatcher.ServerType commanddispatcher_servertype, CommandBuildContext commandbuildcontext) {
+ this(); // CraftBukkit
CommandAdvancement.register(this.dispatcher);
CommandAttribute.register(this.dispatcher);
CommandAttribute.register(this.dispatcher, commandbuildcontext);
CommandExecute.register(this.dispatcher, commandbuildcontext);
@@ -204,6 +213,11 @@
@@ -212,6 +221,11 @@
CommandPublish.register(this.dispatcher);
}
@@ -35,7 +35,7 @@
this.dispatcher.setConsumer((commandcontext, flag, i) -> {
((CommandListenerWrapper) commandcontext.getSource()).onCommandComplete(commandcontext, flag, i);
});
@@ -216,12 +230,59 @@
@@ -224,12 +238,59 @@
return new ParseResults(commandcontextbuilder1, parseresults.getReader(), parseresults.getExceptions());
}
@@ -96,7 +96,7 @@
CommandListenerWrapper commandlistenerwrapper = (CommandListenerWrapper) parseresults.getContext().getSource();
commandlistenerwrapper.getServer().getProfiler().push(() -> {
@@ -246,7 +307,7 @@
@@ -254,7 +315,7 @@
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
IChatMutableComponent ichatmutablecomponent = IChatBaseComponent.empty().withStyle(EnumChatFormat.GRAY).withStyle((chatmodifier) -> {
@@ -105,7 +105,7 @@
});
if (j > 10) {
@@ -296,11 +357,36 @@
@@ -304,11 +365,36 @@
}
public void sendCommands(EntityPlayer entityplayer) {
@@ -143,7 +143,7 @@
entityplayer.connection.send(new PacketPlayOutCommands(rootcommandnode));
}
@@ -311,7 +397,7 @@
@@ -319,7 +405,7 @@
CommandNode<CommandListenerWrapper> commandnode2 = (CommandNode) iterator.next();
if (commandnode2.canUse(commandlistenerwrapper)) {
@@ -152,7 +152,7 @@
argumentbuilder.requires((icompletionprovider) -> {
return true;
@@ -334,7 +420,7 @@
@@ -342,7 +428,7 @@
argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/CommandListenerWrapper.java
+++ b/net/minecraft/commands/CommandListenerWrapper.java
@@ -38,6 +38,8 @@
@@ -40,6 +40,8 @@
import net.minecraft.world.phys.Vec2F;
import net.minecraft.world.phys.Vec3D;
@@ -9,7 +9,7 @@
public class CommandListenerWrapper implements ICompletionProvider {
public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(IChatBaseComponent.translatable("permissions.requires.player"));
@@ -58,6 +60,7 @@
@@ -60,6 +62,7 @@
private final Vec2F rotation;
private final CommandSigningContext signingContext;
private final TaskChainer chatMessageChainer;
@@ -17,7 +17,7 @@
public CommandListenerWrapper(ICommandListener icommandlistener, Vec3D vec3d, Vec2F vec2f, WorldServer worldserver, int i, String s, IChatBaseComponent ichatbasecomponent, MinecraftServer minecraftserver, @Nullable Entity entity) {
this(icommandlistener, vec3d, vec2f, worldserver, i, s, ichatbasecomponent, minecraftserver, entity, false, (commandcontext, flag, j) -> {
@@ -172,9 +175,23 @@
@@ -170,9 +173,23 @@
@Override
public boolean hasPermission(int i) {
@@ -41,7 +41,7 @@
public Vec3D getPosition() {
return this.worldPosition;
}
@@ -300,7 +317,7 @@
@@ -298,7 +315,7 @@
while (iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
@@ -50,9 +50,9 @@
entityplayer.sendSystemMessage(ichatmutablecomponent);
}
}
@@ -368,4 +385,10 @@
public IRegistryCustom registryAccess() {
return this.server.registryAccess();
@@ -371,4 +388,10 @@
public FeatureFlagSet enabledFeatures() {
return this.level.enabledFeatures();
}
+
+ // CraftBukkit start

View File

@@ -9,7 +9,7 @@
private final Map<String, String> vagueProperties = Maps.newHashMap();
private MinecraftKey id = new MinecraftKey("");
@Nullable
@@ -284,7 +284,7 @@
@@ -276,7 +276,7 @@
Iterator iterator = iblockstate.getPossibleValues().iterator();
while (iterator.hasNext()) {
@@ -18,7 +18,7 @@
if (t0 instanceof Integer) {
Integer integer = (Integer) t0;
@@ -556,7 +556,7 @@
@@ -548,7 +548,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);
@@ -592,7 +592,7 @@
@@ -584,7 +584,7 @@
private static <T extends Comparable<T>> void appendProperty(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
stringbuilder.append(iblockstate.getName());
stringbuilder.append('=');

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
+++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
@@ -149,7 +149,7 @@
@@ -147,7 +147,7 @@
axisalignedbb = this.createAabb(this.deltaX == null ? 0.0D : this.deltaX, this.deltaY == null ? 0.0D : this.deltaY, this.deltaZ == null ? 0.0D : this.deltaZ);
}
@@ -9,7 +9,7 @@
if (this.x == null && this.y == null && this.z == null) {
function = (vec3d) -> {
@@ -206,8 +206,10 @@
@@ -204,8 +204,10 @@
};
}
@@ -22,7 +22,7 @@
this.suggestions = this::suggestSelector;
if (!this.reader.canRead()) {
throw ArgumentParserSelector.ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
@@ -465,6 +467,12 @@
@@ -463,6 +465,12 @@
}
public EntitySelector parse() throws CommandSyntaxException {
@@ -35,7 +35,7 @@
this.startPosition = this.reader.getCursor();
this.suggestions = this::suggestNameOrSelector;
if (this.reader.canRead() && this.reader.peek() == '@') {
@@ -473,7 +481,7 @@
@@ -471,7 +479,7 @@
}
this.reader.skip();

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/arguments/selector/EntitySelector.java
+++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
@@ -90,7 +90,7 @@
@@ -92,7 +92,7 @@
}
private void checkPermissions(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {