Update to Minecraft 1.19.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-08-06 07:40:00 +10:00
parent c6b9050486
commit 808a4dedfe
4 changed files with 26 additions and 26 deletions

View File

@@ -1129,7 +1129,7 @@
this.detectRateSpam();
}
@@ -1495,8 +2177,10 @@
@@ -1503,8 +2185,10 @@
}
private void detectRateSpam() {
@@ -1142,7 +1142,7 @@
this.disconnect(IChatBaseComponent.translatable("disconnect.spam"));
}
@@ -1560,7 +2244,7 @@
@@ -1568,7 +2252,7 @@
List<PreviewableCommand.a<CommandListenerWrapper>> list = previewablecommand.arguments();
if (list.isEmpty()) {
@@ -1151,7 +1151,7 @@
} else {
for (int i = list.size() - 1; i >= 0; --i) {
PreviewableCommand.a previewablecommand_a = (PreviewableCommand.a) list.get(i);
@@ -1572,11 +2256,11 @@
@@ -1580,11 +2264,11 @@
return completablefuture;
}
} catch (CommandSyntaxException commandsyntaxexception) {
@@ -1165,7 +1165,7 @@
}
}
@@ -1603,13 +2287,65 @@
@@ -1611,13 +2295,65 @@
@Override
public void handleAnimate(PacketPlayInArmAnimation packetplayinarmanimation) {
PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinarmanimation, this, this.player.getLevel());
@@ -1231,7 +1231,7 @@
this.player.resetLastActionTime();
IJumpable ijumpable;
@@ -1694,6 +2430,7 @@
@@ -1702,6 +2438,7 @@
@Override
public void handleInteract(PacketPlayInUseEntity packetplayinuseentity) {
PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinuseentity, this, this.player.getLevel());
@@ -1239,7 +1239,7 @@
WorldServer worldserver = this.player.getLevel();
final Entity entity = packetplayinuseentity.getTarget(worldserver);
@@ -1706,10 +2443,44 @@
@@ -1714,10 +2451,44 @@
if (entity.distanceToSqr(this.player.getEyePosition()) < PlayerConnection.MAX_INTERACTION_DISTANCE) {
packetplayinuseentity.dispatch(new PacketPlayInUseEntity.c() {
@@ -1285,7 +1285,7 @@
if (enuminteractionresult.consumesAction()) {
CriterionTriggers.PLAYER_INTERACTED_WITH_ENTITY.trigger(PlayerConnection.this.player, itemstack, entity);
if (enuminteractionresult.shouldSwing()) {
@@ -1721,20 +2492,27 @@
@@ -1729,20 +2500,27 @@
@Override
public void onInteraction(EnumHand enumhand) {
@@ -1316,7 +1316,7 @@
} else {
PlayerConnection.this.disconnect(IChatBaseComponent.translatable("multiplayer.disconnect.invalid_entity_attacked"));
PlayerConnection.LOGGER.warn("Player {} tried to attack an invalid entity", PlayerConnection.this.player.getName().getString());
@@ -1779,15 +2557,21 @@
@@ -1787,15 +2565,21 @@
@Override
public void handleContainerClose(PacketPlayInCloseWindow packetplayinclosewindow) {
PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinclosewindow, this, this.player.getLevel());
@@ -1340,7 +1340,7 @@
this.player.containerMenu.sendAllDataToRemote();
} else if (!this.player.containerMenu.stillValid(this.player)) {
PlayerConnection.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
@@ -1800,7 +2584,284 @@
@@ -1808,7 +2592,284 @@
boolean flag = packetplayinwindowclick.getStateId() != this.player.containerMenu.getStateId();
this.player.containerMenu.suppressRemoteUpdates();
@@ -1626,7 +1626,7 @@
ObjectIterator objectiterator = Int2ObjectMaps.fastIterable(packetplayinwindowclick.getChangedSlots()).iterator();
while (objectiterator.hasNext()) {
@@ -1840,6 +2901,7 @@
@@ -1848,6 +2909,7 @@
@Override
public void handleContainerButtonClick(PacketPlayInEnchantItem packetplayinenchantitem) {
PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinenchantitem, this, this.player.getLevel());
@@ -1634,7 +1634,7 @@
this.player.resetLastActionTime();
if (this.player.containerMenu.containerId == packetplayinenchantitem.getContainerId() && !this.player.isSpectator()) {
if (!this.player.containerMenu.stillValid(this.player)) {
@@ -1877,6 +2939,43 @@
@@ -1885,6 +2947,43 @@
boolean flag1 = packetplayinsetcreativeslot.getSlotNum() >= 1 && packetplayinsetcreativeslot.getSlotNum() <= 45;
boolean flag2 = itemstack.isEmpty() || itemstack.getDamageValue() >= 0 && itemstack.getCount() <= 64 && !itemstack.isEmpty();
@@ -1678,7 +1678,7 @@
if (flag1 && flag2) {
this.player.inventoryMenu.getSlot(packetplayinsetcreativeslot.getSlotNum()).set(itemstack);
@@ -1899,6 +2998,7 @@
@@ -1907,6 +3006,7 @@
}
private void updateSignText(PacketPlayInUpdateSign packetplayinupdatesign, List<FilteredText> list) {
@@ -1686,7 +1686,7 @@
this.player.resetLastActionTime();
WorldServer worldserver = this.player.getLevel();
BlockPosition blockposition = packetplayinupdatesign.getPos();
@@ -1915,18 +3015,37 @@
@@ -1923,18 +3023,37 @@
if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) {
PlayerConnection.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString());
@@ -1726,7 +1726,7 @@
tileentitysign.setChanged();
worldserver.sendBlockUpdated(blockposition, iblockdata, iblockdata, 3);
@@ -1936,6 +3055,7 @@
@@ -1944,6 +3063,7 @@
@Override
public void handleKeepAlive(PacketPlayInKeepAlive packetplayinkeepalive) {
@@ -1734,7 +1734,7 @@
if (this.keepAlivePending && packetplayinkeepalive.getId() == this.keepAliveChallenge) {
int i = (int) (SystemUtils.getMillis() - this.keepAliveTime);
@@ -1950,7 +3070,17 @@
@@ -1958,7 +3078,17 @@
@Override
public void handlePlayerAbilities(PacketPlayInAbilities packetplayinabilities) {
PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinabilities, this, this.player.getLevel());
@@ -1753,7 +1753,7 @@
}
@Override
@@ -1959,8 +3089,50 @@
@@ -1967,8 +3097,50 @@
this.player.updateOptions(packetplayinsettings);
}