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

@ -1,6 +1,6 @@
--- a/net/minecraft/server/network/LoginListener.java
+++ b/net/minecraft/server/network/LoginListener.java
@@ -42,6 +42,12 @@
@@ -41,6 +41,12 @@
import org.apache.commons.lang3.Validate;
import org.slf4j.Logger;
@ -13,7 +13,7 @@
public class LoginListener implements TickablePacketListener, PacketLoginInListener {
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
@@ -63,6 +69,7 @@
@@ -59,6 +65,7 @@
private EntityPlayer delayedAcceptPlayer;
@Nullable
private ProfilePublicKey.a profilePublicKeyData;
@ -21,7 +21,7 @@
public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) {
this.state = LoginListener.EnumProtocolState.HELLO;
@@ -92,6 +99,13 @@
@@ -88,6 +95,13 @@
}
@ -35,7 +35,7 @@
@Override
public NetworkManager getConnection() {
return this.connection;
@@ -127,10 +141,12 @@
@@ -123,10 +137,12 @@
}
}
@ -51,7 +51,7 @@
} else {
this.state = LoginListener.EnumProtocolState.ACCEPTED;
if (this.server.getCompressionThreshold() >= 0 && !this.connection.isMemoryConnection()) {
@@ -143,7 +159,7 @@
@@ -139,7 +155,7 @@
EntityPlayer entityplayer = this.server.getPlayerList().getPlayer(this.gameProfile.getId());
try {
@ -60,7 +60,7 @@
if (entityplayer != null) {
this.state = LoginListener.EnumProtocolState.DELAY_ACCEPT;
@@ -204,7 +220,7 @@
@@ -188,7 +204,7 @@
public void handleHello(PacketLoginInStart packetlogininstart) {
Validate.validState(this.state == LoginListener.EnumProtocolState.HELLO, "Unexpected hello packet", new Object[0]);
Validate.validState(isValidUsername(packetlogininstart.name()), "Invalid characters in username", new Object[0]);
@ -69,7 +69,7 @@
GameProfile gameprofile = this.server.getSingleplayerProfile();
if (gameprofile != null && packetlogininstart.name().equalsIgnoreCase(gameprofile.getName())) {
@@ -265,6 +281,43 @@
@@ -249,6 +265,43 @@
try {
LoginListener.this.gameProfile = LoginListener.this.server.getSessionService().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s, this.getAddress());
if (LoginListener.this.gameProfile != null) {
@ -113,7 +113,7 @@
LoginListener.LOGGER.info("UUID of player {} is {}", LoginListener.this.gameProfile.getName(), LoginListener.this.gameProfile.getId());
LoginListener.this.state = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else if (LoginListener.this.server.isSingleplayer()) {
@@ -284,6 +337,11 @@
@@ -268,6 +321,11 @@
LoginListener.this.disconnect(IChatBaseComponent.translatable("multiplayer.disconnect.authservers_down"));
LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable");
}

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);
}

View file

@ -4,7 +4,7 @@
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<packaging>jar</packaging>
<version>1.19.1-R0.1-SNAPSHOT</version>
<version>1.19.2-R0.1-SNAPSHOT</version>
<name>CraftBukkit</name>
<url>https://www.spigotmc.org/</url>

View file

@ -237,7 +237,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
* @return string
*/
public String getMappingsVersion() {
return "4cc0cc97cac491651bff3af8b124a214";
return "69c84c88aeb92ce9fa9525438b93f4fe";
}
@Override