diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index 76904c3a8f..1020ccc757 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -1485,10 +1485,10 @@ index 0000000000000000000000000000000000000000..f0d4ec73bc8872a85e34f5c6b4d342e7 +} diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java new file mode 100644 -index 0000000000000000000000000000000000000000..f45afb7e2607617d1239abeca13a9002dd9a3a18 +index 0000000000000000000000000000000000000000..ec5e23136423e42e4f55e6ea646b8285c1ca14e2 --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -@@ -0,0 +1,531 @@ +@@ -0,0 +1,534 @@ +package io.papermc.paper.configuration; + +import com.google.common.collect.HashBasedTable; @@ -1800,6 +1800,8 @@ index 0000000000000000000000000000000000000000..f45afb7e2607617d1239abeca13a9002 + public IntOr.Default other = IntOr.Default.USE_DEFAULT; + + public int get(Entity entity, int def) { ++ return def; // TODO https://github.com/PaperMC/Paper/issues/9742 ++ /* + switch (TrackingRange.getTrackingRangeType(entity)) { + case PLAYER -> { + return player.or(def); @@ -1822,6 +1824,7 @@ index 0000000000000000000000000000000000000000..f45afb7e2607617d1239abeca13a9002 + } + + return other.or(def); ++ */ + } + } + } diff --git a/patches/server/0006-MC-Dev-fixes.patch b/patches/server/0006-MC-Dev-fixes.patch index b8b1b2a161..d889d94c33 100644 --- a/patches/server/0006-MC-Dev-fixes.patch +++ b/patches/server/0006-MC-Dev-fixes.patch @@ -52,6 +52,19 @@ index 1dfcb02b4f576e7f259a3726e0d2a48b7a76c569..bdd3b48e5de2afd6b7655ba6ff742a60 return registry; } +diff --git a/src/main/java/net/minecraft/network/ConnectionProtocol.java b/src/main/java/net/minecraft/network/ConnectionProtocol.java +index 796bcea5771dc1b55f1af800d64baee041e0725d..749d2a94d07727feb6e09e8461fc457b48c5b5f7 100644 +--- a/src/main/java/net/minecraft/network/ConnectionProtocol.java ++++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java +@@ -215,7 +215,7 @@ public enum ConnectionProtocol { + PLAY("play", protocol().addFlow(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet()).withBundlePacket(ClientboundBundlePacket.class, ClientboundBundlePacket::new).addPacket(ClientboundAddEntityPacket.class, ClientboundAddEntityPacket::new).addPacket(ClientboundAddExperienceOrbPacket.class, ClientboundAddExperienceOrbPacket::new).addPacket(ClientboundAnimatePacket.class, ClientboundAnimatePacket::new).addPacket(ClientboundAwardStatsPacket.class, ClientboundAwardStatsPacket::new).addPacket(ClientboundBlockChangedAckPacket.class, ClientboundBlockChangedAckPacket::new).addPacket(ClientboundBlockDestructionPacket.class, ClientboundBlockDestructionPacket::new).addPacket(ClientboundBlockEntityDataPacket.class, ClientboundBlockEntityDataPacket::new).addPacket(ClientboundBlockEventPacket.class, ClientboundBlockEventPacket::new).addPacket(ClientboundBlockUpdatePacket.class, ClientboundBlockUpdatePacket::new).addPacket(ClientboundBossEventPacket.class, ClientboundBossEventPacket::new).addPacket(ClientboundChangeDifficultyPacket.class, ClientboundChangeDifficultyPacket::new).addPacket(ClientboundChunkBatchFinishedPacket.class, ClientboundChunkBatchFinishedPacket::new).addPacket(ClientboundChunkBatchStartPacket.class, ClientboundChunkBatchStartPacket::new).addPacket(ClientboundChunksBiomesPacket.class, ClientboundChunksBiomesPacket::new).addPacket(ClientboundClearTitlesPacket.class, ClientboundClearTitlesPacket::new).addPacket(ClientboundCommandSuggestionsPacket.class, ClientboundCommandSuggestionsPacket::new).addPacket(ClientboundCommandsPacket.class, ClientboundCommandsPacket::new).addPacket(ClientboundContainerClosePacket.class, ClientboundContainerClosePacket::new).addPacket(ClientboundContainerSetContentPacket.class, ClientboundContainerSetContentPacket::new).addPacket(ClientboundContainerSetDataPacket.class, ClientboundContainerSetDataPacket::new).addPacket(ClientboundContainerSetSlotPacket.class, ClientboundContainerSetSlotPacket::new).addPacket(ClientboundCooldownPacket.class, ClientboundCooldownPacket::new).addPacket(ClientboundCustomChatCompletionsPacket.class, ClientboundCustomChatCompletionsPacket::new).addPacket(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new).addPacket(ClientboundDamageEventPacket.class, ClientboundDamageEventPacket::new).addPacket(ClientboundDeleteChatPacket.class, ClientboundDeleteChatPacket::new).addPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new).addPacket(ClientboundDisguisedChatPacket.class, ClientboundDisguisedChatPacket::new).addPacket(ClientboundEntityEventPacket.class, ClientboundEntityEventPacket::new).addPacket(ClientboundExplodePacket.class, ClientboundExplodePacket::new).addPacket(ClientboundForgetLevelChunkPacket.class, ClientboundForgetLevelChunkPacket::new).addPacket(ClientboundGameEventPacket.class, ClientboundGameEventPacket::new).addPacket(ClientboundHorseScreenOpenPacket.class, ClientboundHorseScreenOpenPacket::new).addPacket(ClientboundHurtAnimationPacket.class, ClientboundHurtAnimationPacket::new).addPacket(ClientboundInitializeBorderPacket.class, ClientboundInitializeBorderPacket::new).addPacket(ClientboundKeepAlivePacket.class, ClientboundKeepAlivePacket::new).addPacket(ClientboundLevelChunkWithLightPacket.class, ClientboundLevelChunkWithLightPacket::new).addPacket(ClientboundLevelEventPacket.class, ClientboundLevelEventPacket::new).addPacket(ClientboundLevelParticlesPacket.class, ClientboundLevelParticlesPacket::new).addPacket(ClientboundLightUpdatePacket.class, ClientboundLightUpdatePacket::new).addPacket(ClientboundLoginPacket.class, ClientboundLoginPacket::new).addPacket(ClientboundMapItemDataPacket.class, ClientboundMapItemDataPacket::new).addPacket(ClientboundMerchantOffersPacket.class, ClientboundMerchantOffersPacket::new).addPacket(ClientboundMoveEntityPacket.Pos.class, ClientboundMoveEntityPacket.Pos::read).addPacket(ClientboundMoveEntityPacket.PosRot.class, ClientboundMoveEntityPacket.PosRot::read).addPacket(ClientboundMoveEntityPacket.Rot.class, ClientboundMoveEntityPacket.Rot::read).addPacket(ClientboundMoveVehiclePacket.class, ClientboundMoveVehiclePacket::new).addPacket(ClientboundOpenBookPacket.class, ClientboundOpenBookPacket::new).addPacket(ClientboundOpenScreenPacket.class, ClientboundOpenScreenPacket::new).addPacket(ClientboundOpenSignEditorPacket.class, ClientboundOpenSignEditorPacket::new).addPacket(ClientboundPingPacket.class, ClientboundPingPacket::new).addPacket(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new).addPacket(ClientboundPlaceGhostRecipePacket.class, ClientboundPlaceGhostRecipePacket::new).addPacket(ClientboundPlayerAbilitiesPacket.class, ClientboundPlayerAbilitiesPacket::new).addPacket(ClientboundPlayerChatPacket.class, ClientboundPlayerChatPacket::new).addPacket(ClientboundPlayerCombatEndPacket.class, ClientboundPlayerCombatEndPacket::new).addPacket(ClientboundPlayerCombatEnterPacket.class, ClientboundPlayerCombatEnterPacket::new).addPacket(ClientboundPlayerCombatKillPacket.class, ClientboundPlayerCombatKillPacket::new).addPacket(ClientboundPlayerInfoRemovePacket.class, ClientboundPlayerInfoRemovePacket::new).addPacket(ClientboundPlayerInfoUpdatePacket.class, ClientboundPlayerInfoUpdatePacket::new).addPacket(ClientboundPlayerLookAtPacket.class, ClientboundPlayerLookAtPacket::new).addPacket(ClientboundPlayerPositionPacket.class, ClientboundPlayerPositionPacket::new).addPacket(ClientboundRecipePacket.class, ClientboundRecipePacket::new).addPacket(ClientboundRemoveEntitiesPacket.class, ClientboundRemoveEntitiesPacket::new).addPacket(ClientboundRemoveMobEffectPacket.class, ClientboundRemoveMobEffectPacket::new).addPacket(ClientboundResourcePackPacket.class, ClientboundResourcePackPacket::new).addPacket(ClientboundRespawnPacket.class, ClientboundRespawnPacket::new).addPacket(ClientboundRotateHeadPacket.class, ClientboundRotateHeadPacket::new).addPacket(ClientboundSectionBlocksUpdatePacket.class, ClientboundSectionBlocksUpdatePacket::new).addPacket(ClientboundSelectAdvancementsTabPacket.class, ClientboundSelectAdvancementsTabPacket::new).addPacket(ClientboundServerDataPacket.class, ClientboundServerDataPacket::new).addPacket(ClientboundSetActionBarTextPacket.class, ClientboundSetActionBarTextPacket::new).addPacket(ClientboundSetBorderCenterPacket.class, ClientboundSetBorderCenterPacket::new).addPacket(ClientboundSetBorderLerpSizePacket.class, ClientboundSetBorderLerpSizePacket::new).addPacket(ClientboundSetBorderSizePacket.class, ClientboundSetBorderSizePacket::new).addPacket(ClientboundSetBorderWarningDelayPacket.class, ClientboundSetBorderWarningDelayPacket::new).addPacket(ClientboundSetBorderWarningDistancePacket.class, ClientboundSetBorderWarningDistancePacket::new).addPacket(ClientboundSetCameraPacket.class, ClientboundSetCameraPacket::new).addPacket(ClientboundSetCarriedItemPacket.class, ClientboundSetCarriedItemPacket::new).addPacket(ClientboundSetChunkCacheCenterPacket.class, ClientboundSetChunkCacheCenterPacket::new).addPacket(ClientboundSetChunkCacheRadiusPacket.class, ClientboundSetChunkCacheRadiusPacket::new).addPacket(ClientboundSetDefaultSpawnPositionPacket.class, ClientboundSetDefaultSpawnPositionPacket::new).addPacket(ClientboundSetDisplayObjectivePacket.class, ClientboundSetDisplayObjectivePacket::new).addPacket(ClientboundSetEntityDataPacket.class, ClientboundSetEntityDataPacket::new).addPacket(ClientboundSetEntityLinkPacket.class, ClientboundSetEntityLinkPacket::new).addPacket(ClientboundSetEntityMotionPacket.class, ClientboundSetEntityMotionPacket::new).addPacket(ClientboundSetEquipmentPacket.class, ClientboundSetEquipmentPacket::new).addPacket(ClientboundSetExperiencePacket.class, ClientboundSetExperiencePacket::new).addPacket(ClientboundSetHealthPacket.class, ClientboundSetHealthPacket::new).addPacket(ClientboundSetObjectivePacket.class, ClientboundSetObjectivePacket::new).addPacket(ClientboundSetPassengersPacket.class, ClientboundSetPassengersPacket::new).addPacket(ClientboundSetPlayerTeamPacket.class, ClientboundSetPlayerTeamPacket::new).addPacket(ClientboundSetScorePacket.class, ClientboundSetScorePacket::new).addPacket(ClientboundSetSimulationDistancePacket.class, ClientboundSetSimulationDistancePacket::new).addPacket(ClientboundSetSubtitleTextPacket.class, ClientboundSetSubtitleTextPacket::new).addPacket(ClientboundSetTimePacket.class, ClientboundSetTimePacket::new).addPacket(ClientboundSetTitleTextPacket.class, ClientboundSetTitleTextPacket::new).addPacket(ClientboundSetTitlesAnimationPacket.class, ClientboundSetTitlesAnimationPacket::new).addPacket(ClientboundSoundEntityPacket.class, ClientboundSoundEntityPacket::new).addPacket(ClientboundSoundPacket.class, ClientboundSoundPacket::new).addPacket(ClientboundStartConfigurationPacket.class, ClientboundStartConfigurationPacket::new).addPacket(ClientboundStopSoundPacket.class, ClientboundStopSoundPacket::new).addPacket(ClientboundSystemChatPacket.class, ClientboundSystemChatPacket::new).addPacket(ClientboundTabListPacket.class, ClientboundTabListPacket::new).addPacket(ClientboundTagQueryPacket.class, ClientboundTagQueryPacket::new).addPacket(ClientboundTakeItemEntityPacket.class, ClientboundTakeItemEntityPacket::new).addPacket(ClientboundTeleportEntityPacket.class, ClientboundTeleportEntityPacket::new).addPacket(ClientboundUpdateAdvancementsPacket.class, ClientboundUpdateAdvancementsPacket::new).addPacket(ClientboundUpdateAttributesPacket.class, ClientboundUpdateAttributesPacket::new).addPacket(ClientboundUpdateMobEffectPacket.class, ClientboundUpdateMobEffectPacket::new).addPacket(ClientboundUpdateRecipesPacket.class, ClientboundUpdateRecipesPacket::new).addPacket(ClientboundUpdateTagsPacket.class, ClientboundUpdateTagsPacket::new)).addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ServerboundAcceptTeleportationPacket.class, ServerboundAcceptTeleportationPacket::new).addPacket(ServerboundBlockEntityTagQuery.class, ServerboundBlockEntityTagQuery::new).addPacket(ServerboundChangeDifficultyPacket.class, ServerboundChangeDifficultyPacket::new).addPacket(ServerboundChatAckPacket.class, ServerboundChatAckPacket::new).addPacket(ServerboundChatCommandPacket.class, ServerboundChatCommandPacket::new).addPacket(ServerboundChatPacket.class, ServerboundChatPacket::new).addPacket(ServerboundChatSessionUpdatePacket.class, ServerboundChatSessionUpdatePacket::new).addPacket(ServerboundChunkBatchReceivedPacket.class, ServerboundChunkBatchReceivedPacket::new).addPacket(ServerboundClientCommandPacket.class, ServerboundClientCommandPacket::new).addPacket(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new).addPacket(ServerboundCommandSuggestionPacket.class, ServerboundCommandSuggestionPacket::new).addPacket(ServerboundConfigurationAcknowledgedPacket.class, ServerboundConfigurationAcknowledgedPacket::new).addPacket(ServerboundContainerButtonClickPacket.class, ServerboundContainerButtonClickPacket::new).addPacket(ServerboundContainerClickPacket.class, ServerboundContainerClickPacket::new).addPacket(ServerboundContainerClosePacket.class, ServerboundContainerClosePacket::new).addPacket(ServerboundCustomPayloadPacket.class, ServerboundCustomPayloadPacket::new).addPacket(ServerboundEditBookPacket.class, ServerboundEditBookPacket::new).addPacket(ServerboundEntityTagQuery.class, ServerboundEntityTagQuery::new).addPacket(ServerboundInteractPacket.class, ServerboundInteractPacket::new).addPacket(ServerboundJigsawGeneratePacket.class, ServerboundJigsawGeneratePacket::new).addPacket(ServerboundKeepAlivePacket.class, ServerboundKeepAlivePacket::new).addPacket(ServerboundLockDifficultyPacket.class, ServerboundLockDifficultyPacket::new).addPacket(ServerboundMovePlayerPacket.Pos.class, ServerboundMovePlayerPacket.Pos::read).addPacket(ServerboundMovePlayerPacket.PosRot.class, ServerboundMovePlayerPacket.PosRot::read).addPacket(ServerboundMovePlayerPacket.Rot.class, ServerboundMovePlayerPacket.Rot::read).addPacket(ServerboundMovePlayerPacket.StatusOnly.class, ServerboundMovePlayerPacket.StatusOnly::read).addPacket(ServerboundMoveVehiclePacket.class, ServerboundMoveVehiclePacket::new).addPacket(ServerboundPaddleBoatPacket.class, ServerboundPaddleBoatPacket::new).addPacket(ServerboundPickItemPacket.class, ServerboundPickItemPacket::new).addPacket(ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new).addPacket(ServerboundPlaceRecipePacket.class, ServerboundPlaceRecipePacket::new).addPacket(ServerboundPlayerAbilitiesPacket.class, ServerboundPlayerAbilitiesPacket::new).addPacket(ServerboundPlayerActionPacket.class, ServerboundPlayerActionPacket::new).addPacket(ServerboundPlayerCommandPacket.class, ServerboundPlayerCommandPacket::new).addPacket(ServerboundPlayerInputPacket.class, ServerboundPlayerInputPacket::new).addPacket(ServerboundPongPacket.class, ServerboundPongPacket::new).addPacket(ServerboundRecipeBookChangeSettingsPacket.class, ServerboundRecipeBookChangeSettingsPacket::new).addPacket(ServerboundRecipeBookSeenRecipePacket.class, ServerboundRecipeBookSeenRecipePacket::new).addPacket(ServerboundRenameItemPacket.class, ServerboundRenameItemPacket::new).addPacket(ServerboundResourcePackPacket.class, ServerboundResourcePackPacket::new).addPacket(ServerboundSeenAdvancementsPacket.class, ServerboundSeenAdvancementsPacket::new).addPacket(ServerboundSelectTradePacket.class, ServerboundSelectTradePacket::new).addPacket(ServerboundSetBeaconPacket.class, ServerboundSetBeaconPacket::new).addPacket(ServerboundSetCarriedItemPacket.class, ServerboundSetCarriedItemPacket::new).addPacket(ServerboundSetCommandBlockPacket.class, ServerboundSetCommandBlockPacket::new).addPacket(ServerboundSetCommandMinecartPacket.class, ServerboundSetCommandMinecartPacket::new).addPacket(ServerboundSetCreativeModeSlotPacket.class, ServerboundSetCreativeModeSlotPacket::new).addPacket(ServerboundSetJigsawBlockPacket.class, ServerboundSetJigsawBlockPacket::new).addPacket(ServerboundSetStructureBlockPacket.class, ServerboundSetStructureBlockPacket::new).addPacket(ServerboundSignUpdatePacket.class, ServerboundSignUpdatePacket::new).addPacket(ServerboundSwingPacket.class, ServerboundSwingPacket::new).addPacket(ServerboundTeleportToEntityPacket.class, ServerboundTeleportToEntityPacket::new).addPacket(ServerboundUseItemOnPacket.class, ServerboundUseItemOnPacket::new).addPacket(ServerboundUseItemPacket.class, ServerboundUseItemPacket::new))), + STATUS("status", protocol().addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ServerboundStatusRequestPacket.class, ServerboundStatusRequestPacket::new).addPacket(ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new)).addFlow(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ClientboundStatusResponsePacket.class, ClientboundStatusResponsePacket::new).addPacket(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new))), + LOGIN("login", protocol().addFlow(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ClientboundLoginDisconnectPacket.class, ClientboundLoginDisconnectPacket::new).addPacket(ClientboundHelloPacket.class, ClientboundHelloPacket::new).addPacket(ClientboundGameProfilePacket.class, ClientboundGameProfilePacket::new).addPacket(ClientboundLoginCompressionPacket.class, ClientboundLoginCompressionPacket::new).addPacket(ClientboundCustomQueryPacket.class, ClientboundCustomQueryPacket::new)).addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ServerboundHelloPacket.class, ServerboundHelloPacket::new).addPacket(ServerboundKeyPacket.class, ServerboundKeyPacket::new).addPacket(ServerboundCustomQueryAnswerPacket.class, ServerboundCustomQueryAnswerPacket::read).addPacket(ServerboundLoginAcknowledgedPacket.class, ServerboundLoginAcknowledgedPacket::new))), +- CONFIGURATION("configuration", protocol().addFlow(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new).addPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new).addPacket(ClientboundFinishConfigurationPacket.class, ClientboundFinishConfigurationPacket::new).addPacket(ClientboundKeepAlivePacket.class, ClientboundKeepAlivePacket::new).addPacket(ClientboundPingPacket.class, ClientboundPingPacket::new).addPacket(ClientboundRegistryDataPacket.class, ClientboundRegistryDataPacket::new).addPacket(ClientboundResourcePackPacket.class, ClientboundResourcePackPacket::new).addPacket(ClientboundUpdateEnabledFeaturesPacket.class, ClientboundUpdateEnabledFeaturesPacket::new).addPacket(ClientboundUpdateTagsPacket.class, ClientboundUpdateTagsPacket::new)).addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new).addPacket(ServerboundCustomPayloadPacket.class, ServerboundCustomPayloadPacket::new).addPacket(ServerboundFinishConfigurationPacket.class, ServerboundFinishConfigurationPacket::new).addPacket(ServerboundKeepAlivePacket.class, ServerboundKeepAlivePacket::new).addPacket(ServerboundPongPacket.class, ServerboundPongPacket::new).addPacket(ServerboundResourcePackPacket.class, ServerboundResourcePackPacket::new))); ++ CONFIGURATION("configuration", protocol().addFlow(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new).addPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new).addPacket(ClientboundFinishConfigurationPacket.class, ClientboundFinishConfigurationPacket::new).addPacket(ClientboundKeepAlivePacket.class, ClientboundKeepAlivePacket::new).addPacket(ClientboundPingPacket.class, ClientboundPingPacket::new).addPacket(ClientboundRegistryDataPacket.class, ClientboundRegistryDataPacket::new).addPacket(ClientboundResourcePackPacket.class, ClientboundResourcePackPacket::new).addPacket(ClientboundUpdateEnabledFeaturesPacket.class, ClientboundUpdateEnabledFeaturesPacket::new).addPacket(ClientboundUpdateTagsPacket.class, ClientboundUpdateTagsPacket::new)).addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new).addPacket(ServerboundCustomPayloadPacket.class, ServerboundCustomPayloadPacket::new).addPacket(ServerboundFinishConfigurationPacket.class, ServerboundFinishConfigurationPacket::new).addPacket(ServerboundKeepAlivePacket.class, ServerboundKeepAlivePacket::new).addPacket(ServerboundPongPacket.class, ServerboundPongPacket::new).addPacket(ServerboundResourcePackPacket.class, ServerboundResourcePackPacket::new))); // Paper - decompile fix, use subclass + + public static final int NOT_REGISTERED = -1; + private final String id; diff --git a/src/main/java/net/minecraft/network/chat/ComponentUtils.java b/src/main/java/net/minecraft/network/chat/ComponentUtils.java index 13c8051da164bed579fbda44af059a36b8f00a0e..b6506e881ef337bfd2a7a0644296b48b7300a0f6 100644 --- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 18d05c4ee8..f0b6f2ba5b 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -5524,6 +5524,29 @@ index 666df22c8f847ef7152669540a3844566ef90d78..92095b494a0c4fb89b84f0b1c0376615 public UUID getUUID(String key) { return NbtUtils.loadUUID(this.get(key)); } +diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java +index e7a124403f2b07c96caaaf97d1c9023f9ec2f9d9..5b267514504497de3faa7ffa490a179200d9415c 100644 +--- a/src/main/java/net/minecraft/network/Connection.java ++++ b/src/main/java/net/minecraft/network/Connection.java +@@ -112,6 +112,18 @@ public class Connection extends SimpleChannelInboundHandler> { + BandwidthDebugMonitor bandwidthDebugMonitor; + public String hostname = ""; // CraftBukkit - add field + ++ // Paper start - add utility methods ++ public final net.minecraft.server.level.ServerPlayer getPlayer() { ++ if (this.packetListener instanceof net.minecraft.server.network.ServerGamePacketListenerImpl impl) { ++ return impl.player; ++ } else if (this.packetListener instanceof net.minecraft.server.network.ServerCommonPacketListenerImpl impl) { ++ org.bukkit.craftbukkit.entity.CraftPlayer player = impl.getCraftPlayer(); ++ return player == null ? null : player.getHandle(); ++ } ++ return null; ++ } ++ // Paper end - add utility methods ++ + public Connection(PacketFlow side) { + this.receiving = side; + } diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java index 427959874b7f167184785a582163029ad4a66df2..344c5af75c4a66bb27f3f422937c6c427c15ed25 100644 --- a/src/main/java/net/minecraft/network/PacketEncoder.java @@ -5537,6 +5560,71 @@ index 427959874b7f167184785a582163029ad4a66df2..344c5af75c4a66bb27f3f422937c6c42 if (packet.isSkippable()) { throw new SkipPacketException(var13); } +diff --git a/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java b/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java +index 929d31aa624f035eb314dece08969b102f5781fc..e94f0361cbca873f05b5b768c68c0933a0ca4483 100644 +--- a/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java ++++ b/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java +@@ -38,4 +38,14 @@ public record ClientboundCustomQueryPacket(int transactionId, CustomQueryPayload + public void handle(ClientLoginPacketListener listener) { + listener.handleCustomQuery(this); + } ++ ++ // Paper start - MC Utils - default query payloads ++ public static record PlayerInfoChannelPayload(ResourceLocation id, FriendlyByteBuf buffer) implements CustomQueryPayload { ++ ++ @Override ++ public void write(final FriendlyByteBuf buf) { ++ buf.writeBytes(this.buffer.copy()); ++ } ++ } ++ // Paper end - MC Utils - default query payloads + } +diff --git a/src/main/java/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java b/src/main/java/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java +index 44cac39893eb968aa8ea21ee571c0dcb866ce06c..953e7573f6b2ca73a8c27c4d63edec89b173f333 100644 +--- a/src/main/java/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java ++++ b/src/main/java/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java +@@ -15,7 +15,18 @@ public record ServerboundCustomQueryAnswerPacket(int transactionId, @Nullable Cu + } + + private static CustomQueryAnswerPayload readPayload(int queryId, FriendlyByteBuf buf) { +- return readUnknownPayload(buf); ++ // Paper start - MC Utils - default query payloads ++ return new net.minecraft.network.protocol.login.ServerboundCustomQueryAnswerPacket.QueryAnswerPayload( ++ buf.readNullable((buf2) -> { ++ int i = buf2.readableBytes(); ++ if (i >= 0 && i <= MAX_PAYLOAD_SIZE) { ++ return new FriendlyByteBuf(buf2.readBytes(i)); ++ } else { ++ throw new IllegalArgumentException("Payload may not be larger than " + MAX_PAYLOAD_SIZE + " bytes"); ++ } ++ }) ++ ); ++ // Paper end - MC Utils - default query payloads + } + + private static CustomQueryAnswerPayload readUnknownPayload(FriendlyByteBuf buf) { +@@ -40,4 +51,21 @@ public record ServerboundCustomQueryAnswerPacket(int transactionId, @Nullable Cu + public void handle(ServerLoginPacketListener listener) { + listener.handleCustomQueryPacket(this); + } ++ ++ // Paper start - MC Utils - default query payloads ++ public static final class QueryAnswerPayload implements CustomQueryAnswerPayload { ++ ++ public final FriendlyByteBuf buffer; ++ ++ public QueryAnswerPayload(final net.minecraft.network.FriendlyByteBuf buffer) { ++ this.buffer = buffer; ++ } ++ ++ @Override ++ public void write(final net.minecraft.network.FriendlyByteBuf buf) { ++ buf.writeBytes(this.buffer.copy()); ++ } ++ } ++ // Paper end - MC Utils - default query payloads ++ + } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 124fad1031d6125bca233541e2d5f256da70ca44..2a7c614df7b9c9405a5dd23e6a888ede7fc86683 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/patches/server/0018-Rewrite-chunk-system.patch b/patches/server/0018-Rewrite-chunk-system.patch index b6178cd634..c5c28306d6 100644 --- a/patches/server/0018-Rewrite-chunk-system.patch +++ b/patches/server/0018-Rewrite-chunk-system.patch @@ -16818,60 +16818,6 @@ index 0000000000000000000000000000000000000000..7e8dc9e8f381abfdcce2746edc93122d + } + } +} -diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index e7a124403f2b07c96caaaf97d1c9023f9ec2f9d9..b097bb4855ab724b2c435a9a9db450ff3ce840fe 100644 ---- a/src/main/java/net/minecraft/network/Connection.java -+++ b/src/main/java/net/minecraft/network/Connection.java -@@ -111,6 +111,28 @@ public class Connection extends SimpleChannelInboundHandler> { - @Nullable - BandwidthDebugMonitor bandwidthDebugMonitor; - public String hostname = ""; // CraftBukkit - add field -+ // Paper start - add pending task queue -+ private final Queue pendingTasks = new java.util.concurrent.ConcurrentLinkedQueue<>(); -+ public void execute(final Runnable run) { -+ if (this.channel == null || !this.channel.isRegistered()) { -+ run.run(); -+ return; -+ } -+ final boolean queue = !this.queue.isEmpty(); -+ if (!queue) { -+ this.channel.eventLoop().execute(run); -+ } else { -+ this.pendingTasks.add(run); -+ if (this.queue.isEmpty()) { -+ // something flushed async, dump tasks now -+ Runnable r; -+ while ((r = this.pendingTasks.poll()) != null) { -+ this.channel.eventLoop().execute(r); -+ } -+ } -+ } -+ } -+ // Paper end - add pending task queue - - public Connection(PacketFlow side) { - this.receiving = side; -@@ -368,6 +390,7 @@ public class Connection extends SimpleChannelInboundHandler> { - } - - private void flushQueue() { -+ try { // Paper - add pending task queue - if (this.channel != null && this.channel.isOpen()) { - Queue queue = this.pendingActions; - -@@ -380,6 +403,12 @@ public class Connection extends SimpleChannelInboundHandler> { - - } - } -+ } finally { // Paper start - add pending task queue -+ Runnable r; -+ while ((r = this.pendingTasks.poll()) != null) { -+ this.channel.eventLoop().execute(r); -+ } -+ } // Paper end - add pending task queue - } - - public void tick() { diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket.java index a5e438a834826161c52ca9db57d234d9ff80a591..b8bc1b9b8e8a33df90a963f9f9769292bf595642 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket.java @@ -22175,14 +22121,14 @@ index 98b3909b536f11eda9c481ffd74066ad0cdb0ebc..0ec0be22f7292d57c40da6f1f4575bde } } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index d9daf07132c46548964a75588b69d7a74680e917..e68205fe7169c7c5b7c6fdada2ee97d86107ca97 100644 +index d9daf07132c46548964a75588b69d7a74680e917..5103081e8469dd5a393595eae00c6f6c9d0a5028 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -44,6 +44,7 @@ public class RegionFile implements AutoCloseable { private final IntBuffer timestamps; @VisibleForTesting protected final RegionBitmap usedSectors; -+ public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper ++ public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(); // Paper public RegionFile(Path file, Path directory, boolean dsync) throws IOException { this(file, directory, RegionFileVersion.VERSION_DEFLATE, dsync); diff --git a/patches/server/0060-Add-exception-reporting-event.patch b/patches/server/0060-Add-exception-reporting-event.patch index 0e8fa03642..92b6b59dad 100644 --- a/patches/server/0060-Add-exception-reporting-event.patch +++ b/patches/server/0060-Add-exception-reporting-event.patch @@ -172,7 +172,7 @@ index 515aedcf9969b818dfdc02a16a7f7178b5bb5593..56900156d79781f15357a3d25906d32b // Paper end // Spigot start diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index e68205fe7169c7c5b7c6fdada2ee97d86107ca97..aa8972fd1a1fade05d60ab69efb8ff24f344508a 100644 +index 5103081e8469dd5a393595eae00c6f6c9d0a5028..ab9681ba3a86212e0e23a9af8788eec1dbee36ab 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -275,6 +275,7 @@ public class RegionFile implements AutoCloseable { diff --git a/patches/server/0064-Chunk-Save-Reattempt.patch b/patches/server/0064-Chunk-Save-Reattempt.patch index d82deaae7c..2717b86ad1 100644 --- a/patches/server/0064-Chunk-Save-Reattempt.patch +++ b/patches/server/0064-Chunk-Save-Reattempt.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Chunk Save Reattempt We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index aa8972fd1a1fade05d60ab69efb8ff24f344508a..ddcc212ba83d9365adb842b3d3ced64e3d7dd155 100644 +index ab9681ba3a86212e0e23a9af8788eec1dbee36ab..2a7f17726a161ddbcd0397fb4332de6980199c38 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -275,7 +275,7 @@ public class RegionFile implements AutoCloseable { diff --git a/patches/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index c9a6d58c5b..8b9eaafecf 100644 --- a/patches/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/patches/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index a12d23b03d64aacaf1f231039333aec94245a89a..c1eb9f999c1042da804a3560d12c14f5d67b7953 100644 +index a12d23b03d64aacaf1f231039333aec94245a89a..81bfce0374f281069f963c24040163cd968e3958 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -89,9 +89,36 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -89,9 +89,44 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL this.connection.disconnect(ichatmutablecomponent); } else { this.connection.setListener(new ServerLoginPacketListenerImpl(this.server, this.connection)); @@ -30,7 +30,15 @@ index a12d23b03d64aacaf1f231039333aec94245a89a..c1eb9f999c1042da804a3560d12c14f5 + return; + } + -+ if (event.getServerHostname() != null) packet.hostName = event.getServerHostname(); ++ if (event.getServerHostname() != null) { ++ // change hostname ++ packet = new ClientIntentionPacket( ++ packet.protocolVersion(), ++ event.getServerHostname(), ++ packet.port(), ++ packet.intention() ++ ); ++ } + if (event.getSocketAddressHostname() != null) this.connection.address = new java.net.InetSocketAddress(event.getSocketAddressHostname(), socketAddress instanceof java.net.InetSocketAddress ? ((java.net.InetSocketAddress) socketAddress).getPort() : 0); + this.connection.spoofedUUID = event.getUniqueId(); + this.connection.spoofedProfile = gson.fromJson(event.getPropertiesJson(), com.mojang.authlib.properties.Property[].class); diff --git a/patches/server/0159-Expose-client-protocol-version-and-virtual-host.patch b/patches/server/0159-Expose-client-protocol-version-and-virtual-host.patch index a35ad62785..7a3de7548d 100644 --- a/patches/server/0159-Expose-client-protocol-version-and-virtual-host.patch +++ b/patches/server/0159-Expose-client-protocol-version-and-virtual-host.patch @@ -60,25 +60,25 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15 + +} diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index b097bb4855ab724b2c435a9a9db450ff3ce840fe..2c807e8a579de5152f99c75ea272a6483a778f17 100644 +index 5b267514504497de3faa7ffa490a179200d9415c..faac9ba36d83f537fe62e177c15ae237059cc5cc 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -133,6 +133,10 @@ public class Connection extends SimpleChannelInboundHandler> { - } - } - // Paper end - add pending task queue +@@ -111,6 +111,10 @@ public class Connection extends SimpleChannelInboundHandler> { + @Nullable + BandwidthDebugMonitor bandwidthDebugMonitor; + public String hostname = ""; // CraftBukkit - add field + // Paper start - NetworkClient implementation + public int protocolVersion; + public java.net.InetSocketAddress virtualHost; + // Paper end - public Connection(PacketFlow side) { - this.receiving = side; + // Paper start - add utility methods + public final net.minecraft.server.level.ServerPlayer getPlayer() { diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index c1eb9f999c1042da804a3560d12c14f5d67b7953..331af220601127872aff709c8f692fdcae81cff9 100644 +index 81bfce0374f281069f963c24040163cd968e3958..e50f0ae7ba5e0271e4c0947ea73126c953aeac6b 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -157,6 +157,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -165,6 +165,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL throw new UnsupportedOperationException("Invalid intention " + packet.intention()); } diff --git a/patches/server/0179-Disable-Explicit-Network-Manager-Flushing.patch b/patches/server/0179-Disable-Explicit-Network-Manager-Flushing.patch index d269ed5ad4..a6f5d8c10c 100644 --- a/patches/server/0179-Disable-Explicit-Network-Manager-Flushing.patch +++ b/patches/server/0179-Disable-Explicit-Network-Manager-Flushing.patch @@ -12,18 +12,18 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 2c807e8a579de5152f99c75ea272a6483a778f17..837cc21af01e691eb9e877479a67ce94d5b2bc06 100644 +index faac9ba36d83f537fe62e177c15ae237059cc5cc..df5da9398c903d073485aaa0dce8e70947137cb9 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -136,6 +136,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -114,6 +114,7 @@ public class Connection extends SimpleChannelInboundHandler> { // Paper start - NetworkClient implementation public int protocolVersion; public java.net.InetSocketAddress virtualHost; + private static boolean enableExplicitFlush = Boolean.getBoolean("paper.explicit-flush"); // Paper end - public Connection(PacketFlow side) { -@@ -430,7 +431,7 @@ public class Connection extends SimpleChannelInboundHandler> { + // Paper start - add utility methods +@@ -413,7 +414,7 @@ public class Connection extends SimpleChannelInboundHandler> { } if (this.channel != null) { diff --git a/patches/server/0261-Configurable-connection-throttle-kick-message.patch b/patches/server/0261-Configurable-connection-throttle-kick-message.patch index ca0d5720a9..9e1918b7c2 100644 --- a/patches/server/0261-Configurable-connection-throttle-kick-message.patch +++ b/patches/server/0261-Configurable-connection-throttle-kick-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable connection throttle kick message diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 331af220601127872aff709c8f692fdcae81cff9..cbc789f0005f7ae3122950e424913ef35fc0bc5d 100644 +index e50f0ae7ba5e0271e4c0947ea73126c953aeac6b..e6275103156b720d774e197ea61659f1f1699025 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -51,7 +51,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL diff --git a/patches/server/0284-Handle-Large-Packets-disconnecting-client.patch b/patches/server/0284-Handle-Large-Packets-disconnecting-client.patch index f315c755c8..11027a5b3d 100644 --- a/patches/server/0284-Handle-Large-Packets-disconnecting-client.patch +++ b/patches/server/0284-Handle-Large-Packets-disconnecting-client.patch @@ -7,10 +7,10 @@ If a players inventory is too big to send in a single packet, split the inventory set into multiple packets instead. diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 837cc21af01e691eb9e877479a67ce94d5b2bc06..8af273d3aa3989e148ca93528754a13e1d1bf414 100644 +index df5da9398c903d073485aaa0dce8e70947137cb9..6fcbf8205e1852d5193a42bfe1154f62ab01e7ad 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -166,6 +166,22 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -156,6 +156,22 @@ public class Connection extends SimpleChannelInboundHandler> { } public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { diff --git a/patches/server/0288-Add-PlayerConnectionCloseEvent.patch b/patches/server/0288-Add-PlayerConnectionCloseEvent.patch index 2c7847d36b..b04dc2e895 100644 --- a/patches/server/0288-Add-PlayerConnectionCloseEvent.patch +++ b/patches/server/0288-Add-PlayerConnectionCloseEvent.patch @@ -39,10 +39,10 @@ public net.minecraft.server.network.ServerLoginPacketListenerImpl state public net.minecraft.server.network.ServerLoginPacketListenerImpl gameProfile diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 8af273d3aa3989e148ca93528754a13e1d1bf414..08361da4ebd301996b0aaafc58beb5ec6698ff44 100644 +index 6fcbf8205e1852d5193a42bfe1154f62ab01e7ad..9f8fbb8231b60c287c9442365c2f95cde92969b8 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -661,6 +661,26 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -644,6 +644,27 @@ public class Connection extends SimpleChannelInboundHandler> { packetlistener1.onDisconnect(ichatbasecomponent); } this.pendingActions.clear(); // Free up packet queue. @@ -57,10 +57,11 @@ index 8af273d3aa3989e148ca93528754a13e1d1bf414..08361da4ebd301996b0aaafc58beb5ec + /* Player is login stage */ + final net.minecraft.server.network.ServerLoginPacketListenerImpl loginListener = (net.minecraft.server.network.ServerLoginPacketListenerImpl) packetListener; + switch (loginListener.state) { -+ case READY_TO_ACCEPT: -+ case DELAY_ACCEPT: ++ case VERIFYING: ++ case WAITING_FOR_DUPE_DISCONNECT: ++ case PROTOCOL_SWITCHING: + case ACCEPTED: -+ final com.mojang.authlib.GameProfile profile = loginListener.gameProfile; /* Should be non-null at this stage */ ++ final com.mojang.authlib.GameProfile profile = loginListener.authenticatedProfile; /* Should be non-null at this stage */ + new com.destroystokyo.paper.event.player.PlayerConnectionCloseEvent(profile.getId(), profile.getName(), + ((java.net.InetSocketAddress)address).getAddress(), false).callEvent(); + } @@ -69,3 +70,16 @@ index 8af273d3aa3989e148ca93528754a13e1d1bf414..08361da4ebd301996b0aaafc58beb5ec } } +diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +index f870c20ecce27ebd893107a35e1b8f15e462ff85..c3e7a5f61e94d9905dc805bfc486819b61e143d1 100644 +--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +@@ -58,7 +58,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + @Nullable + String requestedUsername; + @Nullable +- private GameProfile authenticatedProfile; ++ public GameProfile authenticatedProfile; // Paper - public + private final String serverId; + private ServerPlayer player; // CraftBukkit + diff --git a/patches/server/0299-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 100% rename from patches/server/0299-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to patches/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch diff --git a/patches/server/0300-Entity-getEntitySpawnReason.patch b/patches/server/0299-Entity-getEntitySpawnReason.patch similarity index 100% rename from patches/server/0300-Entity-getEntitySpawnReason.patch rename to patches/server/0299-Entity-getEntitySpawnReason.patch diff --git a/patches/server/0301-Fire-event-on-GS4-query.patch b/patches/server/0300-Fire-event-on-GS4-query.patch similarity index 100% rename from patches/server/0301-Fire-event-on-GS4-query.patch rename to patches/server/0300-Fire-event-on-GS4-query.patch diff --git a/patches/server/0302-Implement-PlayerPostRespawnEvent.patch b/patches/server/0301-Implement-PlayerPostRespawnEvent.patch similarity index 100% rename from patches/server/0302-Implement-PlayerPostRespawnEvent.patch rename to patches/server/0301-Implement-PlayerPostRespawnEvent.patch diff --git a/patches/server/0303-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/patches/server/0302-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from patches/server/0303-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to patches/server/0302-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/patches/server/0304-Server-Tick-Events.patch b/patches/server/0303-Server-Tick-Events.patch similarity index 100% rename from patches/server/0304-Server-Tick-Events.patch rename to patches/server/0303-Server-Tick-Events.patch diff --git a/patches/server/0305-PlayerDeathEvent-getItemsToKeep.patch b/patches/server/0304-PlayerDeathEvent-getItemsToKeep.patch similarity index 100% rename from patches/server/0305-PlayerDeathEvent-getItemsToKeep.patch rename to patches/server/0304-PlayerDeathEvent-getItemsToKeep.patch diff --git a/patches/server/0306-Optimize-Captured-TileEntity-Lookup.patch b/patches/server/0305-Optimize-Captured-TileEntity-Lookup.patch similarity index 100% rename from patches/server/0306-Optimize-Captured-TileEntity-Lookup.patch rename to patches/server/0305-Optimize-Captured-TileEntity-Lookup.patch diff --git a/patches/server/0307-Add-Heightmap-API.patch b/patches/server/0306-Add-Heightmap-API.patch similarity index 100% rename from patches/server/0307-Add-Heightmap-API.patch rename to patches/server/0306-Add-Heightmap-API.patch diff --git a/patches/server/0308-Mob-Spawner-API-Enhancements.patch b/patches/server/0307-Mob-Spawner-API-Enhancements.patch similarity index 100% rename from patches/server/0308-Mob-Spawner-API-Enhancements.patch rename to patches/server/0307-Mob-Spawner-API-Enhancements.patch diff --git a/patches/server/0309-Fix-CB-call-to-changed-postToMainThread-method.patch b/patches/server/0308-Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 100% rename from patches/server/0309-Fix-CB-call-to-changed-postToMainThread-method.patch rename to patches/server/0308-Fix-CB-call-to-changed-postToMainThread-method.patch diff --git a/patches/server/0310-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/patches/server/0309-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 100% rename from patches/server/0310-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to patches/server/0309-Fix-sounds-when-item-frames-are-modified-MC-123450.patch diff --git a/patches/server/0311-Implement-CraftBlockSoundGroup.patch b/patches/server/0310-Implement-CraftBlockSoundGroup.patch similarity index 100% rename from patches/server/0311-Implement-CraftBlockSoundGroup.patch rename to patches/server/0310-Implement-CraftBlockSoundGroup.patch diff --git a/patches/server/0312-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0311-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 100% rename from patches/server/0312-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to patches/server/0311-Configurable-Keep-Spawn-Loaded-range-per-world.patch diff --git a/patches/server/0313-Allow-Saving-of-Oversized-Chunks.patch b/patches/server/0312-Allow-Saving-of-Oversized-Chunks.patch similarity index 98% rename from patches/server/0313-Allow-Saving-of-Oversized-Chunks.patch rename to patches/server/0312-Allow-Saving-of-Oversized-Chunks.patch index 1f7cc7c892..1233e2c468 100644 --- a/patches/server/0313-Allow-Saving-of-Oversized-Chunks.patch +++ b/patches/server/0312-Allow-Saving-of-Oversized-Chunks.patch @@ -33,7 +33,7 @@ this fix, as the data will remain in the oversized file. Once the server returns to a jar with this fix, the data will be restored. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index ddcc212ba83d9365adb842b3d3ced64e3d7dd155..b5283dae63fa669a6d53277156c4afb6c96fc489 100644 +index 2a7f17726a161ddbcd0397fb4332de6980199c38..72dacdc271325c814fb43cd6daaf3a209801ffda 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -18,8 +18,11 @@ import java.nio.file.LinkOption; @@ -51,7 +51,7 @@ index ddcc212ba83d9365adb842b3d3ced64e3d7dd155..b5283dae63fa669a6d53277156c4afb6 @@ -45,6 +48,7 @@ public class RegionFile implements AutoCloseable { @VisibleForTesting protected final RegionBitmap usedSectors; - public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper + public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(); // Paper + public final Path regionFile; // Paper public RegionFile(Path file, Path directory, boolean dsync) throws IOException { diff --git a/patches/server/0314-Expose-the-internal-current-tick.patch b/patches/server/0313-Expose-the-internal-current-tick.patch similarity index 100% rename from patches/server/0314-Expose-the-internal-current-tick.patch rename to patches/server/0313-Expose-the-internal-current-tick.patch diff --git a/patches/server/0315-Fix-World-isChunkGenerated-calls.patch b/patches/server/0314-Fix-World-isChunkGenerated-calls.patch similarity index 98% rename from patches/server/0315-Fix-World-isChunkGenerated-calls.patch rename to patches/server/0314-Fix-World-isChunkGenerated-calls.patch index 27c6d0a372..00102047ad 100644 --- a/patches/server/0315-Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/0314-Fix-World-isChunkGenerated-calls.patch @@ -93,11 +93,11 @@ index 165daf5e4b44425974703e9f603955fa09984f1b..a8533bbac77c6024cd6163149affe4f4 // Spigot start return this.anyPlayerCloseEnoughForSpawning(pos, false); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index b5283dae63fa669a6d53277156c4afb6c96fc489..8ef37d5f9a60f1bc62d5ef54a419ec1404659dde 100644 +index 72dacdc271325c814fb43cd6daaf3a209801ffda..647ce340c81606ab86d33e1f9dec1fb0afc262d8 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -50,6 +50,30 @@ public class RegionFile implements AutoCloseable { - public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper + public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(); // Paper public final Path regionFile; // Paper + // Paper start - Cache chunk status diff --git a/patches/server/0316-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0315-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from patches/server/0316-Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/0315-Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/patches/server/0317-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0316-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 100% rename from patches/server/0317-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/0316-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch diff --git a/patches/server/0318-Configurable-projectile-relative-velocity.patch b/patches/server/0317-Configurable-projectile-relative-velocity.patch similarity index 100% rename from patches/server/0318-Configurable-projectile-relative-velocity.patch rename to patches/server/0317-Configurable-projectile-relative-velocity.patch diff --git a/patches/server/0319-offset-item-frame-ticking.patch b/patches/server/0318-offset-item-frame-ticking.patch similarity index 100% rename from patches/server/0319-offset-item-frame-ticking.patch rename to patches/server/0318-offset-item-frame-ticking.patch diff --git a/patches/server/0320-Fix-MC-158900.patch b/patches/server/0319-Fix-MC-158900.patch similarity index 100% rename from patches/server/0320-Fix-MC-158900.patch rename to patches/server/0319-Fix-MC-158900.patch diff --git a/patches/server/0321-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0320-Prevent-consuming-the-wrong-itemstack.patch similarity index 100% rename from patches/server/0321-Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/0320-Prevent-consuming-the-wrong-itemstack.patch diff --git a/patches/server/0322-Dont-send-unnecessary-sign-update.patch b/patches/server/0321-Dont-send-unnecessary-sign-update.patch similarity index 100% rename from patches/server/0322-Dont-send-unnecessary-sign-update.patch rename to patches/server/0321-Dont-send-unnecessary-sign-update.patch diff --git a/patches/server/0323-Add-option-to-disable-pillager-patrols.patch b/patches/server/0322-Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from patches/server/0323-Add-option-to-disable-pillager-patrols.patch rename to patches/server/0322-Add-option-to-disable-pillager-patrols.patch diff --git a/patches/server/0324-Flat-bedrock-generator-settings.patch b/patches/server/0323-Flat-bedrock-generator-settings.patch similarity index 100% rename from patches/server/0324-Flat-bedrock-generator-settings.patch rename to patches/server/0323-Flat-bedrock-generator-settings.patch diff --git a/patches/server/0325-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/0324-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from patches/server/0325-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/0324-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/patches/server/0326-MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/0325-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/server/0326-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/0325-MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/server/0327-Duplicate-UUID-Resolve-Option.patch b/patches/server/0326-Duplicate-UUID-Resolve-Option.patch similarity index 100% rename from patches/server/0327-Duplicate-UUID-Resolve-Option.patch rename to patches/server/0326-Duplicate-UUID-Resolve-Option.patch diff --git a/patches/server/0328-PlayerDeathEvent-shouldDropExperience.patch b/patches/server/0327-PlayerDeathEvent-shouldDropExperience.patch similarity index 100% rename from patches/server/0328-PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/0327-PlayerDeathEvent-shouldDropExperience.patch diff --git a/patches/server/0329-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0328-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from patches/server/0329-Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/0328-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/patches/server/0330-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/0329-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/server/0330-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/0329-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/server/0331-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0330-Optimise-EntityGetter-getPlayerByUUID.patch similarity index 100% rename from patches/server/0331-Optimise-EntityGetter-getPlayerByUUID.patch rename to patches/server/0330-Optimise-EntityGetter-getPlayerByUUID.patch diff --git a/patches/server/0332-Fix-items-not-falling-correctly.patch b/patches/server/0331-Fix-items-not-falling-correctly.patch similarity index 100% rename from patches/server/0332-Fix-items-not-falling-correctly.patch rename to patches/server/0331-Fix-items-not-falling-correctly.patch diff --git a/patches/server/0333-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0332-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from patches/server/0333-Optimize-call-to-getFluid-for-explosions.patch rename to patches/server/0332-Optimize-call-to-getFluid-for-explosions.patch diff --git a/patches/server/0334-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/patches/server/0333-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from patches/server/0334-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to patches/server/0333-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/patches/server/0335-Entity-Activation-Range-2.0.patch b/patches/server/0334-Entity-Activation-Range-2.0.patch similarity index 100% rename from patches/server/0335-Entity-Activation-Range-2.0.patch rename to patches/server/0334-Entity-Activation-Range-2.0.patch diff --git a/patches/unapplied/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/0335-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 97% rename from patches/unapplied/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch rename to patches/server/0335-Guard-against-serializing-mismatching-chunk-coordina.patch index 7d824a8ef2..ee12496e7a 100644 --- a/patches/unapplied/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch +++ b/patches/server/0335-Guard-against-serializing-mismatching-chunk-coordina.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate Should help if something dumb happens diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index a7ee469bb2880a78540b79ae691ea449dfe22ce4..0d8cfc0808a8f204d57cec40929b489099eca815 100644 +index 97cdd8cd7749185230471f34f7d1ce3abcd0fd11..982fb3ef071d6a66f16744717e8e146bef6d9e8c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -94,6 +94,18 @@ public class ChunkSerializer { diff --git a/patches/server/0389-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0389-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index ff18006911..09789a89a1 100644 --- a/patches/server/0389-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0389-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -494,7 +494,7 @@ index 52eb3176437113f9a0ff85d10ce5c2415e1b5570..b54ddd0ba0b001fbcb1838a838ca4890 } } diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 08361da4ebd301996b0aaafc58beb5ec6698ff44..69722e101f537a71576fd82957cf305c5feef5fa 100644 +index 9f8fbb8231b60c287c9442365c2f95cde92969b8..4f33d7369c95f4d2afdef1cc333a7713f08d253d 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -75,13 +75,13 @@ public class Connection extends SimpleChannelInboundHandler> { @@ -514,7 +514,7 @@ index 08361da4ebd301996b0aaafc58beb5ec6698ff44..69722e101f537a71576fd82957cf305c }); private final PacketFlow receiving; private final Queue> pendingActions = Queues.newConcurrentLinkedQueue(); -@@ -217,7 +217,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -207,7 +207,7 @@ public class Connection extends SimpleChannelInboundHandler> { } } diff --git a/patches/unapplied/server/0438-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0439-Optimize-NetworkManager-Exception-Handling.patch similarity index 60% rename from patches/unapplied/server/0438-Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/0439-Optimize-NetworkManager-Exception-Handling.patch index b207ee6a24..ff42b6bac8 100644 --- a/patches/unapplied/server/0438-Optimize-NetworkManager-Exception-Handling.patch +++ b/patches/server/0439-Optimize-NetworkManager-Exception-Handling.patch @@ -5,40 +5,31 @@ Subject: [PATCH] Optimize NetworkManager Exception Handling diff --git a/src/main/java/net/minecraft/network/ConnectionProtocol.java b/src/main/java/net/minecraft/network/ConnectionProtocol.java -index a30fa3d54b70ab63d24dd67a69f39742335aff1e..a79da4bc0ed06ff8ede0a34f00194f927251099b 100644 +index 749d2a94d07727feb6e09e8461fc457b48c5b5f7..c9a6b5be8f0e382c373bd4ecbff1269d5cf6c850 100644 --- a/src/main/java/net/minecraft/network/ConnectionProtocol.java +++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java -@@ -329,6 +329,7 @@ public enum ConnectionProtocol implements BundlerInfo.Provider { +@@ -336,6 +336,7 @@ public enum ConnectionProtocol { @Nullable public Packet createPacket(int id, FriendlyByteBuf buf) { + if (id < 0 || id >= this.idToDeserializer.size()) return null; // Paper - Function> function = this.idToDeserializer.get(id); + Function> function = this.idToDeserializer.get(id); return function != null ? function.apply(buf) : null; } diff --git a/src/main/java/net/minecraft/network/Varint21FrameDecoder.java b/src/main/java/net/minecraft/network/Varint21FrameDecoder.java -index 99b581052f937b0f2d6b5d73de699008c1d51774..81ec2011a93bb94200ad750f4666ba1cd8be11c5 100644 +index 00c170a16a57f41f881c6b282cba474ce485b34c..1f71357a4caef4b2cbff95b560d0f3df268b3621 100644 --- a/src/main/java/net/minecraft/network/Varint21FrameDecoder.java +++ b/src/main/java/net/minecraft/network/Varint21FrameDecoder.java -@@ -8,9 +8,20 @@ import io.netty.handler.codec.CorruptedFrameException; - import java.util.List; +@@ -39,6 +39,12 @@ public class Varint21FrameDecoder extends ByteToMessageDecoder { + } - public class Varint21FrameDecoder extends ByteToMessageDecoder { -+ private final byte[] lenBuf = new byte[3]; // Paper -+ @Override protected void decode(ChannelHandlerContext channelHandlerContext, ByteBuf byteBuf, List list) { + // Paper start - if channel is not active just discard the packet + if (!channelHandlerContext.channel().isActive()) { + byteBuf.skipBytes(byteBuf.readableBytes()); + return; + } -+ // Paper end ++ // Paper end - if channel is not active just discard the packet byteBuf.markReaderIndex(); -- byte[] bs = new byte[3]; -+ // Paper start - reuse temporary length buffer -+ byte[] bs = lenBuf; -+ java.util.Arrays.fill(bs, (byte) 0); -+ // Paper end - - for(int i = 0; i < bs.length; ++i) { - if (!byteBuf.isReadable()) { + this.helperBuf.clear(); + if (!copyVarint(byteBuf, this.helperBuf)) { diff --git a/patches/server/0439-Fix-some-rails-connecting-improperly.patch b/patches/server/0440-Fix-some-rails-connecting-improperly.patch similarity index 100% rename from patches/server/0439-Fix-some-rails-connecting-improperly.patch rename to patches/server/0440-Fix-some-rails-connecting-improperly.patch diff --git a/patches/server/0440-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/patches/server/0441-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from patches/server/0440-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to patches/server/0441-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/patches/server/0441-Brand-support.patch b/patches/server/0442-Brand-support.patch similarity index 100% rename from patches/server/0441-Brand-support.patch rename to patches/server/0442-Brand-support.patch diff --git a/patches/server/0442-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0443-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from patches/server/0442-Add-playPickupItemAnimation-to-LivingEntity.patch rename to patches/server/0443-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/patches/server/0443-Don-t-require-FACING-data.patch b/patches/server/0444-Don-t-require-FACING-data.patch similarity index 100% rename from patches/server/0443-Don-t-require-FACING-data.patch rename to patches/server/0444-Don-t-require-FACING-data.patch diff --git a/patches/server/0444-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0445-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 100% rename from patches/server/0444-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to patches/server/0445-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch diff --git a/patches/server/0445-Add-moon-phase-API.patch b/patches/server/0446-Add-moon-phase-API.patch similarity index 100% rename from patches/server/0445-Add-moon-phase-API.patch rename to patches/server/0446-Add-moon-phase-API.patch diff --git a/patches/unapplied/server/0447-Do-not-let-the-server-load-chunks-from-newer-version.patch b/patches/server/0447-Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 95% rename from patches/unapplied/server/0447-Do-not-let-the-server-load-chunks-from-newer-version.patch rename to patches/server/0447-Do-not-let-the-server-load-chunks-from-newer-version.patch index 4057fb500c..2d4f5a549c 100644 --- a/patches/unapplied/server/0447-Do-not-let-the-server-load-chunks-from-newer-version.patch +++ b/patches/server/0447-Do-not-let-the-server-load-chunks-from-newer-version.patch @@ -9,7 +9,7 @@ the game, immediately stop the server to prevent data corruption. You can override this functionality at your own peril. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index dec862552b08e6b9f9ad1f88db1e07dcc43d7fa3..fce679e2b72d2ce1c8e75710041937c2c0566044 100644 +index 982fb3ef071d6a66f16744717e8e146bef6d9e8c..9a4fa3e034108528197cca3d040d210fa819af8b 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -124,8 +124,20 @@ public class ChunkSerializer { diff --git a/patches/server/0446-Prevent-headless-pistons-from-being-created.patch b/patches/server/0448-Prevent-headless-pistons-from-being-created.patch similarity index 100% rename from patches/server/0446-Prevent-headless-pistons-from-being-created.patch rename to patches/server/0448-Prevent-headless-pistons-from-being-created.patch diff --git a/patches/server/0447-Add-BellRingEvent.patch b/patches/server/0449-Add-BellRingEvent.patch similarity index 100% rename from patches/server/0447-Add-BellRingEvent.patch rename to patches/server/0449-Add-BellRingEvent.patch diff --git a/patches/server/0448-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0450-Add-zombie-targets-turtle-egg-config.patch similarity index 100% rename from patches/server/0448-Add-zombie-targets-turtle-egg-config.patch rename to patches/server/0450-Add-zombie-targets-turtle-egg-config.patch diff --git a/patches/server/0449-Buffer-joins-to-world.patch b/patches/server/0451-Buffer-joins-to-world.patch similarity index 87% rename from patches/server/0449-Buffer-joins-to-world.patch rename to patches/server/0451-Buffer-joins-to-world.patch index 6b426e93c0..7f558aaa66 100644 --- a/patches/server/0449-Buffer-joins-to-world.patch +++ b/patches/server/0451-Buffer-joins-to-world.patch @@ -8,11 +8,11 @@ the world per tick, this attempts to reduce the impact that join floods has on the server diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 69722e101f537a71576fd82957cf305c5feef5fa..4977a4880e95c7ba235ec805c5b6dc20d87a0670 100644 +index 4f33d7369c95f4d2afdef1cc333a7713f08d253d..039c99078150d9732cfad7edc5baba11e1e3d010 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -432,14 +432,29 @@ public class Connection extends SimpleChannelInboundHandler> { - } // Paper end - add pending task queue +@@ -415,14 +415,29 @@ public class Connection extends SimpleChannelInboundHandler> { + } } + private static final int MAX_PER_TICK = io.papermc.paper.configuration.GlobalConfiguration.get().misc.maxJoinsPerTick; // Paper @@ -33,7 +33,7 @@ index 69722e101f537a71576fd82957cf305c5feef5fa..4977a4880e95c7ba235ec805c5b6dc20 + // Paper start - limit the number of joins which can be processed each tick + if (!(this.packetListener instanceof net.minecraft.server.network.ServerLoginPacketListenerImpl loginPacketListener) -+ || loginPacketListener.state != net.minecraft.server.network.ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT ++ || loginPacketListener.state != net.minecraft.server.network.ServerLoginPacketListenerImpl.State.VERIFYING + || Connection.joinAttemptsThisTick++ < MAX_PER_TICK) { tickablepacketlistener.tick(); + } diff --git a/patches/server/0450-Eigencraft-redstone-implementation.patch b/patches/server/0452-Eigencraft-redstone-implementation.patch similarity index 100% rename from patches/server/0450-Eigencraft-redstone-implementation.patch rename to patches/server/0452-Eigencraft-redstone-implementation.patch diff --git a/patches/server/0451-Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/0453-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 94% rename from patches/server/0451-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/0453-Fix-hex-colors-not-working-in-some-kick-messages.patch index ca0485af01..7ca2866cc1 100644 --- a/patches/server/0451-Fix-hex-colors-not-working-in-some-kick-messages.patch +++ b/patches/server/0453-Fix-hex-colors-not-working-in-some-kick-messages.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix hex colors not working in some kick messages diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index cbc789f0005f7ae3122950e424913ef35fc0bc5d..d00b24fb71e5b47d0a9987bc5b5197b3acf70386 100644 +index e6275103156b720d774e197ea61659f1f1699025..65ee0a7183abb0a4b1f36d2ef9631c00b52eb99e 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -77,12 +77,12 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL @@ -25,7 +25,7 @@ index cbc789f0005f7ae3122950e424913ef35fc0bc5d..d00b24fb71e5b47d0a9987bc5b5197b3 this.connection.send(new ClientboundLoginDisconnectPacket(ichatmutablecomponent)); diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index f870c20ecce27ebd893107a35e1b8f15e462ff85..25afcd025d32c76232910bcc7d6607eef3c4167d 100644 +index c3e7a5f61e94d9905dc805bfc486819b61e143d1..7ae0ecc93a92edeb172d9ed0709c8f7f068cdf4e 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -97,7 +97,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/server/0452-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0454-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 100% rename from patches/server/0452-PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/0454-PortalCreateEvent-needs-to-know-its-entity.patch diff --git a/patches/server/0453-Add-more-Evoker-API.patch b/patches/server/0455-Add-more-Evoker-API.patch similarity index 100% rename from patches/server/0453-Add-more-Evoker-API.patch rename to patches/server/0455-Add-more-Evoker-API.patch diff --git a/patches/server/0454-Add-methods-to-get-translation-keys.patch b/patches/server/0456-Add-methods-to-get-translation-keys.patch similarity index 100% rename from patches/server/0454-Add-methods-to-get-translation-keys.patch rename to patches/server/0456-Add-methods-to-get-translation-keys.patch diff --git a/patches/server/0455-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0457-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from patches/server/0455-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0457-Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/patches/server/0456-Cache-block-data-strings.patch b/patches/server/0458-Cache-block-data-strings.patch similarity index 100% rename from patches/server/0456-Cache-block-data-strings.patch rename to patches/server/0458-Cache-block-data-strings.patch diff --git a/patches/server/0457-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0459-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 100% rename from patches/server/0457-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to patches/server/0459-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch diff --git a/patches/server/0458-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0460-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/server/0458-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0460-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/server/0459-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0461-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/server/0459-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0461-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/server/0460-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0462-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 100% rename from patches/server/0460-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0462-Extend-block-drop-capture-to-capture-all-items-added.patch diff --git a/patches/server/0461-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0463-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 100% rename from patches/server/0461-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0463-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch diff --git a/patches/server/0462-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0464-Lazily-track-plugin-scoreboards-by-default.patch similarity index 100% rename from patches/server/0462-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0464-Lazily-track-plugin-scoreboards-by-default.patch diff --git a/patches/server/0463-Entity-isTicking.patch b/patches/server/0465-Entity-isTicking.patch similarity index 100% rename from patches/server/0463-Entity-isTicking.patch rename to patches/server/0465-Entity-isTicking.patch diff --git a/patches/server/0464-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0466-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 100% rename from patches/server/0464-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0466-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch diff --git a/patches/server/0465-Fix-Concurrency-issue-in-ShufflingList.patch b/patches/server/0467-Fix-Concurrency-issue-in-ShufflingList.patch similarity index 100% rename from patches/server/0465-Fix-Concurrency-issue-in-ShufflingList.patch rename to patches/server/0467-Fix-Concurrency-issue-in-ShufflingList.patch diff --git a/patches/server/0466-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/0468-Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 100% rename from patches/server/0466-Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to patches/server/0468-Reset-Ender-Crystals-on-Dragon-Spawn.patch diff --git a/patches/server/0467-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0469-Fix-for-large-move-vectors-crashing-server.patch similarity index 100% rename from patches/server/0467-Fix-for-large-move-vectors-crashing-server.patch rename to patches/server/0469-Fix-for-large-move-vectors-crashing-server.patch diff --git a/patches/server/0468-Optimise-getType-calls.patch b/patches/server/0470-Optimise-getType-calls.patch similarity index 100% rename from patches/server/0468-Optimise-getType-calls.patch rename to patches/server/0470-Optimise-getType-calls.patch diff --git a/patches/server/0469-Villager-resetOffers.patch b/patches/server/0471-Villager-resetOffers.patch similarity index 100% rename from patches/server/0469-Villager-resetOffers.patch rename to patches/server/0471-Villager-resetOffers.patch diff --git a/patches/server/0470-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0472-Retain-block-place-order-when-capturing-blockstates.patch similarity index 100% rename from patches/server/0470-Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/0472-Retain-block-place-order-when-capturing-blockstates.patch diff --git a/patches/server/0471-Reduce-blockpos-allocation-from-pathfinding.patch b/patches/server/0473-Reduce-blockpos-allocation-from-pathfinding.patch similarity index 100% rename from patches/server/0471-Reduce-blockpos-allocation-from-pathfinding.patch rename to patches/server/0473-Reduce-blockpos-allocation-from-pathfinding.patch diff --git a/patches/server/0472-Fix-item-locations-dropped-from-campfires.patch b/patches/server/0474-Fix-item-locations-dropped-from-campfires.patch similarity index 100% rename from patches/server/0472-Fix-item-locations-dropped-from-campfires.patch rename to patches/server/0474-Fix-item-locations-dropped-from-campfires.patch diff --git a/patches/server/0473-Player-elytra-boost-API.patch b/patches/server/0475-Player-elytra-boost-API.patch similarity index 100% rename from patches/server/0473-Player-elytra-boost-API.patch rename to patches/server/0475-Player-elytra-boost-API.patch diff --git a/patches/server/0474-Fixed-TileEntityBell-memory-leak.patch b/patches/server/0476-Fixed-TileEntityBell-memory-leak.patch similarity index 100% rename from patches/server/0474-Fixed-TileEntityBell-memory-leak.patch rename to patches/server/0476-Fixed-TileEntityBell-memory-leak.patch diff --git a/patches/server/0475-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0477-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 100% rename from patches/server/0475-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/0477-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch diff --git a/patches/server/0476-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0478-Add-getOfflinePlayerIfCached-String.patch similarity index 100% rename from patches/server/0476-Add-getOfflinePlayerIfCached-String.patch rename to patches/server/0478-Add-getOfflinePlayerIfCached-String.patch diff --git a/patches/server/0477-Add-ignore-discounts-API.patch b/patches/server/0479-Add-ignore-discounts-API.patch similarity index 100% rename from patches/server/0477-Add-ignore-discounts-API.patch rename to patches/server/0479-Add-ignore-discounts-API.patch diff --git a/patches/server/0478-Toggle-for-removing-existing-dragon.patch b/patches/server/0480-Toggle-for-removing-existing-dragon.patch similarity index 100% rename from patches/server/0478-Toggle-for-removing-existing-dragon.patch rename to patches/server/0480-Toggle-for-removing-existing-dragon.patch diff --git a/patches/server/0479-Fix-client-lag-on-advancement-loading.patch b/patches/server/0481-Fix-client-lag-on-advancement-loading.patch similarity index 100% rename from patches/server/0479-Fix-client-lag-on-advancement-loading.patch rename to patches/server/0481-Fix-client-lag-on-advancement-loading.patch diff --git a/patches/server/0480-Item-no-age-no-player-pickup.patch b/patches/server/0482-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/server/0480-Item-no-age-no-player-pickup.patch rename to patches/server/0482-Item-no-age-no-player-pickup.patch diff --git a/patches/server/0481-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/0483-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/server/0481-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/0483-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/server/0482-Beacon-API-custom-effect-ranges.patch b/patches/server/0484-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from patches/server/0482-Beacon-API-custom-effect-ranges.patch rename to patches/server/0484-Beacon-API-custom-effect-ranges.patch diff --git a/patches/server/0483-Add-API-for-quit-reason.patch b/patches/server/0485-Add-API-for-quit-reason.patch similarity index 97% rename from patches/server/0483-Add-API-for-quit-reason.patch rename to patches/server/0485-Add-API-for-quit-reason.patch index b592209d7d..cd67f9694c 100644 --- a/patches/server/0483-Add-API-for-quit-reason.patch +++ b/patches/server/0485-Add-API-for-quit-reason.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add API for quit reason diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 4977a4880e95c7ba235ec805c5b6dc20d87a0670..79c55e1f9819345c46aa33f0ebf2555ee4506cce 100644 +index 039c99078150d9732cfad7edc5baba11e1e3d010..2859f5bf5a00ff6841933dd83135d89a1786e76e 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -189,12 +189,15 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -179,12 +179,15 @@ public class Connection extends SimpleChannelInboundHandler> { this.handlingFault = true; if (this.channel.isOpen()) { diff --git a/patches/server/0484-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0486-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 100% rename from patches/server/0484-Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/0486-Add-Wandering-Trader-spawn-rate-config-options.patch diff --git a/patches/server/0485-Expose-world-spawn-angle.patch b/patches/server/0487-Expose-world-spawn-angle.patch similarity index 100% rename from patches/server/0485-Expose-world-spawn-angle.patch rename to patches/server/0487-Expose-world-spawn-angle.patch diff --git a/patches/server/0486-Add-Destroy-Speed-API.patch b/patches/server/0488-Add-Destroy-Speed-API.patch similarity index 100% rename from patches/server/0486-Add-Destroy-Speed-API.patch rename to patches/server/0488-Add-Destroy-Speed-API.patch diff --git a/patches/server/0487-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0489-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 100% rename from patches/server/0487-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/0489-Fix-Player-spawnParticle-x-y-z-precision-loss.patch diff --git a/patches/server/0488-Add-LivingEntity-clearActiveItem.patch b/patches/server/0490-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from patches/server/0488-Add-LivingEntity-clearActiveItem.patch rename to patches/server/0490-Add-LivingEntity-clearActiveItem.patch diff --git a/patches/server/0489-Add-PlayerItemCooldownEvent.patch b/patches/server/0491-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/server/0489-Add-PlayerItemCooldownEvent.patch rename to patches/server/0491-Add-PlayerItemCooldownEvent.patch diff --git a/patches/server/0490-Significantly-improve-performance-of-the-end-generat.patch b/patches/server/0492-Significantly-improve-performance-of-the-end-generat.patch similarity index 100% rename from patches/server/0490-Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/0492-Significantly-improve-performance-of-the-end-generat.patch diff --git a/patches/server/0491-More-lightning-API.patch b/patches/server/0493-More-lightning-API.patch similarity index 100% rename from patches/server/0491-More-lightning-API.patch rename to patches/server/0493-More-lightning-API.patch diff --git a/patches/server/0492-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0494-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 100% rename from patches/server/0492-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0494-Climbing-should-not-bypass-cramming-gamerule.patch diff --git a/patches/server/0493-Added-missing-default-perms-for-commands.patch b/patches/server/0495-Added-missing-default-perms-for-commands.patch similarity index 100% rename from patches/server/0493-Added-missing-default-perms-for-commands.patch rename to patches/server/0495-Added-missing-default-perms-for-commands.patch diff --git a/patches/server/0494-Add-PlayerShearBlockEvent.patch b/patches/server/0496-Add-PlayerShearBlockEvent.patch similarity index 100% rename from patches/server/0494-Add-PlayerShearBlockEvent.patch rename to patches/server/0496-Add-PlayerShearBlockEvent.patch diff --git a/patches/server/0495-Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/0497-Fix-curing-zombie-villager-discount-exploit.patch similarity index 100% rename from patches/server/0495-Fix-curing-zombie-villager-discount-exploit.patch rename to patches/server/0497-Fix-curing-zombie-villager-discount-exploit.patch diff --git a/patches/server/0496-Limit-recipe-packets.patch b/patches/server/0498-Limit-recipe-packets.patch similarity index 100% rename from patches/server/0496-Limit-recipe-packets.patch rename to patches/server/0498-Limit-recipe-packets.patch diff --git a/patches/server/0497-Fix-CraftSound-backwards-compatibility.patch b/patches/server/0499-Fix-CraftSound-backwards-compatibility.patch similarity index 100% rename from patches/server/0497-Fix-CraftSound-backwards-compatibility.patch rename to patches/server/0499-Fix-CraftSound-backwards-compatibility.patch diff --git a/patches/server/0498-Player-Chunk-Load-Unload-Events.patch b/patches/server/0500-Player-Chunk-Load-Unload-Events.patch similarity index 100% rename from patches/server/0498-Player-Chunk-Load-Unload-Events.patch rename to patches/server/0500-Player-Chunk-Load-Unload-Events.patch diff --git a/patches/server/0499-Optimize-Dynamic-get-Missing-Keys.patch b/patches/server/0501-Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from patches/server/0499-Optimize-Dynamic-get-Missing-Keys.patch rename to patches/server/0501-Optimize-Dynamic-get-Missing-Keys.patch diff --git a/patches/server/0500-Expose-LivingEntity-hurt-direction.patch b/patches/server/0502-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from patches/server/0500-Expose-LivingEntity-hurt-direction.patch rename to patches/server/0502-Expose-LivingEntity-hurt-direction.patch diff --git a/patches/server/0501-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0503-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 100% rename from patches/server/0501-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to patches/server/0503-Add-OBSTRUCTED-reason-to-BedEnterResult.patch diff --git a/patches/server/0502-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch b/patches/server/0504-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch similarity index 100% rename from patches/server/0502-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch rename to patches/server/0504-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch diff --git a/patches/server/0503-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0505-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 100% rename from patches/server/0503-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/0505-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch diff --git a/patches/server/0504-Implement-TargetHitEvent.patch b/patches/server/0506-Implement-TargetHitEvent.patch similarity index 100% rename from patches/server/0504-Implement-TargetHitEvent.patch rename to patches/server/0506-Implement-TargetHitEvent.patch diff --git a/patches/server/0505-MC-4-Fix-item-position-desync.patch b/patches/server/0507-MC-4-Fix-item-position-desync.patch similarity index 100% rename from patches/server/0505-MC-4-Fix-item-position-desync.patch rename to patches/server/0507-MC-4-Fix-item-position-desync.patch diff --git a/patches/server/0506-Additional-Block-Material-API-s.patch b/patches/server/0508-Additional-Block-Material-API-s.patch similarity index 100% rename from patches/server/0506-Additional-Block-Material-API-s.patch rename to patches/server/0508-Additional-Block-Material-API-s.patch diff --git a/patches/server/0507-Fix-harming-potion-dupe.patch b/patches/server/0509-Fix-harming-potion-dupe.patch similarity index 100% rename from patches/server/0507-Fix-harming-potion-dupe.patch rename to patches/server/0509-Fix-harming-potion-dupe.patch diff --git a/patches/server/0508-Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/patches/server/0510-Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 100% rename from patches/server/0508-Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to patches/server/0510-Implement-API-to-get-Material-from-Boats-and-Minecar.patch diff --git a/patches/server/0509-Cache-burn-durations.patch b/patches/server/0511-Cache-burn-durations.patch similarity index 100% rename from patches/server/0509-Cache-burn-durations.patch rename to patches/server/0511-Cache-burn-durations.patch diff --git a/patches/server/0510-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/0512-Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 100% rename from patches/server/0510-Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/0512-Allow-disabling-mob-spawner-spawn-egg-transformation.patch diff --git a/patches/server/0511-Fix-Not-a-string-Map-Conversion-spam.patch b/patches/server/0513-Fix-Not-a-string-Map-Conversion-spam.patch similarity index 100% rename from patches/server/0511-Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/server/0513-Fix-Not-a-string-Map-Conversion-spam.patch diff --git a/patches/server/0512-Implement-PlayerFlowerPotManipulateEvent.patch b/patches/server/0514-Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/server/0512-Implement-PlayerFlowerPotManipulateEvent.patch rename to patches/server/0514-Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/server/0513-Fix-interact-event-not-being-called-sometimes.patch b/patches/server/0515-Fix-interact-event-not-being-called-sometimes.patch similarity index 100% rename from patches/server/0513-Fix-interact-event-not-being-called-sometimes.patch rename to patches/server/0515-Fix-interact-event-not-being-called-sometimes.patch diff --git a/patches/server/0514-Zombie-API-breaking-doors.patch b/patches/server/0516-Zombie-API-breaking-doors.patch similarity index 100% rename from patches/server/0514-Zombie-API-breaking-doors.patch rename to patches/server/0516-Zombie-API-breaking-doors.patch diff --git a/patches/server/0515-Fix-nerfed-slime-when-splitting.patch b/patches/server/0517-Fix-nerfed-slime-when-splitting.patch similarity index 100% rename from patches/server/0515-Fix-nerfed-slime-when-splitting.patch rename to patches/server/0517-Fix-nerfed-slime-when-splitting.patch diff --git a/patches/server/0516-Add-EntityLoadCrossbowEvent.patch b/patches/server/0518-Add-EntityLoadCrossbowEvent.patch similarity index 100% rename from patches/server/0516-Add-EntityLoadCrossbowEvent.patch rename to patches/server/0518-Add-EntityLoadCrossbowEvent.patch diff --git a/patches/server/0517-Added-WorldGameRuleChangeEvent.patch b/patches/server/0519-Added-WorldGameRuleChangeEvent.patch similarity index 100% rename from patches/server/0517-Added-WorldGameRuleChangeEvent.patch rename to patches/server/0519-Added-WorldGameRuleChangeEvent.patch diff --git a/patches/server/0518-Added-ServerResourcesReloadedEvent.patch b/patches/server/0520-Added-ServerResourcesReloadedEvent.patch similarity index 100% rename from patches/server/0518-Added-ServerResourcesReloadedEvent.patch rename to patches/server/0520-Added-ServerResourcesReloadedEvent.patch diff --git a/patches/server/0519-Added-world-settings-for-mobs-picking-up-loot.patch b/patches/server/0521-Added-world-settings-for-mobs-picking-up-loot.patch similarity index 100% rename from patches/server/0519-Added-world-settings-for-mobs-picking-up-loot.patch rename to patches/server/0521-Added-world-settings-for-mobs-picking-up-loot.patch diff --git a/patches/server/0520-Implemented-BlockFailedDispenseEvent.patch b/patches/server/0522-Implemented-BlockFailedDispenseEvent.patch similarity index 100% rename from patches/server/0520-Implemented-BlockFailedDispenseEvent.patch rename to patches/server/0522-Implemented-BlockFailedDispenseEvent.patch diff --git a/patches/server/0521-Added-PlayerLecternPageChangeEvent.patch b/patches/server/0523-Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from patches/server/0521-Added-PlayerLecternPageChangeEvent.patch rename to patches/server/0523-Added-PlayerLecternPageChangeEvent.patch diff --git a/patches/server/0522-Added-PlayerLoomPatternSelectEvent.patch b/patches/server/0524-Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from patches/server/0522-Added-PlayerLoomPatternSelectEvent.patch rename to patches/server/0524-Added-PlayerLoomPatternSelectEvent.patch diff --git a/patches/server/0523-Configurable-door-breaking-difficulty.patch b/patches/server/0525-Configurable-door-breaking-difficulty.patch similarity index 100% rename from patches/server/0523-Configurable-door-breaking-difficulty.patch rename to patches/server/0525-Configurable-door-breaking-difficulty.patch diff --git a/patches/server/0524-Empty-commands-shall-not-be-dispatched.patch b/patches/server/0526-Empty-commands-shall-not-be-dispatched.patch similarity index 100% rename from patches/server/0524-Empty-commands-shall-not-be-dispatched.patch rename to patches/server/0526-Empty-commands-shall-not-be-dispatched.patch diff --git a/patches/server/0525-Remove-stale-POIs.patch b/patches/server/0527-Remove-stale-POIs.patch similarity index 100% rename from patches/server/0525-Remove-stale-POIs.patch rename to patches/server/0527-Remove-stale-POIs.patch diff --git a/patches/server/0526-Fix-villager-boat-exploit.patch b/patches/server/0528-Fix-villager-boat-exploit.patch similarity index 100% rename from patches/server/0526-Fix-villager-boat-exploit.patch rename to patches/server/0528-Fix-villager-boat-exploit.patch diff --git a/patches/server/0527-Add-sendOpLevel-API.patch b/patches/server/0529-Add-sendOpLevel-API.patch similarity index 100% rename from patches/server/0527-Add-sendOpLevel-API.patch rename to patches/server/0529-Add-sendOpLevel-API.patch diff --git a/patches/server/0528-TODO-Registry-Modification-API.patch b/patches/server/0530-TODO-Registry-Modification-API.patch similarity index 100% rename from patches/server/0528-TODO-Registry-Modification-API.patch rename to patches/server/0530-TODO-Registry-Modification-API.patch diff --git a/patches/server/0529-Add-StructuresLocateEvent.patch b/patches/server/0531-Add-StructuresLocateEvent.patch similarity index 100% rename from patches/server/0529-Add-StructuresLocateEvent.patch rename to patches/server/0531-Add-StructuresLocateEvent.patch diff --git a/patches/server/0530-Collision-option-for-requiring-a-player-participant.patch b/patches/server/0532-Collision-option-for-requiring-a-player-participant.patch similarity index 100% rename from patches/server/0530-Collision-option-for-requiring-a-player-participant.patch rename to patches/server/0532-Collision-option-for-requiring-a-player-participant.patch diff --git a/patches/server/0531-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch b/patches/server/0533-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch similarity index 100% rename from patches/server/0531-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch rename to patches/server/0533-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch diff --git a/patches/server/0532-Return-chat-component-with-empty-text-instead-of-thr.patch b/patches/server/0534-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 100% rename from patches/server/0532-Return-chat-component-with-empty-text-instead-of-thr.patch rename to patches/server/0534-Return-chat-component-with-empty-text-instead-of-thr.patch diff --git a/patches/server/0533-Make-schedule-command-per-world.patch b/patches/server/0535-Make-schedule-command-per-world.patch similarity index 100% rename from patches/server/0533-Make-schedule-command-per-world.patch rename to patches/server/0535-Make-schedule-command-per-world.patch diff --git a/patches/server/0534-Configurable-max-leash-distance.patch b/patches/server/0536-Configurable-max-leash-distance.patch similarity index 100% rename from patches/server/0534-Configurable-max-leash-distance.patch rename to patches/server/0536-Configurable-max-leash-distance.patch diff --git a/patches/server/0535-Implement-BlockPreDispenseEvent.patch b/patches/server/0537-Implement-BlockPreDispenseEvent.patch similarity index 100% rename from patches/server/0535-Implement-BlockPreDispenseEvent.patch rename to patches/server/0537-Implement-BlockPreDispenseEvent.patch diff --git a/patches/server/0536-Added-firing-of-PlayerChangeBeaconEffectEvent.patch b/patches/server/0538-Added-firing-of-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from patches/server/0536-Added-firing-of-PlayerChangeBeaconEffectEvent.patch rename to patches/server/0538-Added-firing-of-PlayerChangeBeaconEffectEvent.patch diff --git a/patches/server/0537-Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/0539-Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 100% rename from patches/server/0537-Add-toggle-for-always-placing-the-dragon-egg.patch rename to patches/server/0539-Add-toggle-for-always-placing-the-dragon-egg.patch diff --git a/patches/server/0538-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/0540-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from patches/server/0538-Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/server/0540-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/patches/server/0539-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/0541-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from patches/server/0539-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to patches/server/0541-Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/patches/server/0540-Reset-shield-blocking-on-dimension-change.patch b/patches/server/0542-Reset-shield-blocking-on-dimension-change.patch similarity index 100% rename from patches/server/0540-Reset-shield-blocking-on-dimension-change.patch rename to patches/server/0542-Reset-shield-blocking-on-dimension-change.patch diff --git a/patches/server/0541-add-DragonEggFormEvent.patch b/patches/server/0543-add-DragonEggFormEvent.patch similarity index 100% rename from patches/server/0541-add-DragonEggFormEvent.patch rename to patches/server/0543-add-DragonEggFormEvent.patch diff --git a/patches/server/0542-EntityMoveEvent.patch b/patches/server/0544-EntityMoveEvent.patch similarity index 100% rename from patches/server/0542-EntityMoveEvent.patch rename to patches/server/0544-EntityMoveEvent.patch diff --git a/patches/server/0543-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0545-added-option-to-disable-pathfinding-updates-on-block.patch similarity index 100% rename from patches/server/0543-added-option-to-disable-pathfinding-updates-on-block.patch rename to patches/server/0545-added-option-to-disable-pathfinding-updates-on-block.patch diff --git a/patches/server/0544-Inline-shift-direction-fields.patch b/patches/server/0546-Inline-shift-direction-fields.patch similarity index 100% rename from patches/server/0544-Inline-shift-direction-fields.patch rename to patches/server/0546-Inline-shift-direction-fields.patch diff --git a/patches/server/0545-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0547-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 100% rename from patches/server/0545-Allow-adding-items-to-BlockDropItemEvent.patch rename to patches/server/0547-Allow-adding-items-to-BlockDropItemEvent.patch diff --git a/patches/server/0546-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/0548-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from patches/server/0546-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to patches/server/0548-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/patches/server/0547-living-entity-allow-attribute-registration.patch b/patches/server/0549-living-entity-allow-attribute-registration.patch similarity index 100% rename from patches/server/0547-living-entity-allow-attribute-registration.patch rename to patches/server/0549-living-entity-allow-attribute-registration.patch diff --git a/patches/server/0548-fix-dead-slime-setSize-invincibility.patch b/patches/server/0550-fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from patches/server/0548-fix-dead-slime-setSize-invincibility.patch rename to patches/server/0550-fix-dead-slime-setSize-invincibility.patch diff --git a/patches/server/0549-Merchant-getRecipes-should-return-an-immutable-list.patch b/patches/server/0551-Merchant-getRecipes-should-return-an-immutable-list.patch similarity index 100% rename from patches/server/0549-Merchant-getRecipes-should-return-an-immutable-list.patch rename to patches/server/0551-Merchant-getRecipes-should-return-an-immutable-list.patch diff --git a/patches/server/0550-Expose-Tracked-Players.patch b/patches/server/0552-Expose-Tracked-Players.patch similarity index 100% rename from patches/server/0550-Expose-Tracked-Players.patch rename to patches/server/0552-Expose-Tracked-Players.patch diff --git a/patches/server/0551-Remove-streams-from-SensorNearest.patch b/patches/server/0553-Remove-streams-from-SensorNearest.patch similarity index 100% rename from patches/server/0551-Remove-streams-from-SensorNearest.patch rename to patches/server/0553-Remove-streams-from-SensorNearest.patch diff --git a/patches/server/0552-Improve-ServerGUI.patch b/patches/server/0554-Improve-ServerGUI.patch similarity index 100% rename from patches/server/0552-Improve-ServerGUI.patch rename to patches/server/0554-Improve-ServerGUI.patch diff --git a/patches/server/0553-fix-converting-txt-to-json-file.patch b/patches/server/0555-fix-converting-txt-to-json-file.patch similarity index 100% rename from patches/server/0553-fix-converting-txt-to-json-file.patch rename to patches/server/0555-fix-converting-txt-to-json-file.patch diff --git a/patches/server/0554-Add-worldborder-events.patch b/patches/server/0556-Add-worldborder-events.patch similarity index 100% rename from patches/server/0554-Add-worldborder-events.patch rename to patches/server/0556-Add-worldborder-events.patch diff --git a/patches/server/0555-added-PlayerNameEntityEvent.patch b/patches/server/0557-added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/server/0555-added-PlayerNameEntityEvent.patch rename to patches/server/0557-added-PlayerNameEntityEvent.patch diff --git a/patches/server/0556-Prevent-grindstones-from-overstacking-items.patch b/patches/server/0558-Prevent-grindstones-from-overstacking-items.patch similarity index 100% rename from patches/server/0556-Prevent-grindstones-from-overstacking-items.patch rename to patches/server/0558-Prevent-grindstones-from-overstacking-items.patch diff --git a/patches/server/0557-Add-recipe-to-cook-events.patch b/patches/server/0559-Add-recipe-to-cook-events.patch similarity index 100% rename from patches/server/0557-Add-recipe-to-cook-events.patch rename to patches/server/0559-Add-recipe-to-cook-events.patch diff --git a/patches/server/0558-Add-Block-isValidTool.patch b/patches/server/0560-Add-Block-isValidTool.patch similarity index 100% rename from patches/server/0558-Add-Block-isValidTool.patch rename to patches/server/0560-Add-Block-isValidTool.patch diff --git a/patches/server/0559-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0561-Allow-using-signs-inside-spawn-protection.patch similarity index 100% rename from patches/server/0559-Allow-using-signs-inside-spawn-protection.patch rename to patches/server/0561-Allow-using-signs-inside-spawn-protection.patch diff --git a/patches/server/0560-Expand-world-key-API.patch b/patches/server/0562-Expand-world-key-API.patch similarity index 100% rename from patches/server/0560-Expand-world-key-API.patch rename to patches/server/0562-Expand-world-key-API.patch diff --git a/patches/server/0561-Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/0563-Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/server/0561-Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/0563-Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/server/0562-Item-Rarity-API.patch b/patches/server/0564-Item-Rarity-API.patch similarity index 100% rename from patches/server/0562-Item-Rarity-API.patch rename to patches/server/0564-Item-Rarity-API.patch diff --git a/patches/server/0563-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0565-Drop-carried-item-when-player-has-disconnected.patch similarity index 100% rename from patches/server/0563-Drop-carried-item-when-player-has-disconnected.patch rename to patches/server/0565-Drop-carried-item-when-player-has-disconnected.patch diff --git a/patches/server/0564-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0566-forced-whitelist-use-configurable-kick-message.patch similarity index 100% rename from patches/server/0564-forced-whitelist-use-configurable-kick-message.patch rename to patches/server/0566-forced-whitelist-use-configurable-kick-message.patch diff --git a/patches/server/0565-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0567-Don-t-ignore-result-of-PlayerEditBookEvent.patch similarity index 100% rename from patches/server/0565-Don-t-ignore-result-of-PlayerEditBookEvent.patch rename to patches/server/0567-Don-t-ignore-result-of-PlayerEditBookEvent.patch diff --git a/patches/server/0566-Expose-protocol-version.patch b/patches/server/0568-Expose-protocol-version.patch similarity index 100% rename from patches/server/0566-Expose-protocol-version.patch rename to patches/server/0568-Expose-protocol-version.patch diff --git a/patches/server/0567-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0569-Enhance-console-tab-completions-for-brigadier-comman.patch similarity index 100% rename from patches/server/0567-Enhance-console-tab-completions-for-brigadier-comman.patch rename to patches/server/0569-Enhance-console-tab-completions-for-brigadier-comman.patch diff --git a/patches/server/0568-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0570-Fix-PlayerItemConsumeEvent-cancelling-properly.patch similarity index 100% rename from patches/server/0568-Fix-PlayerItemConsumeEvent-cancelling-properly.patch rename to patches/server/0570-Fix-PlayerItemConsumeEvent-cancelling-properly.patch diff --git a/patches/server/0569-Add-bypass-host-check.patch b/patches/server/0571-Add-bypass-host-check.patch similarity index 92% rename from patches/server/0569-Add-bypass-host-check.patch rename to patches/server/0571-Add-bypass-host-check.patch index db200b039d..b67a7be20b 100644 --- a/patches/server/0569-Add-bypass-host-check.patch +++ b/patches/server/0571-Add-bypass-host-check.patch @@ -8,7 +8,7 @@ Paper.bypassHostCheck Seriously, fix your firewalls. -.- diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index d00b24fb71e5b47d0a9987bc5b5197b3acf70386..9079cc7021e467c199cee200aa0e13e8bba003f3 100644 +index 65ee0a7183abb0a4b1f36d2ef9631c00b52eb99e..f72a63d654bf5b7edebfc5afdced0b204d70966d 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -30,6 +30,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL @@ -19,7 +19,7 @@ index d00b24fb71e5b47d0a9987bc5b5197b3acf70386..9079cc7021e467c199cee200aa0e13e8 public ServerHandshakePacketListenerImpl(MinecraftServer server, Connection connection) { this.server = server; -@@ -119,7 +120,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -127,7 +128,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL if (!handledByEvent && proxyLogicEnabled) { // Paper end // if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above! diff --git a/patches/server/0570-Set-area-affect-cloud-rotation.patch b/patches/server/0572-Set-area-affect-cloud-rotation.patch similarity index 100% rename from patches/server/0570-Set-area-affect-cloud-rotation.patch rename to patches/server/0572-Set-area-affect-cloud-rotation.patch diff --git a/patches/server/0571-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0573-add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/server/0571-add-isDeeplySleeping-to-HumanEntity.patch rename to patches/server/0573-add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/server/0572-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0574-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/server/0572-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/0574-add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/server/0573-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0575-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/server/0573-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/0575-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/server/0574-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0576-fix-PigZombieAngerEvent-cancellation.patch similarity index 100% rename from patches/server/0574-fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/0576-fix-PigZombieAngerEvent-cancellation.patch diff --git a/patches/server/0575-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0577-fix-PlayerItemHeldEvent-firing-twice.patch similarity index 100% rename from patches/server/0575-fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/0577-fix-PlayerItemHeldEvent-firing-twice.patch diff --git a/patches/server/0576-Added-PlayerDeepSleepEvent.patch b/patches/server/0578-Added-PlayerDeepSleepEvent.patch similarity index 100% rename from patches/server/0576-Added-PlayerDeepSleepEvent.patch rename to patches/server/0578-Added-PlayerDeepSleepEvent.patch diff --git a/patches/server/0577-More-World-API.patch b/patches/server/0579-More-World-API.patch similarity index 100% rename from patches/server/0577-More-World-API.patch rename to patches/server/0579-More-World-API.patch diff --git a/patches/server/0578-Added-PlayerBedFailEnterEvent.patch b/patches/server/0580-Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/server/0578-Added-PlayerBedFailEnterEvent.patch rename to patches/server/0580-Added-PlayerBedFailEnterEvent.patch diff --git a/patches/server/0579-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0581-Implement-methods-to-convert-between-Component-and-B.patch similarity index 100% rename from patches/server/0579-Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/0581-Implement-methods-to-convert-between-Component-and-B.patch diff --git a/patches/server/0580-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0582-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 100% rename from patches/server/0580-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/0582-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch diff --git a/patches/server/0581-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0583-Introduce-beacon-activation-deactivation-events.patch similarity index 100% rename from patches/server/0581-Introduce-beacon-activation-deactivation-events.patch rename to patches/server/0583-Introduce-beacon-activation-deactivation-events.patch diff --git a/patches/server/0582-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0584-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 100% rename from patches/server/0582-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/0584-add-RespawnFlags-to-PlayerRespawnEvent.patch diff --git a/patches/server/0583-Add-Channel-initialization-listeners.patch b/patches/server/0585-Add-Channel-initialization-listeners.patch similarity index 96% rename from patches/server/0583-Add-Channel-initialization-listeners.patch rename to patches/server/0585-Add-Channel-initialization-listeners.patch index 04d5634f92..80eb35fe3e 100644 --- a/patches/server/0583-Add-Channel-initialization-listeners.patch +++ b/patches/server/0585-Add-Channel-initialization-listeners.patch @@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..0d7e7db9e37ef0183c32b217bd944fb4 + COMPRESSION_DISABLED +} diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 79c55e1f9819345c46aa33f0ebf2555ee4506cce..30c45e2e92917f8f643d946e13d2e9946cfdba67 100644 +index 2859f5bf5a00ff6841933dd83135d89a1786e76e..1f536fb6f96edb78953abd295096e60272044ac7 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -650,6 +650,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -633,6 +633,7 @@ public class Connection extends SimpleChannelInboundHandler> { } else { this.channel.pipeline().addBefore("encoder", "compress", new CompressionEncoder(compressionThreshold)); } @@ -133,7 +133,7 @@ index 79c55e1f9819345c46aa33f0ebf2555ee4506cce..30c45e2e92917f8f643d946e13d2e994 } else { if (this.channel.pipeline().get("decompress") instanceof CompressionDecoder) { this.channel.pipeline().remove("decompress"); -@@ -658,6 +659,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -641,6 +642,7 @@ public class Connection extends SimpleChannelInboundHandler> { if (this.channel.pipeline().get("compress") instanceof CompressionEncoder) { this.channel.pipeline().remove("compress"); } diff --git a/patches/server/0584-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0586-Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 100% rename from patches/server/0584-Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/0586-Send-empty-commands-if-tab-completion-is-disabled.patch diff --git a/patches/server/0585-Add-more-WanderingTrader-API.patch b/patches/server/0587-Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/server/0585-Add-more-WanderingTrader-API.patch rename to patches/server/0587-Add-more-WanderingTrader-API.patch diff --git a/patches/server/0586-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0588-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/server/0586-Add-EntityBlockStorage-clearEntities.patch rename to patches/server/0588-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/unapplied/server/0587-Entity-load-save-limit-per-chunk.patch b/patches/server/0589-Entity-load-save-limit-per-chunk.patch similarity index 95% rename from patches/unapplied/server/0587-Entity-load-save-limit-per-chunk.patch rename to patches/server/0589-Entity-load-save-limit-per-chunk.patch index e706c5e31f..f07dc4c039 100644 --- a/patches/unapplied/server/0587-Entity-load-save-limit-per-chunk.patch +++ b/patches/server/0589-Entity-load-save-limit-per-chunk.patch @@ -9,10 +9,10 @@ defaults are only included for certain entites, this allows setting limits for any entity type. diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index c2aafe4e1afec2793735bf7b0bbd6af94ad393f8..c7e127e62b7616997c123c47d86ed751c12fd151 100644 +index 5981b2bd5745ac32cdb377c15c4384d074a47680..b1a5f160f5bd4da271f212f02c3c977a5e576b99 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -626,9 +626,20 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -627,9 +627,20 @@ public class EntityType implements FeatureElement, EntityTypeT final Spliterator spliterator = entityNbtList.spliterator(); return StreamSupport.stream(new Spliterator() { diff --git a/patches/server/0587-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0590-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/server/0587-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/0590-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/server/0588-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0591-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 95% rename from patches/server/0588-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0591-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch index 9ded5db62c..6db9d8af69 100644 --- a/patches/server/0588-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch +++ b/patches/server/0591-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add raw address to AsyncPlayerPreLoginEvent diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 25afcd025d32c76232910bcc7d6607eef3c4167d..e0070317d7c51e239cef45c248ab7bd7544fe56c 100644 +index 7ae0ecc93a92edeb172d9ed0709c8f7f068cdf4e..2580e8e37cee802aa4f8f3ca5df2cc4914e28daf 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -289,12 +289,13 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/server/0589-Inventory-close.patch b/patches/server/0592-Inventory-close.patch similarity index 100% rename from patches/server/0589-Inventory-close.patch rename to patches/server/0592-Inventory-close.patch diff --git a/patches/server/0590-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0593-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/server/0590-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/0593-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/server/0591-Fix-CraftPotionBrewer-cache.patch b/patches/server/0594-Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/server/0591-Fix-CraftPotionBrewer-cache.patch rename to patches/server/0594-Fix-CraftPotionBrewer-cache.patch diff --git a/patches/server/0592-Add-basic-Datapack-API.patch b/patches/server/0595-Add-basic-Datapack-API.patch similarity index 100% rename from patches/server/0592-Add-basic-Datapack-API.patch rename to patches/server/0595-Add-basic-Datapack-API.patch diff --git a/patches/server/0593-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0596-Add-environment-variable-to-disable-server-gui.patch similarity index 100% rename from patches/server/0593-Add-environment-variable-to-disable-server-gui.patch rename to patches/server/0596-Add-environment-variable-to-disable-server-gui.patch diff --git a/patches/server/0594-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0597-additions-to-PlayerGameModeChangeEvent.patch similarity index 100% rename from patches/server/0594-additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/0597-additions-to-PlayerGameModeChangeEvent.patch diff --git a/patches/server/0595-ItemStack-repair-check-API.patch b/patches/server/0598-ItemStack-repair-check-API.patch similarity index 100% rename from patches/server/0595-ItemStack-repair-check-API.patch rename to patches/server/0598-ItemStack-repair-check-API.patch diff --git a/patches/server/0596-More-Enchantment-API.patch b/patches/server/0599-More-Enchantment-API.patch similarity index 100% rename from patches/server/0596-More-Enchantment-API.patch rename to patches/server/0599-More-Enchantment-API.patch diff --git a/patches/server/0597-Move-range-check-for-block-placing-up.patch b/patches/server/0600-Move-range-check-for-block-placing-up.patch similarity index 100% rename from patches/server/0597-Move-range-check-for-block-placing-up.patch rename to patches/server/0600-Move-range-check-for-block-placing-up.patch diff --git a/patches/server/0598-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0601-Fix-and-optimise-world-force-upgrading.patch similarity index 100% rename from patches/server/0598-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0601-Fix-and-optimise-world-force-upgrading.patch diff --git a/patches/server/0599-Add-Mob-lookAt-API.patch b/patches/server/0602-Add-Mob-lookAt-API.patch similarity index 100% rename from patches/server/0599-Add-Mob-lookAt-API.patch rename to patches/server/0602-Add-Mob-lookAt-API.patch diff --git a/patches/server/0600-Add-Unix-domain-socket-support.patch b/patches/server/0603-Add-Unix-domain-socket-support.patch similarity index 98% rename from patches/server/0600-Add-Unix-domain-socket-support.patch rename to patches/server/0603-Add-Unix-domain-socket-support.patch index 2657876138..80fe2b67f6 100644 --- a/patches/server/0600-Add-Unix-domain-socket-support.patch +++ b/patches/server/0603-Add-Unix-domain-socket-support.patch @@ -109,7 +109,7 @@ index 2909ec699b241840e6d1827af0436535f8c88d77..75f47816336b6ad7568aa4abe7580e62 } // Spigot End diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 9079cc7021e467c199cee200aa0e13e8bba003f3..858270253c6174bbb46ef053b9be71620959ac5d 100644 +index f72a63d654bf5b7edebfc5afdced0b204d70966d..ae6efc0b8fe1787300a4c6d223dfe48df861ecc6 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -45,6 +45,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL @@ -128,7 +128,7 @@ index 9079cc7021e467c199cee200aa0e13e8bba003f3..858270253c6174bbb46ef053b9be7162 } catch (Throwable t) { org.apache.logging.log4j.LogManager.getLogger().debug("Failed to check connection throttle", t); } -@@ -121,8 +123,11 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -129,8 +131,11 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL // Paper end // if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above! if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper diff --git a/patches/server/0601-Add-EntityInsideBlockEvent.patch b/patches/server/0604-Add-EntityInsideBlockEvent.patch similarity index 100% rename from patches/server/0601-Add-EntityInsideBlockEvent.patch rename to patches/server/0604-Add-EntityInsideBlockEvent.patch diff --git a/patches/server/0602-Attributes-API-for-item-defaults.patch b/patches/server/0605-Attributes-API-for-item-defaults.patch similarity index 100% rename from patches/server/0602-Attributes-API-for-item-defaults.patch rename to patches/server/0605-Attributes-API-for-item-defaults.patch diff --git a/patches/server/0603-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0606-Add-cause-to-Weather-ThunderChangeEvents.patch similarity index 100% rename from patches/server/0603-Add-cause-to-Weather-ThunderChangeEvents.patch rename to patches/server/0606-Add-cause-to-Weather-ThunderChangeEvents.patch diff --git a/patches/server/0604-More-Lidded-Block-API.patch b/patches/server/0607-More-Lidded-Block-API.patch similarity index 100% rename from patches/server/0604-More-Lidded-Block-API.patch rename to patches/server/0607-More-Lidded-Block-API.patch diff --git a/patches/server/0605-Limit-item-frame-cursors-on-maps.patch b/patches/server/0608-Limit-item-frame-cursors-on-maps.patch similarity index 100% rename from patches/server/0605-Limit-item-frame-cursors-on-maps.patch rename to patches/server/0608-Limit-item-frame-cursors-on-maps.patch diff --git a/patches/server/0606-Add-PlayerKickEvent-causes.patch b/patches/server/0609-Add-PlayerKickEvent-causes.patch similarity index 100% rename from patches/server/0606-Add-PlayerKickEvent-causes.patch rename to patches/server/0609-Add-PlayerKickEvent-causes.patch diff --git a/patches/server/0607-Add-PufferFishStateChangeEvent.patch b/patches/server/0610-Add-PufferFishStateChangeEvent.patch similarity index 100% rename from patches/server/0607-Add-PufferFishStateChangeEvent.patch rename to patches/server/0610-Add-PufferFishStateChangeEvent.patch diff --git a/patches/server/0608-Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/0611-Fix-PlayerBucketEmptyEvent-result-itemstack.patch similarity index 100% rename from patches/server/0608-Fix-PlayerBucketEmptyEvent-result-itemstack.patch rename to patches/server/0611-Fix-PlayerBucketEmptyEvent-result-itemstack.patch diff --git a/patches/server/0609-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch b/patches/server/0612-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch similarity index 100% rename from patches/server/0609-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch rename to patches/server/0612-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch diff --git a/patches/server/0610-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0613-Add-option-to-fix-items-merging-through-walls.patch similarity index 100% rename from patches/server/0610-Add-option-to-fix-items-merging-through-walls.patch rename to patches/server/0613-Add-option-to-fix-items-merging-through-walls.patch diff --git a/patches/server/0611-Add-BellRevealRaiderEvent.patch b/patches/server/0614-Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/server/0611-Add-BellRevealRaiderEvent.patch rename to patches/server/0614-Add-BellRevealRaiderEvent.patch diff --git a/patches/server/0612-Fix-invulnerable-end-crystals.patch b/patches/server/0615-Fix-invulnerable-end-crystals.patch similarity index 100% rename from patches/server/0612-Fix-invulnerable-end-crystals.patch rename to patches/server/0615-Fix-invulnerable-end-crystals.patch diff --git a/patches/server/0613-Add-ElderGuardianAppearanceEvent.patch b/patches/server/0616-Add-ElderGuardianAppearanceEvent.patch similarity index 100% rename from patches/server/0613-Add-ElderGuardianAppearanceEvent.patch rename to patches/server/0616-Add-ElderGuardianAppearanceEvent.patch diff --git a/patches/server/0614-Fix-dangerous-end-portal-logic.patch b/patches/server/0617-Fix-dangerous-end-portal-logic.patch similarity index 100% rename from patches/server/0614-Fix-dangerous-end-portal-logic.patch rename to patches/server/0617-Fix-dangerous-end-portal-logic.patch diff --git a/patches/server/0615-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/0618-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from patches/server/0615-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to patches/server/0618-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/patches/server/0616-Make-item-validations-configurable.patch b/patches/server/0619-Make-item-validations-configurable.patch similarity index 100% rename from patches/server/0616-Make-item-validations-configurable.patch rename to patches/server/0619-Make-item-validations-configurable.patch diff --git a/patches/server/0617-Line-Of-Sight-Changes.patch b/patches/server/0620-Line-Of-Sight-Changes.patch similarity index 100% rename from patches/server/0617-Line-Of-Sight-Changes.patch rename to patches/server/0620-Line-Of-Sight-Changes.patch diff --git a/patches/server/0618-add-per-world-spawn-limits.patch b/patches/server/0621-add-per-world-spawn-limits.patch similarity index 100% rename from patches/server/0618-add-per-world-spawn-limits.patch rename to patches/server/0621-add-per-world-spawn-limits.patch diff --git a/patches/server/0619-Fix-potions-splash-events.patch b/patches/server/0622-Fix-potions-splash-events.patch similarity index 100% rename from patches/server/0619-Fix-potions-splash-events.patch rename to patches/server/0622-Fix-potions-splash-events.patch diff --git a/patches/server/0620-Add-more-LimitedRegion-API.patch b/patches/server/0623-Add-more-LimitedRegion-API.patch similarity index 100% rename from patches/server/0620-Add-more-LimitedRegion-API.patch rename to patches/server/0623-Add-more-LimitedRegion-API.patch diff --git a/patches/server/0621-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0624-Fix-PlayerDropItemEvent-using-wrong-item.patch similarity index 100% rename from patches/server/0621-Fix-PlayerDropItemEvent-using-wrong-item.patch rename to patches/server/0624-Fix-PlayerDropItemEvent-using-wrong-item.patch diff --git a/patches/server/0622-Missing-Entity-API.patch b/patches/server/0625-Missing-Entity-API.patch similarity index 98% rename from patches/server/0622-Missing-Entity-API.patch rename to patches/server/0625-Missing-Entity-API.patch index 85698b3120..1e0ae53ca4 100644 --- a/patches/server/0622-Missing-Entity-API.patch +++ b/patches/server/0625-Missing-Entity-API.patch @@ -815,42 +815,32 @@ index 3ba7e8ef1035e1de2c195b6919fe57aee398af51..fbabf86510c582e372b0b1ac5585c728 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index de54d45d1764228bdbfb5a73173b551f25440898..3e0049c2442c5941e02da0b0fb643784746cb2a1 100644 +index de54d45d1764228bdbfb5a73173b551f25440898..7d9b8968334e536457b29be196545a1f4e312a83 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -@@ -27,6 +27,38 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow { +@@ -27,6 +27,28 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow { this.getHandle().setVariant(net.minecraft.world.entity.animal.MushroomCow.MushroomType.values()[variant.ordinal()]); } + // Paper start + @Override + public int getStewEffectDuration() { -+ return this.getHandle().effectDuration; ++ throw new UnsupportedOperationException(); // TODO https://github.com/PaperMC/Paper/issues/9742 + } + + @Override + public void setStewEffectDuration(int duration) { -+ this.getHandle().effectDuration = duration; ++ throw new UnsupportedOperationException(); // TODO https://github.com/PaperMC/Paper/issues/9742 + } + + @Override + public org.bukkit.potion.PotionEffectType getStewEffectType() { -+ net.minecraft.world.effect.MobEffect effect = this.getHandle().effect; -+ if (effect == null) { -+ return null; -+ } -+ -+ return org.bukkit.potion.PotionEffectType.getById(net.minecraft.world.effect.MobEffect.getId(effect)); ++ throw new UnsupportedOperationException(); // TODO https://github.com/PaperMC/Paper/issues/9742 + } + + @Override + public void setStewEffect(org.bukkit.potion.PotionEffectType type) { -+ net.minecraft.world.effect.MobEffect effect = null; -+ if (type != null) { -+ effect = net.minecraft.world.effect.MobEffect.byId(type.getId()); -+ } -+ -+ this.getHandle().effect = effect; ++ throw new UnsupportedOperationException(); // TODO https://github.com/PaperMC/Paper/issues/9742 + } + // Paper end + diff --git a/patches/server/0623-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0626-Ensure-disconnect-for-book-edit-is-called-on-main.patch similarity index 100% rename from patches/server/0623-Ensure-disconnect-for-book-edit-is-called-on-main.patch rename to patches/server/0626-Ensure-disconnect-for-book-edit-is-called-on-main.patch diff --git a/patches/server/0624-Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/0627-Fix-return-value-of-Block-applyBoneMeal-always-being.patch similarity index 100% rename from patches/server/0624-Fix-return-value-of-Block-applyBoneMeal-always-being.patch rename to patches/server/0627-Fix-return-value-of-Block-applyBoneMeal-always-being.patch diff --git a/patches/server/0625-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0628-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 100% rename from patches/server/0625-Use-getChunkIfLoadedImmediately-in-places.patch rename to patches/server/0628-Use-getChunkIfLoadedImmediately-in-places.patch diff --git a/patches/server/0626-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0629-Fix-commands-from-signs-not-firing-command-events.patch similarity index 100% rename from patches/server/0626-Fix-commands-from-signs-not-firing-command-events.patch rename to patches/server/0629-Fix-commands-from-signs-not-firing-command-events.patch diff --git a/patches/server/0627-Adds-PlayerArmSwingEvent.patch b/patches/server/0630-Adds-PlayerArmSwingEvent.patch similarity index 100% rename from patches/server/0627-Adds-PlayerArmSwingEvent.patch rename to patches/server/0630-Adds-PlayerArmSwingEvent.patch diff --git a/patches/server/0628-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0631-Fixes-kick-event-leave-message-not-being-sent.patch similarity index 100% rename from patches/server/0628-Fixes-kick-event-leave-message-not-being-sent.patch rename to patches/server/0631-Fixes-kick-event-leave-message-not-being-sent.patch diff --git a/patches/server/0629-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0632-Add-config-for-mobs-immune-to-default-effects.patch similarity index 100% rename from patches/server/0629-Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/0632-Add-config-for-mobs-immune-to-default-effects.patch diff --git a/patches/server/0630-Fix-incorrect-message-for-outdated-client.patch b/patches/server/0633-Fix-incorrect-message-for-outdated-client.patch similarity index 94% rename from patches/server/0630-Fix-incorrect-message-for-outdated-client.patch rename to patches/server/0633-Fix-incorrect-message-for-outdated-client.patch index f92b62d655..3c1d877b05 100644 --- a/patches/server/0630-Fix-incorrect-message-for-outdated-client.patch +++ b/patches/server/0633-Fix-incorrect-message-for-outdated-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix incorrect message for outdated client diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 858270253c6174bbb46ef053b9be71620959ac5d..7092f959c42a6d9ac26c05a8282803141dd0658f 100644 +index ae6efc0b8fe1787300a4c6d223dfe48df861ecc6..73f12e176acc0a035d3283cf5ecebcb1b8b06b73 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -82,7 +82,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL diff --git a/patches/server/0631-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0634-Don-t-apply-cramming-damage-to-players.patch similarity index 100% rename from patches/server/0631-Don-t-apply-cramming-damage-to-players.patch rename to patches/server/0634-Don-t-apply-cramming-damage-to-players.patch diff --git a/patches/server/0632-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0635-Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 100% rename from patches/server/0632-Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/0635-Rate-options-and-timings-for-sensors-and-behaviors.patch diff --git a/patches/server/0633-Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/0636-Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 100% rename from patches/server/0633-Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/0636-Add-a-bunch-of-missing-forceDrop-toggles.patch diff --git a/patches/server/0634-Stinger-API.patch b/patches/server/0637-Stinger-API.patch similarity index 100% rename from patches/server/0634-Stinger-API.patch rename to patches/server/0637-Stinger-API.patch diff --git a/patches/server/0635-Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/0638-Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 100% rename from patches/server/0635-Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/0638-Fix-incosistency-issue-with-empty-map-items-in-CB.patch diff --git a/patches/server/0636-Add-System.out-err-catcher.patch b/patches/server/0639-Add-System.out-err-catcher.patch similarity index 100% rename from patches/server/0636-Add-System.out-err-catcher.patch rename to patches/server/0639-Add-System.out-err-catcher.patch diff --git a/patches/server/0637-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/0640-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/server/0637-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/0640-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/server/0638-Improve-boat-collision-performance.patch b/patches/server/0641-Improve-boat-collision-performance.patch similarity index 100% rename from patches/server/0638-Improve-boat-collision-performance.patch rename to patches/server/0641-Improve-boat-collision-performance.patch diff --git a/patches/server/0639-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0642-Prevent-AFK-kick-while-watching-end-credits.patch similarity index 100% rename from patches/server/0639-Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/0642-Prevent-AFK-kick-while-watching-end-credits.patch diff --git a/patches/server/0640-Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/0643-Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/server/0640-Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/0643-Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/server/0641-Add-PlayerSetSpawnEvent.patch b/patches/server/0644-Add-PlayerSetSpawnEvent.patch similarity index 100% rename from patches/server/0641-Add-PlayerSetSpawnEvent.patch rename to patches/server/0644-Add-PlayerSetSpawnEvent.patch diff --git a/patches/server/0642-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0645-Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/server/0642-Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/0645-Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/server/0643-Optimize-entity-tracker-passenger-checks.patch b/patches/server/0646-Optimize-entity-tracker-passenger-checks.patch similarity index 100% rename from patches/server/0643-Optimize-entity-tracker-passenger-checks.patch rename to patches/server/0646-Optimize-entity-tracker-passenger-checks.patch diff --git a/patches/server/0644-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0647-Config-option-for-Piglins-guarding-chests.patch similarity index 100% rename from patches/server/0644-Config-option-for-Piglins-guarding-chests.patch rename to patches/server/0647-Config-option-for-Piglins-guarding-chests.patch diff --git a/patches/server/0645-Added-EntityDamageItemEvent.patch b/patches/server/0648-Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/server/0645-Added-EntityDamageItemEvent.patch rename to patches/server/0648-Added-EntityDamageItemEvent.patch diff --git a/patches/server/0646-Optimize-indirect-passenger-iteration.patch b/patches/server/0649-Optimize-indirect-passenger-iteration.patch similarity index 100% rename from patches/server/0646-Optimize-indirect-passenger-iteration.patch rename to patches/server/0649-Optimize-indirect-passenger-iteration.patch diff --git a/patches/server/0647-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0650-Configurable-item-frame-map-cursor-update-interval.patch similarity index 100% rename from patches/server/0647-Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/0650-Configurable-item-frame-map-cursor-update-interval.patch diff --git a/patches/server/0648-Make-EntityUnleashEvent-cancellable.patch b/patches/server/0651-Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/server/0648-Make-EntityUnleashEvent-cancellable.patch rename to patches/server/0651-Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/server/0649-Clear-bucket-NBT-after-dispense.patch b/patches/server/0652-Clear-bucket-NBT-after-dispense.patch similarity index 100% rename from patches/server/0649-Clear-bucket-NBT-after-dispense.patch rename to patches/server/0652-Clear-bucket-NBT-after-dispense.patch diff --git a/patches/server/0650-Change-EnderEye-target-without-changing-other-things.patch b/patches/server/0653-Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/server/0650-Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/0653-Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/server/0651-Add-BlockBreakBlockEvent.patch b/patches/server/0654-Add-BlockBreakBlockEvent.patch similarity index 100% rename from patches/server/0651-Add-BlockBreakBlockEvent.patch rename to patches/server/0654-Add-BlockBreakBlockEvent.patch diff --git a/patches/server/0652-Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/0655-Option-to-prevent-NBT-copy-in-smithing-recipes.patch similarity index 100% rename from patches/server/0652-Option-to-prevent-NBT-copy-in-smithing-recipes.patch rename to patches/server/0655-Option-to-prevent-NBT-copy-in-smithing-recipes.patch diff --git a/patches/server/0653-More-CommandBlock-API.patch b/patches/server/0656-More-CommandBlock-API.patch similarity index 100% rename from patches/server/0653-More-CommandBlock-API.patch rename to patches/server/0656-More-CommandBlock-API.patch diff --git a/patches/server/0654-Add-missing-team-sidebar-display-slots.patch b/patches/server/0657-Add-missing-team-sidebar-display-slots.patch similarity index 91% rename from patches/server/0654-Add-missing-team-sidebar-display-slots.patch rename to patches/server/0657-Add-missing-team-sidebar-display-slots.patch index 1af8f2d323..909e5ce340 100644 --- a/patches/server/0654-Add-missing-team-sidebar-display-slots.patch +++ b/patches/server/0657-Add-missing-team-sidebar-display-slots.patch @@ -9,7 +9,7 @@ public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations toBukkitSlo public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations fromBukkitSlot(Lorg/bukkit/scoreboard/DisplaySlot;)I diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java -index 808118a033ace90246318dcf6a3110cab353d09c..fb492372f9656d5ac8e3d07c0ba2efc0d192db9b 100644 +index 808118a033ace90246318dcf6a3110cab353d09c..183496dfd40d6c89fb77758e5f8f66e8015fe182 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java @@ -6,37 +6,23 @@ import org.bukkit.scoreboard.DisplaySlot; @@ -48,8 +48,9 @@ index 808118a033ace90246318dcf6a3110cab353d09c..fb492372f9656d5ac8e3d07c0ba2efc0 return CraftScoreboardTranslations.SLOTS.inverse().get(minecraft.getSerializedName()); } - static net.minecraft.world.scores.DisplaySlot fromBukkitSlot(DisplaySlot slot) { +- static net.minecraft.world.scores.DisplaySlot fromBukkitSlot(DisplaySlot slot) { - return net.minecraft.world.scores.DisplaySlot.CODEC.byName(CraftScoreboardTranslations.SLOTS.get(slot)); ++ public static net.minecraft.world.scores.DisplaySlot fromBukkitSlot(DisplaySlot slot) { // Paper - public for testing + return net.minecraft.world.scores.DisplaySlot.CODEC.byName(slot.getId()); // Paper } @@ -75,10 +76,10 @@ index fe5d3b60ad740b7f1cce040f9c8d96ac51245ef6..43ffc4180b1ef2d2000991ad58b07061 { diff --git a/src/test/java/io/papermc/paper/scoreboard/DisplaySlotTest.java b/src/test/java/io/papermc/paper/scoreboard/DisplaySlotTest.java new file mode 100644 -index 0000000000000000000000000000000000000000..bb41a2f2c0a5e3b4cb3fe1b584e0ceb7a7116afb +index 0000000000000000000000000000000000000000..2d1d86eb58d7ec7246eb72029c09a53d0f775eb4 --- /dev/null +++ b/src/test/java/io/papermc/paper/scoreboard/DisplaySlotTest.java -@@ -0,0 +1,26 @@ +@@ -0,0 +1,27 @@ +package io.papermc.paper.scoreboard; + +import net.minecraft.world.scores.Scoreboard; @@ -100,8 +101,9 @@ index 0000000000000000000000000000000000000000..bb41a2f2c0a5e3b4cb3fe1b584e0ceb7 + + @Test + public void testMinecraftToBukkitDisplaySlots() { -+ for (String name : Scoreboard.getDisplaySlotNames()) { ++ // TODO https://github.com/PaperMC/Paper/issues/9742 ++ /*for (String name : Scoreboard.getDisplaySlotNames()) { + assertNotNull(CraftScoreboardTranslations.toBukkitSlot(Scoreboard.getDisplaySlotByName(name))); -+ } ++ }*/ + } +} diff --git a/patches/server/0655-Add-back-EntityPortalExitEvent.patch b/patches/server/0658-Add-back-EntityPortalExitEvent.patch similarity index 100% rename from patches/server/0655-Add-back-EntityPortalExitEvent.patch rename to patches/server/0658-Add-back-EntityPortalExitEvent.patch diff --git a/patches/server/0656-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0659-Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 100% rename from patches/server/0656-Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/server/0659-Add-methods-to-find-targets-for-lightning-strikes.patch diff --git a/patches/server/0657-Get-entity-default-attributes.patch b/patches/server/0660-Get-entity-default-attributes.patch similarity index 100% rename from patches/server/0657-Get-entity-default-attributes.patch rename to patches/server/0660-Get-entity-default-attributes.patch diff --git a/patches/server/0658-Left-handed-API.patch b/patches/server/0661-Left-handed-API.patch similarity index 100% rename from patches/server/0658-Left-handed-API.patch rename to patches/server/0661-Left-handed-API.patch diff --git a/patches/server/0659-Add-more-advancement-API.patch b/patches/server/0662-Add-more-advancement-API.patch similarity index 100% rename from patches/server/0659-Add-more-advancement-API.patch rename to patches/server/0662-Add-more-advancement-API.patch diff --git a/patches/server/0660-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0663-Add-ItemFactory-getSpawnEgg-API.patch similarity index 100% rename from patches/server/0660-Add-ItemFactory-getSpawnEgg-API.patch rename to patches/server/0663-Add-ItemFactory-getSpawnEgg-API.patch diff --git a/patches/server/0661-Add-critical-damage-API.patch b/patches/server/0664-Add-critical-damage-API.patch similarity index 100% rename from patches/server/0661-Add-critical-damage-API.patch rename to patches/server/0664-Add-critical-damage-API.patch diff --git a/patches/server/0662-Fix-issues-with-mob-conversion.patch b/patches/server/0665-Fix-issues-with-mob-conversion.patch similarity index 100% rename from patches/server/0662-Fix-issues-with-mob-conversion.patch rename to patches/server/0665-Fix-issues-with-mob-conversion.patch diff --git a/patches/server/0663-Add-isCollidable-methods-to-various-places.patch b/patches/server/0666-Add-isCollidable-methods-to-various-places.patch similarity index 100% rename from patches/server/0663-Add-isCollidable-methods-to-various-places.patch rename to patches/server/0666-Add-isCollidable-methods-to-various-places.patch diff --git a/patches/server/0664-Goat-ram-API.patch b/patches/server/0667-Goat-ram-API.patch similarity index 100% rename from patches/server/0664-Goat-ram-API.patch rename to patches/server/0667-Goat-ram-API.patch diff --git a/patches/server/0665-Add-API-for-resetting-a-single-score.patch b/patches/server/0668-Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/server/0665-Add-API-for-resetting-a-single-score.patch rename to patches/server/0668-Add-API-for-resetting-a-single-score.patch diff --git a/patches/server/0666-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0669-Add-Raw-Byte-Entity-Serialization.patch similarity index 100% rename from patches/server/0666-Add-Raw-Byte-Entity-Serialization.patch rename to patches/server/0669-Add-Raw-Byte-Entity-Serialization.patch diff --git a/patches/server/0667-Vanilla-command-permission-fixes.patch b/patches/server/0670-Vanilla-command-permission-fixes.patch similarity index 100% rename from patches/server/0667-Vanilla-command-permission-fixes.patch rename to patches/server/0670-Vanilla-command-permission-fixes.patch diff --git a/patches/server/0668-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0671-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 100% rename from patches/server/0668-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/server/0671-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch diff --git a/patches/server/0669-Fix-GameProfileCache-concurrency.patch b/patches/server/0672-Fix-GameProfileCache-concurrency.patch similarity index 100% rename from patches/server/0669-Fix-GameProfileCache-concurrency.patch rename to patches/server/0672-Fix-GameProfileCache-concurrency.patch diff --git a/patches/server/0670-Improve-and-expand-AsyncCatcher.patch b/patches/server/0673-Improve-and-expand-AsyncCatcher.patch similarity index 100% rename from patches/server/0670-Improve-and-expand-AsyncCatcher.patch rename to patches/server/0673-Improve-and-expand-AsyncCatcher.patch diff --git a/patches/server/0671-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0674-Add-paper-mobcaps-and-paper-playermobcaps.patch similarity index 100% rename from patches/server/0671-Add-paper-mobcaps-and-paper-playermobcaps.patch rename to patches/server/0674-Add-paper-mobcaps-and-paper-playermobcaps.patch diff --git a/patches/server/0672-Sanitize-ResourceLocation-error-logging.patch b/patches/server/0675-Sanitize-ResourceLocation-error-logging.patch similarity index 100% rename from patches/server/0672-Sanitize-ResourceLocation-error-logging.patch rename to patches/server/0675-Sanitize-ResourceLocation-error-logging.patch diff --git a/patches/server/0673-Optimise-general-POI-access.patch b/patches/server/0676-Optimise-general-POI-access.patch similarity index 100% rename from patches/server/0673-Optimise-general-POI-access.patch rename to patches/server/0676-Optimise-general-POI-access.patch diff --git a/patches/server/0674-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/0677-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/server/0674-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/server/0677-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/server/0675-Manually-inline-methods-in-BlockPosition.patch b/patches/server/0678-Manually-inline-methods-in-BlockPosition.patch similarity index 100% rename from patches/server/0675-Manually-inline-methods-in-BlockPosition.patch rename to patches/server/0678-Manually-inline-methods-in-BlockPosition.patch diff --git a/patches/server/0676-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/server/0679-Name-craft-scheduler-threads-according-to-the-plugin.patch similarity index 100% rename from patches/server/0676-Name-craft-scheduler-threads-according-to-the-plugin.patch rename to patches/server/0679-Name-craft-scheduler-threads-according-to-the-plugin.patch diff --git a/patches/server/0677-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0680-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch similarity index 100% rename from patches/server/0677-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch rename to patches/server/0680-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch diff --git a/patches/server/0678-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/server/0681-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch similarity index 93% rename from patches/server/0678-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch rename to patches/server/0681-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch index a1c18946b9..5475ff2092 100644 --- a/patches/server/0678-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch +++ b/patches/server/0681-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch @@ -8,7 +8,7 @@ Lighting is purged on update anyways, so let's not add more into the conversion process diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -index b4e7c9b317d532d4915932f8f79dfebf2b63ff16..79c069d4ff5a72ca3d77c166faa1b7da6ea40d12 100644 +index e4b3a70ff9f906a10f2ba3c07642193ca3269db7..dfeda27add86be0d56ad023f7391fa21e36c5062 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java @@ -51,6 +51,7 @@ public class ChunkStorage implements AutoCloseable { diff --git a/patches/server/0679-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/server/0682-Don-t-lookup-fluid-state-when-raytracing.patch similarity index 100% rename from patches/server/0679-Don-t-lookup-fluid-state-when-raytracing.patch rename to patches/server/0682-Don-t-lookup-fluid-state-when-raytracing.patch diff --git a/patches/server/0680-Time-scoreboard-search.patch b/patches/server/0683-Time-scoreboard-search.patch similarity index 100% rename from patches/server/0680-Time-scoreboard-search.patch rename to patches/server/0683-Time-scoreboard-search.patch diff --git a/patches/server/0681-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0684-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/server/0681-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/0684-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/server/0682-Do-not-run-raytrace-logic-for-AIR.patch b/patches/server/0685-Do-not-run-raytrace-logic-for-AIR.patch similarity index 100% rename from patches/server/0682-Do-not-run-raytrace-logic-for-AIR.patch rename to patches/server/0685-Do-not-run-raytrace-logic-for-AIR.patch diff --git a/patches/unapplied/server/0686-Execute-chunk-tasks-mid-tick.patch b/patches/server/0686-Execute-chunk-tasks-mid-tick.patch similarity index 82% rename from patches/unapplied/server/0686-Execute-chunk-tasks-mid-tick.patch rename to patches/server/0686-Execute-chunk-tasks-mid-tick.patch index 8c3e096cf9..e275849487 100644 --- a/patches/unapplied/server/0686-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0686-Execute-chunk-tasks-mid-tick.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Execute chunk tasks mid-tick This will help the server load chunks if tick times are high. diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java -index 4d861f9a58f8ea238471af22f387854d855b1801..efbf77024d235d8af9f7efc938c17afd76a51b0c 100644 +index 678a31fb85947ee8807d02d0fe4e11a73d2dafaa..0fc4feb00940079c4eb9554a3a48d19cbbeeb7bc 100644 --- a/src/main/java/co/aikar/timings/MinecraftTimings.java +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java -@@ -47,6 +47,8 @@ public final class MinecraftTimings { - public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update"); - public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate"); +@@ -49,6 +49,8 @@ public final class MinecraftTimings { + public static final Timing scoreboardScoreSearch = Timings.ofSafe("Scoreboard score search"); // Paper - add timings for scoreboard search + + public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks"); + @@ -19,10 +19,10 @@ index 4d861f9a58f8ea238471af22f387854d855b1801..efbf77024d235d8af9f7efc938c17afd private MinecraftTimings() {} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 64081583ee2a29b43d487b3730342dce7ac85e94..b54a3dcbd94582158a7119b92b02be5a4e32877c 100644 +index 7e4f3b7a5790292b3b8439fb4696d9d6cfec0167..6c02d5233c782b0e5049afdf84250687ae71dcde 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1302,6 +1302,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop void guardEntityTick(Consumer tickConsumer, T entity) { try { tickConsumer.accept(entity); diff --git a/patches/server/0683-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0687-Oprimise-map-impl-for-tracked-players.patch similarity index 81% rename from patches/server/0683-Oprimise-map-impl-for-tracked-players.patch rename to patches/server/0687-Oprimise-map-impl-for-tracked-players.patch index 059f3dea90..242ae5cd96 100644 --- a/patches/server/0683-Oprimise-map-impl-for-tracked-players.patch +++ b/patches/server/0687-Oprimise-map-impl-for-tracked-players.patch @@ -7,7 +7,7 @@ Reference2BooleanOpenHashMap is going to have better lookups than HashMap. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 463a82f08b7848a4b8a4eb89b201a6e8424c6831..aab0e00fb9c804178fa182542abfeac115ee82aa 100644 +index 463a82f08b7848a4b8a4eb89b201a6e8424c6831..93a2dfca4484d1bdfa00dfb2cf8d94314123aeb8 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1210,7 +1210,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -15,7 +15,7 @@ index 463a82f08b7848a4b8a4eb89b201a6e8424c6831..aab0e00fb9c804178fa182542abfeac1 private final int range; SectionPos lastSectionPos; - public final Set seenBy = Sets.newIdentityHashSet(); -+ public final Set seenBy = new ReferenceOpenHashSet<>(); // Paper - optimise map impl ++ public final Set seenBy = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<>(); // Paper - optimise map impl public TrackedEntity(Entity entity, int i, int j, boolean flag) { this.serverEntity = new ServerEntity(ChunkMap.this.level, entity, j, flag, this::broadcast, this.seenBy); // CraftBukkit diff --git a/patches/server/0684-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0688-Optimise-BlockSoil-nearby-water-lookup.patch similarity index 100% rename from patches/server/0684-Optimise-BlockSoil-nearby-water-lookup.patch rename to patches/server/0688-Optimise-BlockSoil-nearby-water-lookup.patch diff --git a/patches/server/0685-Optimise-random-block-ticking.patch b/patches/server/0689-Optimise-random-block-ticking.patch similarity index 97% rename from patches/server/0685-Optimise-random-block-ticking.patch rename to patches/server/0689-Optimise-random-block-ticking.patch index 5a372a7083..203cc8d65f 100644 --- a/patches/server/0685-Optimise-random-block-ticking.patch +++ b/patches/server/0689-Optimise-random-block-ticking.patch @@ -90,10 +90,10 @@ index 0000000000000000000000000000000000000000..7d93652c1abbb6aee6eb7c26cf35d4d0 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f0f8d10140f0d06cba292f039d1e32ae26b940e4..e249d28198cee98cd04c34f334808e483eba83d7 100644 +index 1397c7d2b3706a3d58d9304627d504eb28ae3b82..7074c1e7d7d33dafc0e69f5ab2630e47b7ad1795 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -838,6 +838,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -839,6 +839,10 @@ public class ServerLevel extends Level implements WorldGenLevel { entityplayer.stopSleepInBed(false, false); }); } @@ -104,7 +104,7 @@ index f0f8d10140f0d06cba292f039d1e32ae26b940e4..e249d28198cee98cd04c34f334808e48 public void tickChunk(LevelChunk chunk, int randomTickSpeed) { ChunkPos chunkcoordintpair = chunk.getPos(); -@@ -847,8 +851,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -848,8 +852,10 @@ public class ServerLevel extends Level implements WorldGenLevel { ProfilerFiller gameprofilerfiller = this.getProfiler(); gameprofilerfiller.push("thunder"); @@ -116,7 +116,7 @@ index f0f8d10140f0d06cba292f039d1e32ae26b940e4..e249d28198cee98cd04c34f334808e48 if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); -@@ -880,61 +886,67 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -881,61 +887,67 @@ public class ServerLevel extends Level implements WorldGenLevel { if (!this.paperConfig().environment.disableIceAndSnow) { // Paper for (int l = 0; l < randomTickSpeed; ++l) { if (this.random.nextInt(48) == 0) { @@ -214,7 +214,7 @@ index f0f8d10140f0d06cba292f039d1e32ae26b940e4..e249d28198cee98cd04c34f334808e48 if (i > 0 && biomebase.shouldSnow(this, blockposition1)) { BlockState iblockdata = this.getBlockState(blockposition1); -@@ -952,12 +964,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -953,12 +965,13 @@ public class ServerLevel extends Level implements WorldGenLevel { } } @@ -318,10 +318,10 @@ index 652a8150f7343050b6da6c01f4e73a755138d491..5f57f13d50e051c621e401b63c0b55b3 public BlockPos getHomePos() { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 4cdf476a1f3c5b255b7b4ff4793b6015387879d2..d1a56519f5a8c07d0c0aa6361071775f5920b06d 100644 +index a9318df42efbc8dd454a487afbd02332290e6f42..57403c09141ece41a882c6574a593be391b34782 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1371,10 +1371,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1377,10 +1377,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract RecipeManager getRecipeManager(); public BlockPos getBlockRandomPos(int x, int y, int z, int l) { diff --git a/patches/unapplied/server/0687-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/0690-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch similarity index 96% rename from patches/unapplied/server/0687-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to patches/server/0690-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch index 293669046c..dc6a27403e 100644 --- a/patches/unapplied/server/0687-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch +++ b/patches/server/0690-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch @@ -10,7 +10,7 @@ hoping that at least then we don't swap chunks, and maybe recover them all. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index fce679e2b72d2ce1c8e75710041937c2c0566044..9c6a2884c34a9f6e775103da42480cd6b8c693b3 100644 +index 9a4fa3e034108528197cca3d040d210fa819af8b..954b846d25f83f220e6585664c71e347192b3c71 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -70,6 +70,18 @@ import net.minecraft.world.ticks.ProtoChunkTicks; @@ -30,9 +30,9 @@ index fce679e2b72d2ce1c8e75710041937c2c0566044..9c6a2884c34a9f6e775103da42480cd6 + } + // Paper end - public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), null); // Paper - Anti-Xray - Add preset block states + public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); private static final Logger LOGGER = LogUtils.getLogger(); -@@ -450,7 +462,7 @@ public class ChunkSerializer { +@@ -446,7 +458,7 @@ public class ChunkSerializer { nbttagcompound.putInt("xPos", chunkcoordintpair.x); nbttagcompound.putInt("yPos", chunk.getMinSection()); nbttagcompound.putInt("zPos", chunkcoordintpair.z); @@ -42,7 +42,7 @@ index fce679e2b72d2ce1c8e75710041937c2c0566044..9c6a2884c34a9f6e775103da42480cd6 nbttagcompound.putString("Status", BuiltInRegistries.CHUNK_STATUS.getKey(chunk.getStatus()).toString()); BlendingData blendingdata = chunk.getBlendingData(); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -index e4b3a70ff9f906a10f2ba3c07642193ca3269db7..a5da3333e87bcc9def785a8e742a30d38c0ecc27 100644 +index dfeda27add86be0d56ad023f7391fa21e36c5062..8ebecb588058da174b0e0e19e54fcddfeeca1422 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java @@ -41,7 +41,7 @@ public class ChunkStorage implements AutoCloseable { @@ -87,11 +87,11 @@ index c8298a597818227de33a4afce4698ec0666cf758..6baceb6ce9021c489be6e79d338a9704 this.used.set(start, start + size); } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01cb4db15da 100644 +index 647ce340c81606ab86d33e1f9dec1fb0afc262d8..98c8b676fc5b2add44d6ddf5d32f85bc07ea22cb 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -@@ -51,6 +51,355 @@ public class RegionFile implements AutoCloseable { - public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper +@@ -50,6 +50,355 @@ public class RegionFile implements AutoCloseable { + public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(); // Paper public final Path regionFile; // Paper + // Paper start - try to recover from RegionFile header corruption @@ -446,7 +446,7 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c // Paper start - Cache chunk status private final net.minecraft.world.level.chunk.ChunkStatus[] statuses = new net.minecraft.world.level.chunk.ChunkStatus[32 * 32]; -@@ -78,8 +427,19 @@ public class RegionFile implements AutoCloseable { +@@ -77,8 +426,19 @@ public class RegionFile implements AutoCloseable { public RegionFile(Path file, Path directory, boolean dsync) throws IOException { this(file, directory, RegionFileVersion.VERSION_DEFLATE, dsync); } @@ -466,7 +466,7 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c this.header = ByteBuffer.allocateDirect(8192); this.regionFile = file; // Paper initOversizedState(); // Paper -@@ -108,14 +468,16 @@ public class RegionFile implements AutoCloseable { +@@ -107,14 +467,16 @@ public class RegionFile implements AutoCloseable { RegionFile.LOGGER.warn("Region file {} has truncated header: {}", file, i); } @@ -488,7 +488,7 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c // Spigot start if (j1 == 255) { // We're maxed out, so we need to read the proper length from the section -@@ -124,32 +486,102 @@ public class RegionFile implements AutoCloseable { +@@ -123,32 +485,102 @@ public class RegionFile implements AutoCloseable { j1 = (realLen.getInt(0) + 4) / 4096 + 1; } // Spigot end @@ -596,7 +596,7 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c @Nullable public synchronized DataInputStream getChunkDataInputStream(ChunkPos pos) throws IOException { int i = this.getOffset(pos); -@@ -173,6 +605,11 @@ public class RegionFile implements AutoCloseable { +@@ -172,6 +604,11 @@ public class RegionFile implements AutoCloseable { ((java.nio.Buffer) bytebuffer).flip(); // CraftBukkit - decompile error if (bytebuffer.remaining() < 5) { RegionFile.LOGGER.error("Chunk {} header is truncated: expected {} but read {}", new Object[]{pos, l, bytebuffer.remaining()}); @@ -608,7 +608,7 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c return null; } else { int i1 = bytebuffer.getInt(); -@@ -180,6 +617,11 @@ public class RegionFile implements AutoCloseable { +@@ -179,6 +616,11 @@ public class RegionFile implements AutoCloseable { if (i1 == 0) { RegionFile.LOGGER.warn("Chunk {} is allocated, but stream is missing", pos); @@ -620,7 +620,7 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c return null; } else { int j1 = i1 - 1; -@@ -187,17 +629,44 @@ public class RegionFile implements AutoCloseable { +@@ -186,17 +628,44 @@ public class RegionFile implements AutoCloseable { if (RegionFile.isExternalStreamChunk(b0)) { if (j1 != 0) { RegionFile.LOGGER.warn("Chunk has both internal and external streams"); @@ -667,7 +667,7 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c } } } -@@ -372,10 +841,15 @@ public class RegionFile implements AutoCloseable { +@@ -371,10 +840,15 @@ public class RegionFile implements AutoCloseable { } private ByteBuffer createExternalStub() { @@ -685,10 +685,10 @@ index cda87a66fe80bf910f629c64e36c1fecbad81d77..9bae47f99336c377beb72c4b50b7f01c return bytebuffer; } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index d3d4d10a77af51cff4da201201bac325427fc20c..c2643f61fe5efb62d15f0798db691c76c7674a6e 100644 +index 7dee0f7d49f3492c92fceff7750e696239f840ed..134a5cf10073c27dfbc19709e81ffa75bcc73743 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -25,6 +25,7 @@ public class RegionFileStorage implements AutoCloseable { +@@ -24,6 +24,7 @@ public class RegionFileStorage implements AutoCloseable { public final Long2ObjectLinkedOpenHashMap regionCache = new Long2ObjectLinkedOpenHashMap(); private final Path folder; private final boolean sync; @@ -696,7 +696,7 @@ index d3d4d10a77af51cff4da201201bac325427fc20c..c2643f61fe5efb62d15f0798db691c76 // Paper start - cache regionfile does not exist state static final int MAX_NON_EXISTING_CACHE = 1024 * 64; -@@ -56,6 +57,12 @@ public class RegionFileStorage implements AutoCloseable { +@@ -55,6 +56,12 @@ public class RegionFileStorage implements AutoCloseable { // Paper end - cache regionfile does not exist state protected RegionFileStorage(Path directory, boolean dsync) { // Paper - protected constructor @@ -709,7 +709,7 @@ index d3d4d10a77af51cff4da201201bac325427fc20c..c2643f61fe5efb62d15f0798db691c76 this.folder = directory; this.sync = dsync; } -@@ -125,7 +132,7 @@ public class RegionFileStorage implements AutoCloseable { +@@ -122,7 +129,7 @@ public class RegionFileStorage implements AutoCloseable { // Paper - only create directory if not existing only - moved down Path path = this.folder; int j = chunkcoordintpair.getRegionX(); @@ -718,7 +718,7 @@ index d3d4d10a77af51cff4da201201bac325427fc20c..c2643f61fe5efb62d15f0798db691c76 if (existingOnly && !java.nio.file.Files.exists(path1)) { // Paper start - cache regionfile does not exist state this.markNonExisting(regionPos); return null; // CraftBukkit -@@ -134,7 +141,7 @@ public class RegionFileStorage implements AutoCloseable { +@@ -131,7 +138,7 @@ public class RegionFileStorage implements AutoCloseable { } // Paper end - cache regionfile does not exist state FileUtil.createDirectoriesSafe(this.folder); // Paper - only create directory if not existing only - moved from above @@ -727,7 +727,7 @@ index d3d4d10a77af51cff4da201201bac325427fc20c..c2643f61fe5efb62d15f0798db691c76 this.regionCache.putAndMoveToFirst(i, regionfile1); // Paper start -@@ -219,6 +226,13 @@ public class RegionFileStorage implements AutoCloseable { +@@ -216,6 +223,13 @@ public class RegionFileStorage implements AutoCloseable { if (regionfile == null) { return null; } @@ -741,7 +741,7 @@ index d3d4d10a77af51cff4da201201bac325427fc20c..c2643f61fe5efb62d15f0798db691c76 // CraftBukkit end try { // Paper DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos); -@@ -235,6 +249,20 @@ public class RegionFileStorage implements AutoCloseable { +@@ -232,6 +246,20 @@ public class RegionFileStorage implements AutoCloseable { try { if (datainputstream != null) { nbttagcompound = NbtIo.read((DataInput) datainputstream); diff --git a/patches/server/0687-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0691-Use-Velocity-compression-and-cipher-natives.patch similarity index 98% rename from patches/server/0687-Use-Velocity-compression-and-cipher-natives.patch rename to patches/server/0691-Use-Velocity-compression-and-cipher-natives.patch index 4633ec2b6d..150a6c9f29 100644 --- a/patches/server/0687-Use-Velocity-compression-and-cipher-natives.patch +++ b/patches/server/0691-Use-Velocity-compression-and-cipher-natives.patch @@ -264,10 +264,10 @@ index 859af8c845bae9781a62fa4acae56c6e2d449e10..ec7239fd6a2ecf732d2843f9426e4cb6 return this.threshold; } diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 30c45e2e92917f8f643d946e13d2e9946cfdba67..3e1746a33fbec4679a0ff413f55384b287405236 100644 +index 1f536fb6f96edb78953abd295096e60272044ac7..6d717c645d42c267efa99845f4f92fddec97660a 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -602,11 +602,28 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -585,11 +585,28 @@ public class Connection extends SimpleChannelInboundHandler> { return networkmanager; } @@ -300,7 +300,7 @@ index 30c45e2e92917f8f643d946e13d2e9946cfdba67..3e1746a33fbec4679a0ff413f55384b2 public boolean isEncrypted() { return this.encrypted; -@@ -639,16 +656,17 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -622,16 +639,17 @@ public class Connection extends SimpleChannelInboundHandler> { public void setupCompression(int compressionThreshold, boolean rejectsBadPackets) { if (compressionThreshold >= 0) { @@ -337,7 +337,7 @@ index 2e7540b0e100347cd91624c9d61a5c4688a52b26..dbefe5450b9d8d9c32c30a06afd61472 protected void initChannel(Channel channel) { Connection.setInitialProtocolAttributes(channel); diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index e0070317d7c51e239cef45c248ab7bd7544fe56c..f10647075a55630d91673ef3ccf91f9079f69d37 100644 +index 2580e8e37cee802aa4f8f3ca5df2cc4914e28daf..58321faf05c9fbeaf4b417e2749b190ad2a33f60 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -222,12 +222,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/unapplied/server/0689-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0692-Detail-more-information-in-watchdog-dumps.patch similarity index 91% rename from patches/unapplied/server/0689-Detail-more-information-in-watchdog-dumps.patch rename to patches/server/0692-Detail-more-information-in-watchdog-dumps.patch index a5401d113d..d3f1c95dc3 100644 --- a/patches/unapplied/server/0689-Detail-more-information-in-watchdog-dumps.patch +++ b/patches/server/0692-Detail-more-information-in-watchdog-dumps.patch @@ -7,12 +7,12 @@ Subject: [PATCH] Detail more information in watchdog dumps - Dump player name, player uuid, position, and world for packet handling diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 95f5ec348ab24b28c19b46cea7b023a1d49998b5..890d14503e157d6c07a6db1f180f49f81118e301 100644 +index 6d717c645d42c267efa99845f4f92fddec97660a..aabd85416d2c64b29dda991304650214247df164 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -528,7 +528,13 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -438,7 +438,13 @@ public class Connection extends SimpleChannelInboundHandler> { if (!(this.packetListener instanceof net.minecraft.server.network.ServerLoginPacketListenerImpl loginPacketListener) - || loginPacketListener.state != net.minecraft.server.network.ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT + || loginPacketListener.state != net.minecraft.server.network.ServerLoginPacketListenerImpl.State.VERIFYING || Connection.joinAttemptsThisTick++ < MAX_PER_TICK) { + // Paper start - detailed watchdog information + net.minecraft.network.protocol.PacketUtils.packetProcessing.push(this.packetListener); @@ -25,10 +25,10 @@ index 95f5ec348ab24b28c19b46cea7b023a1d49998b5..890d14503e157d6c07a6db1f180f49f8 // Paper end } diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 4a1148a76020089caf01f888f87afdbb35788dc0..52a84eeb3b7df782cbf91aac6df42fb8f99077f6 100644 +index 047fc7206131e0f36ab45d04e98b7a235431e342..6ac03dee902051a26493dba468d6a2f5cecfe066 100644 --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -@@ -15,6 +15,24 @@ public class PacketUtils { +@@ -17,6 +17,24 @@ public class PacketUtils { private static final Logger LOGGER = LogUtils.getLogger(); @@ -53,16 +53,16 @@ index 4a1148a76020089caf01f888f87afdbb35788dc0..52a84eeb3b7df782cbf91aac6df42fb8 public PacketUtils() {} public static void ensureRunningOnSameThread(Packet packet, T listener, ServerLevel world) throws RunningOnDifferentThreadException { -@@ -24,6 +42,8 @@ public class PacketUtils { +@@ -26,6 +44,8 @@ public class PacketUtils { public static void ensureRunningOnSameThread(Packet packet, T listener, BlockableEventLoop engine) throws RunningOnDifferentThreadException { if (!engine.isSameThread()) { engine.executeIfPossible(() -> { + packetProcessing.push(listener); // Paper - detailed watchdog information + try { // Paper - detailed watchdog information - if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerGamePacketListenerImpl && ((ServerGamePacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590 - if (listener.isAcceptingMessages()) { + if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590 + if (listener.shouldHandleMessage(packet)) { co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings -@@ -39,6 +59,12 @@ public class PacketUtils { +@@ -50,6 +70,12 @@ public class PacketUtils { } else { PacketUtils.LOGGER.debug("Ignoring packet due to disconnection: {}", packet); } @@ -76,10 +76,10 @@ index 4a1148a76020089caf01f888f87afdbb35788dc0..52a84eeb3b7df782cbf91aac6df42fb8 }); throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 1d0f87185a8a74394bc2da29828407fd4210754c..d6429d721116aac2a4df8d0b217e9efcb698094e 100644 +index 7074c1e7d7d33dafc0e69f5ab2630e47b7ad1795..cbebd94026be140f4d0d913596e5a6d4e03ee154 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1200,7 +1200,26 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1215,7 +1215,26 @@ public class ServerLevel extends Level implements WorldGenLevel { } @@ -106,7 +106,7 @@ index 1d0f87185a8a74394bc2da29828407fd4210754c..d6429d721116aac2a4df8d0b217e9efc ++TimingHistory.entityTicks; // Paper - timings // Spigot start co.aikar.timings.Timing timer; // Paper -@@ -1240,7 +1259,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1255,7 +1274,13 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(entity, entity1); } // } finally { timer.stopTiming(); } // Paper - timings - move up @@ -122,10 +122,10 @@ index 1d0f87185a8a74394bc2da29828407fd4210754c..d6429d721116aac2a4df8d0b217e9efc private void tickPassenger(Entity vehicle, Entity passenger) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0d2506350e2c57044bf7c751627b6e0d76077e82..0e494502bc6d52f277d240d839e02b51fccf05fc 100644 +index 6512c3ca611233f7541c1d0119521e05f524615a..c02d5e6efcc8d8403b02acb37acb4071f0f33267 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1024,7 +1024,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -991,7 +991,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return this.onGround; } @@ -168,7 +168,7 @@ index 0d2506350e2c57044bf7c751627b6e0d76077e82..0e494502bc6d52f277d240d839e02b51 if (this.noPhysics) { this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); } else { -@@ -1194,6 +1229,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1161,6 +1196,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.level().getProfiler().pop(); } } @@ -182,7 +182,7 @@ index 0d2506350e2c57044bf7c751627b6e0d76077e82..0e494502bc6d52f277d240d839e02b51 } private boolean isStateClimbable(BlockState state) { -@@ -4224,7 +4266,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4218,7 +4260,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void setDeltaMovement(Vec3 velocity) { @@ -192,7 +192,7 @@ index 0d2506350e2c57044bf7c751627b6e0d76077e82..0e494502bc6d52f277d240d839e02b51 } public void addDeltaMovement(Vec3 velocity) { -@@ -4310,7 +4354,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4304,7 +4348,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } // Paper end - fix MC-4 if (this.position.x != x || this.position.y != y || this.position.z != z) { diff --git a/patches/server/0688-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch b/patches/server/0693-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch similarity index 100% rename from patches/server/0688-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch rename to patches/server/0693-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch diff --git a/patches/server/0689-Fix-Bukkit-NamespacedKey-shenanigans.patch b/patches/server/0694-Fix-Bukkit-NamespacedKey-shenanigans.patch similarity index 100% rename from patches/server/0689-Fix-Bukkit-NamespacedKey-shenanigans.patch rename to patches/server/0694-Fix-Bukkit-NamespacedKey-shenanigans.patch diff --git a/patches/unapplied/server/0691-Distance-manager-tick-timings.patch b/patches/server/0695-Distance-manager-tick-timings.patch similarity index 87% rename from patches/unapplied/server/0691-Distance-manager-tick-timings.patch rename to patches/server/0695-Distance-manager-tick-timings.patch index 1ea0186cb3..c7179fd70d 100644 --- a/patches/unapplied/server/0691-Distance-manager-tick-timings.patch +++ b/patches/server/0695-Distance-manager-tick-timings.patch @@ -7,17 +7,17 @@ Recently this has been taking up more time, so add a timings to really figure out how much. diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java -index efbf77024d235d8af9f7efc938c17afd76a51b0c..670dcfa32d003870091b75937f1603a5ac9fa7d1 100644 +index 0fc4feb00940079c4eb9554a3a48d19cbbeeb7bc..e6452bb4f29bf32600dbf8654365826600189bb5 100644 --- a/src/main/java/co/aikar/timings/MinecraftTimings.java +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java -@@ -46,6 +46,7 @@ public final class MinecraftTimings { - +@@ -47,6 +47,7 @@ public final class MinecraftTimings { public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update"); public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate"); + public static final Timing scoreboardScoreSearch = Timings.ofSafe("Scoreboard score search"); // Paper - add timings for scoreboard search + public static final Timing distanceManagerTick = Timings.ofSafe("Distance Manager Tick"); // Paper - add timings for distance manager - public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks"); + public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks"); diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java index 8e52ebe8d12f5da3d877b0e4ff3723229fb47db1..abd0217cf0bff183c8e262edc173a53403797c1a 100644 --- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java diff --git a/patches/server/0690-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0696-Fix-merchant-inventory-not-closing-on-entity-removal.patch similarity index 90% rename from patches/server/0690-Fix-merchant-inventory-not-closing-on-entity-removal.patch rename to patches/server/0696-Fix-merchant-inventory-not-closing-on-entity-removal.patch index b23a113b16..0bf986c613 100644 --- a/patches/server/0690-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0696-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e249d28198cee98cd04c34f334808e483eba83d7..97c8b8d28409f8f8c00192bcd959b199227897ef 100644 +index cbebd94026be140f4d0d913596e5a6d4e03ee154..37ad191dc777869bbaf5de33c43b5dfb41a4df27 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2613,6 +2613,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2641,6 +2641,11 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot end // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message diff --git a/patches/server/0691-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0697-Check-requirement-before-suggesting-root-nodes.patch similarity index 100% rename from patches/server/0691-Check-requirement-before-suggesting-root-nodes.patch rename to patches/server/0697-Check-requirement-before-suggesting-root-nodes.patch diff --git a/patches/server/0692-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0698-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch similarity index 100% rename from patches/server/0692-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch rename to patches/server/0698-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch diff --git a/patches/server/0699-Add-packet-limiter-config.patch b/patches/server/0699-Add-packet-limiter-config.patch new file mode 100644 index 0000000000..5ee7ebcd05 --- /dev/null +++ b/patches/server/0699-Add-packet-limiter-config.patch @@ -0,0 +1,108 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Fri, 30 Oct 2020 22:37:16 -0700 +Subject: [PATCH] Add packet limiter config + +Example config: +packet-limiter: + kick-message: '&cSent too many packets' + limits: + all: + interval: 7.0 + max-packet-rate: 500.0 + ServerboundPlaceRecipePacket: + interval: 4.0 + max-packet-rate: 5.0 + action: DROP + +all section refers to all incoming packets, the action for all is +hard coded to KICK. + +For specific limits, the section name is the class's name, +and an action can be defined: DROP or KICK + +If interval or rate are less-than 0, the limit is ignored + +diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java +index aabd85416d2c64b29dda991304650214247df164..95fc3899fae5ed2b46733fc423517a5954e984c2 100644 +--- a/src/main/java/net/minecraft/network/Connection.java ++++ b/src/main/java/net/minecraft/network/Connection.java +@@ -128,6 +128,22 @@ public class Connection extends SimpleChannelInboundHandler> { + return null; + } + // Paper end - add utility methods ++ // Paper start - packet limiter ++ protected final Object PACKET_LIMIT_LOCK = new Object(); ++ protected final @Nullable io.papermc.paper.util.IntervalledCounter allPacketCounts = io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.allPackets.isEnabled() ? new io.papermc.paper.util.IntervalledCounter( ++ (long)(io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.allPackets.interval() * 1.0e9) ++ ) : null; ++ protected final java.util.Map>, io.papermc.paper.util.IntervalledCounter> packetSpecificLimits = new java.util.HashMap<>(); ++ ++ private boolean stopReadingPackets; ++ private void killForPacketSpam() { ++ this.sendPacket(new ClientboundDisconnectPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.kickMessage)), PacketSendListener.thenRun(() -> { ++ this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.kickMessage)); ++ }), true); ++ this.setReadOnly(); ++ this.stopReadingPackets = true; ++ } ++ // Paper end - packet limiter + + public Connection(PacketFlow side) { + this.receiving = side; +@@ -220,6 +236,55 @@ public class Connection extends SimpleChannelInboundHandler> { + if (packetlistener == null) { + throw new IllegalStateException("Received a packet before the packet listener was initialized"); + } else { ++ // Paper start - packet limiter ++ if (this.stopReadingPackets) { ++ return; ++ } ++ if (this.allPacketCounts != null || ++ io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.containsKey(packet.getClass())) { ++ long time = System.nanoTime(); ++ synchronized (PACKET_LIMIT_LOCK) { ++ if (this.allPacketCounts != null) { ++ this.allPacketCounts.updateAndAdd(1, time); ++ if (this.allPacketCounts.getRate() >= io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.allPackets.maxPacketRate()) { ++ this.killForPacketSpam(); ++ return; ++ } ++ } ++ ++ for (Class check = packet.getClass(); check != Object.class; check = check.getSuperclass()) { ++ io.papermc.paper.configuration.GlobalConfiguration.PacketLimiter.PacketLimit packetSpecificLimit = ++ io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.get(check); ++ if (packetSpecificLimit == null || !packetSpecificLimit.isEnabled()) { ++ continue; ++ } ++ io.papermc.paper.util.IntervalledCounter counter = this.packetSpecificLimits.computeIfAbsent((Class)check, (clazz) -> { ++ return new io.papermc.paper.util.IntervalledCounter((long)(packetSpecificLimit.interval() * 1.0e9)); ++ }); ++ counter.updateAndAdd(1, time); ++ if (counter.getRate() >= packetSpecificLimit.maxPacketRate()) { ++ switch (packetSpecificLimit.action()) { ++ case DROP: ++ return; ++ case KICK: ++ String deobfedPacketName = io.papermc.paper.util.ObfHelper.INSTANCE.deobfClassName(check.getName()); ++ ++ String playerName; ++ if (this.packetListener instanceof net.minecraft.server.network.ServerCommonPacketListenerImpl impl) { ++ playerName = impl.getOwner().getName(); ++ } else { ++ playerName = this.getLoggableAddress(net.minecraft.server.MinecraftServer.getServer().logIPs()); ++ } ++ ++ Connection.LOGGER.warn("{} kicked for packet spamming: {}", playerName, deobfedPacketName.substring(deobfedPacketName.lastIndexOf(".") + 1)); ++ this.killForPacketSpam(); ++ return; ++ } ++ } ++ } ++ } ++ } ++ // Paper end - packet limiter + if (packetlistener.shouldHandleMessage(packet)) { + try { + Connection.genericsFtw(packet, packetlistener); diff --git a/patches/server/0693-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0700-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch similarity index 100% rename from patches/server/0693-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch rename to patches/server/0700-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch diff --git a/patches/server/0694-Ensure-valid-vehicle-status.patch b/patches/server/0701-Ensure-valid-vehicle-status.patch similarity index 100% rename from patches/server/0694-Ensure-valid-vehicle-status.patch rename to patches/server/0701-Ensure-valid-vehicle-status.patch diff --git a/patches/server/0695-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0702-Prevent-softlocked-end-exit-portal-generation.patch similarity index 100% rename from patches/server/0695-Prevent-softlocked-end-exit-portal-generation.patch rename to patches/server/0702-Prevent-softlocked-end-exit-portal-generation.patch diff --git a/patches/server/0696-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0703-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch similarity index 100% rename from patches/server/0696-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch rename to patches/server/0703-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch diff --git a/patches/server/0697-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0704-Don-t-log-debug-logging-being-disabled.patch similarity index 100% rename from patches/server/0697-Don-t-log-debug-logging-being-disabled.patch rename to patches/server/0704-Don-t-log-debug-logging-being-disabled.patch diff --git a/patches/server/0698-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0705-fix-various-menus-with-empty-level-accesses.patch similarity index 100% rename from patches/server/0698-fix-various-menus-with-empty-level-accesses.patch rename to patches/server/0705-fix-various-menus-with-empty-level-accesses.patch diff --git a/patches/server/0699-Preserve-overstacked-loot.patch b/patches/server/0706-Preserve-overstacked-loot.patch similarity index 100% rename from patches/server/0699-Preserve-overstacked-loot.patch rename to patches/server/0706-Preserve-overstacked-loot.patch diff --git a/patches/server/0700-Update-head-rotation-in-missing-places.patch b/patches/server/0707-Update-head-rotation-in-missing-places.patch similarity index 84% rename from patches/server/0700-Update-head-rotation-in-missing-places.patch rename to patches/server/0707-Update-head-rotation-in-missing-places.patch index 31fffacd0f..d80dd0df5c 100644 --- a/patches/server/0700-Update-head-rotation-in-missing-places.patch +++ b/patches/server/0707-Update-head-rotation-in-missing-places.patch @@ -8,10 +8,10 @@ This is because bukkit uses a separate head rotation field for yaw. This issue only applies to players. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6512c3ca611233f7541c1d0119521e05f524615a..cb609b3fad147cfa5c951c5a3b72f093fd98614f 100644 +index c02d5e6efcc8d8403b02acb37acb4071f0f33267..51d4870a563ab978b46c07a8e51e2b6849992269 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1836,6 +1836,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1878,6 +1878,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F); this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); @@ -19,7 +19,7 @@ index 6512c3ca611233f7541c1d0119521e05f524615a..cb609b3fad147cfa5c951c5a3b72f093 } public void absMoveTo(double x, double y, double z) { -@@ -1874,6 +1875,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1916,6 +1917,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.setXRot(pitch); this.setOldPosAndRot(); this.reapplyPosition(); diff --git a/patches/server/0701-prevent-unintended-light-block-manipulation.patch b/patches/server/0708-prevent-unintended-light-block-manipulation.patch similarity index 100% rename from patches/server/0701-prevent-unintended-light-block-manipulation.patch rename to patches/server/0708-prevent-unintended-light-block-manipulation.patch diff --git a/patches/server/0702-Fix-CraftCriteria-defaults-map.patch b/patches/server/0709-Fix-CraftCriteria-defaults-map.patch similarity index 100% rename from patches/server/0702-Fix-CraftCriteria-defaults-map.patch rename to patches/server/0709-Fix-CraftCriteria-defaults-map.patch diff --git a/patches/server/0703-Fix-upstreams-block-state-factories.patch b/patches/server/0710-Fix-upstreams-block-state-factories.patch similarity index 100% rename from patches/server/0703-Fix-upstreams-block-state-factories.patch rename to patches/server/0710-Fix-upstreams-block-state-factories.patch diff --git a/patches/server/0704-Configurable-feature-seeds.patch b/patches/server/0711-Configurable-feature-seeds.patch similarity index 100% rename from patches/server/0704-Configurable-feature-seeds.patch rename to patches/server/0711-Configurable-feature-seeds.patch diff --git a/patches/server/0705-Add-root-admin-user-detection.patch b/patches/server/0712-Add-root-admin-user-detection.patch similarity index 100% rename from patches/server/0705-Add-root-admin-user-detection.patch rename to patches/server/0712-Add-root-admin-user-detection.patch diff --git a/patches/server/0706-Always-allow-item-changing-in-Fireball.patch b/patches/server/0713-Always-allow-item-changing-in-Fireball.patch similarity index 100% rename from patches/server/0706-Always-allow-item-changing-in-Fireball.patch rename to patches/server/0713-Always-allow-item-changing-in-Fireball.patch diff --git a/patches/server/0707-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0714-don-t-attempt-to-teleport-dead-entities.patch similarity index 91% rename from patches/server/0707-don-t-attempt-to-teleport-dead-entities.patch rename to patches/server/0714-don-t-attempt-to-teleport-dead-entities.patch index de74ae0251..24d15f8607 100644 --- a/patches/server/0707-don-t-attempt-to-teleport-dead-entities.patch +++ b/patches/server/0714-don-t-attempt-to-teleport-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] don't attempt to teleport dead entities diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cb609b3fad147cfa5c951c5a3b72f093fd98614f..b8bc1578f1352c2368ba020cd8069b5780290664 100644 +index 51d4870a563ab978b46c07a8e51e2b6849992269..4b135772f8346103c2e6e1473af95f0bfa9754ef 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -754,7 +754,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0708-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0715-Prevent-excessive-velocity-through-repeated-crits.patch similarity index 100% rename from patches/server/0708-Prevent-excessive-velocity-through-repeated-crits.patch rename to patches/server/0715-Prevent-excessive-velocity-through-repeated-crits.patch diff --git a/patches/server/0709-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0716-Remove-client-side-code-using-deprecated-for-removal.patch similarity index 100% rename from patches/server/0709-Remove-client-side-code-using-deprecated-for-removal.patch rename to patches/server/0716-Remove-client-side-code-using-deprecated-for-removal.patch diff --git a/patches/server/0710-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0717-Fix-removing-recipes-from-RecipeIterator.patch similarity index 100% rename from patches/server/0710-Fix-removing-recipes-from-RecipeIterator.patch rename to patches/server/0717-Fix-removing-recipes-from-RecipeIterator.patch diff --git a/patches/server/0711-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0718-Prevent-sending-oversized-item-data-in-equipment-and.patch similarity index 100% rename from patches/server/0711-Prevent-sending-oversized-item-data-in-equipment-and.patch rename to patches/server/0718-Prevent-sending-oversized-item-data-in-equipment-and.patch diff --git a/patches/server/0712-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0719-Hide-unnecessary-itemmeta-from-clients.patch similarity index 100% rename from patches/server/0712-Hide-unnecessary-itemmeta-from-clients.patch rename to patches/server/0719-Hide-unnecessary-itemmeta-from-clients.patch diff --git a/patches/server/0713-Fix-Spigot-growth-modifiers.patch b/patches/server/0720-Fix-Spigot-growth-modifiers.patch similarity index 100% rename from patches/server/0713-Fix-Spigot-growth-modifiers.patch rename to patches/server/0720-Fix-Spigot-growth-modifiers.patch diff --git a/patches/server/0714-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0721-Prevent-ContainerOpenersCounter-openCount-from-going.patch similarity index 100% rename from patches/server/0714-Prevent-ContainerOpenersCounter-openCount-from-going.patch rename to patches/server/0721-Prevent-ContainerOpenersCounter-openCount-from-going.patch diff --git a/patches/server/0715-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0722-Add-PlayerItemFrameChangeEvent.patch similarity index 100% rename from patches/server/0715-Add-PlayerItemFrameChangeEvent.patch rename to patches/server/0722-Add-PlayerItemFrameChangeEvent.patch diff --git a/patches/server/0716-Optimize-HashMapPalette.patch b/patches/server/0723-Optimize-HashMapPalette.patch similarity index 100% rename from patches/server/0716-Optimize-HashMapPalette.patch rename to patches/server/0723-Optimize-HashMapPalette.patch diff --git a/patches/server/0717-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0724-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 100% rename from patches/server/0717-Allow-delegation-to-vanilla-chunk-gen.patch rename to patches/server/0724-Allow-delegation-to-vanilla-chunk-gen.patch diff --git a/patches/server/0718-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0725-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch similarity index 99% rename from patches/server/0718-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch rename to patches/server/0725-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index 470596ac1b..a2155fde34 100644 --- a/patches/server/0718-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/server/0725-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -1215,10 +1215,10 @@ index 965dd34bd9a23a2fb17e5800af3b294b75b1146a..c493f883940819913f0cecb5e374fe94 entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ()); } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b8bc1578f1352c2368ba020cd8069b5780290664..2815f111aff55ba4ec758c8af836aca83ffa1ac0 100644 +index 4b135772f8346103c2e6e1473af95f0bfa9754ef..2d303efd9ea5b5e96f1d2ec5a9c6f74c3785dd3e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1142,9 +1142,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1177,9 +1177,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { float f = this.getBlockSpeedFactor(); this.setDeltaMovement(this.getDeltaMovement().multiply((double) f, 1.0D, (double) f)); @@ -1266,7 +1266,7 @@ index b8bc1578f1352c2368ba020cd8069b5780290664..2815f111aff55ba4ec758c8af836aca8 if (this.remainingFireTicks <= 0) { this.setRemainingFireTicks(-this.getFireImmuneTicks()); } -@@ -1317,32 +1352,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1359,32 +1394,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } private Vec3 collide(Vec3 movement) { @@ -1366,7 +1366,7 @@ index b8bc1578f1352c2368ba020cd8069b5780290664..2815f111aff55ba4ec758c8af836aca8 } public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List collisions) { -@@ -2544,11 +2625,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2586,11 +2667,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { float f = this.dimensions.width * 0.8F; AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f); diff --git a/patches/server/0719-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0726-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 100% rename from patches/server/0719-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/server/0726-Optimise-collision-checking-in-player-move-packet-ha.patch diff --git a/patches/server/0720-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0727-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch similarity index 100% rename from patches/server/0720-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch rename to patches/server/0727-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch diff --git a/patches/server/0721-Add-more-Campfire-API.patch b/patches/server/0728-Add-more-Campfire-API.patch similarity index 100% rename from patches/server/0721-Add-more-Campfire-API.patch rename to patches/server/0728-Add-more-Campfire-API.patch diff --git a/patches/server/0722-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch b/patches/server/0729-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch similarity index 88% rename from patches/server/0722-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch rename to patches/server/0729-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch index 6e5867a5d8..5c74ea64c9 100644 --- a/patches/server/0722-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch +++ b/patches/server/0729-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch @@ -8,10 +8,10 @@ This ensures at least a valid version of the chunk exists on disk, even if outdated diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 8ef37d5f9a60f1bc62d5ef54a419ec1404659dde..9eaf2ab59f141e757c5c63e573943add4851a95c 100644 +index 98c8b676fc5b2add44d6ddf5d32f85bc07ea22cb..84b2fd9db39e0cdf3e1cbe6444579f7ca839bc45 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -@@ -529,6 +529,9 @@ public class RegionFile implements AutoCloseable { +@@ -1003,6 +1003,9 @@ public class RegionFile implements AutoCloseable { } } @@ -21,7 +21,7 @@ index 8ef37d5f9a60f1bc62d5ef54a419ec1404659dde..9eaf2ab59f141e757c5c63e573943add // Paper end private class ChunkBuffer extends ByteArrayOutputStream { -@@ -544,6 +547,24 @@ public class RegionFile implements AutoCloseable { +@@ -1018,6 +1021,24 @@ public class RegionFile implements AutoCloseable { this.pos = chunkcoordintpair; } @@ -47,10 +47,10 @@ index 8ef37d5f9a60f1bc62d5ef54a419ec1404659dde..9eaf2ab59f141e757c5c63e573943add ByteBuffer bytebuffer = ByteBuffer.wrap(this.buf, 0, this.count); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index 7dee0f7d49f3492c92fceff7750e696239f840ed..293eb41507d5a023bd9399b3577f0b2a905b8d2a 100644 +index 134a5cf10073c27dfbc19709e81ffa75bcc73743..db571f658f636cdda1dcdbaffa0c4da67fae11ad 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -314,10 +314,17 @@ public class RegionFileStorage implements AutoCloseable { +@@ -342,10 +342,17 @@ public class RegionFileStorage implements AutoCloseable { NbtIo.write(nbt, (DataOutput) dataoutputstream); regionfile.setStatus(pos.x, pos.z, ChunkSerializer.getStatus(nbt)); // Paper - cache status on disk regionfile.setOversized(pos.x, pos.z, false); // Paper - We don't do this anymore, mojang stores differently, but clear old meta flag if it exists to get rid of our own meta file once last oversized is gone @@ -69,7 +69,7 @@ index 7dee0f7d49f3492c92fceff7750e696239f840ed..293eb41507d5a023bd9399b3577f0b2a } catch (Throwable throwable1) { throwable.addSuppressed(throwable1); } -@@ -325,10 +332,7 @@ public class RegionFileStorage implements AutoCloseable { +@@ -353,10 +360,7 @@ public class RegionFileStorage implements AutoCloseable { throw throwable; } @@ -81,7 +81,7 @@ index 7dee0f7d49f3492c92fceff7750e696239f840ed..293eb41507d5a023bd9399b3577f0b2a } // Paper start return; -@@ -374,4 +378,13 @@ public class RegionFileStorage implements AutoCloseable { +@@ -402,4 +406,13 @@ public class RegionFileStorage implements AutoCloseable { } } diff --git a/patches/server/0723-Fix-tripwire-state-inconsistency.patch b/patches/server/0730-Fix-tripwire-state-inconsistency.patch similarity index 100% rename from patches/server/0723-Fix-tripwire-state-inconsistency.patch rename to patches/server/0730-Fix-tripwire-state-inconsistency.patch diff --git a/patches/server/0724-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0731-Forward-CraftEntity-in-teleport-command.patch similarity index 88% rename from patches/server/0724-Forward-CraftEntity-in-teleport-command.patch rename to patches/server/0731-Forward-CraftEntity-in-teleport-command.patch index d290a0b9d9..ac0fde4a14 100644 --- a/patches/server/0724-Forward-CraftEntity-in-teleport-command.patch +++ b/patches/server/0731-Forward-CraftEntity-in-teleport-command.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2815f111aff55ba4ec758c8af836aca83ffa1ac0..48abd5d9f62f527d8bd9c9d58b4d806d12270ffc 100644 +index 2d303efd9ea5b5e96f1d2ec5a9c6f74c3785dd3e..da02b0280778d86c285579bf4e4eae62cb4798d3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3405,6 +3405,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3447,6 +3447,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void restoreFrom(Entity original) { @@ -22,7 +22,7 @@ index 2815f111aff55ba4ec758c8af836aca83ffa1ac0..48abd5d9f62f527d8bd9c9d58b4d806d CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag()); nbttagcompound.remove("Dimension"); -@@ -3491,10 +3498,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3533,10 +3540,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit } diff --git a/patches/server/0725-Improve-scoreboard-entries.patch b/patches/server/0732-Improve-scoreboard-entries.patch similarity index 100% rename from patches/server/0725-Improve-scoreboard-entries.patch rename to patches/server/0732-Improve-scoreboard-entries.patch diff --git a/patches/server/0726-Entity-powdered-snow-API.patch b/patches/server/0733-Entity-powdered-snow-API.patch similarity index 100% rename from patches/server/0726-Entity-powdered-snow-API.patch rename to patches/server/0733-Entity-powdered-snow-API.patch diff --git a/patches/server/0727-Add-API-for-item-entity-health.patch b/patches/server/0734-Add-API-for-item-entity-health.patch similarity index 100% rename from patches/server/0727-Add-API-for-item-entity-health.patch rename to patches/server/0734-Add-API-for-item-entity-health.patch diff --git a/patches/server/0728-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0735-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 100% rename from patches/server/0728-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/0735-Fix-entity-type-tags-suggestions-in-selectors.patch diff --git a/patches/server/0729-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0736-Configurable-max-block-light-for-monster-spawning.patch similarity index 100% rename from patches/server/0729-Configurable-max-block-light-for-monster-spawning.patch rename to patches/server/0736-Configurable-max-block-light-for-monster-spawning.patch diff --git a/patches/server/0730-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0737-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch similarity index 100% rename from patches/server/0730-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch rename to patches/server/0737-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch diff --git a/patches/server/0731-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0738-Load-effect-amplifiers-greater-than-127-correctly.patch similarity index 100% rename from patches/server/0731-Load-effect-amplifiers-greater-than-127-correctly.patch rename to patches/server/0738-Load-effect-amplifiers-greater-than-127-correctly.patch diff --git a/patches/server/0732-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0739-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch similarity index 100% rename from patches/server/0732-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to patches/server/0739-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch diff --git a/patches/server/0733-Fix-bees-aging-inside-hives.patch b/patches/server/0740-Fix-bees-aging-inside-hives.patch similarity index 100% rename from patches/server/0733-Fix-bees-aging-inside-hives.patch rename to patches/server/0740-Fix-bees-aging-inside-hives.patch diff --git a/patches/server/0734-Bucketable-API.patch b/patches/server/0741-Bucketable-API.patch similarity index 100% rename from patches/server/0734-Bucketable-API.patch rename to patches/server/0741-Bucketable-API.patch diff --git a/patches/server/0735-Validate-usernames.patch b/patches/server/0742-Validate-usernames.patch similarity index 95% rename from patches/server/0735-Validate-usernames.patch rename to patches/server/0742-Validate-usernames.patch index 3bce88f5c0..89ea54ab5e 100644 --- a/patches/server/0735-Validate-usernames.patch +++ b/patches/server/0742-Validate-usernames.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Validate usernames diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index f10647075a55630d91673ef3ccf91f9079f69d37..542cd004b9ebee8c5bfc96d6ae0dc6820dfc6692 100644 +index 58321faf05c9fbeaf4b417e2749b190ad2a33f60..52f1fcbe104e75e4413e90e77bfc0a93294dd1c6 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -61,6 +61,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - private GameProfile authenticatedProfile; + public GameProfile authenticatedProfile; // Paper - public private final String serverId; private ServerPlayer player; // CraftBukkit + public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding diff --git a/patches/server/0736-Make-water-animal-spawn-height-configurable.patch b/patches/server/0743-Make-water-animal-spawn-height-configurable.patch similarity index 100% rename from patches/server/0736-Make-water-animal-spawn-height-configurable.patch rename to patches/server/0743-Make-water-animal-spawn-height-configurable.patch diff --git a/patches/server/0737-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0744-Expose-vanilla-BiomeProvider-from-WorldInfo.patch similarity index 98% rename from patches/server/0737-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to patches/server/0744-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 6a74fe6790..48dec66567 100644 --- a/patches/server/0737-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0744-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7e4f3b7a5790292b3b8439fb4696d9d6cfec0167..d3a54f4557f5eb91bf71877e6f7a1d24d9d34cb0 100644 +index 6c02d5233c782b0e5049afdf84250687ae71dcde..2503e2b2436a6e07fa22c0e55ad1539bae06de1a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -550,7 +550,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop attributeMap = new java.util.HashMap<>(); + this.handle.getAttributeModifiers().forEach((attribute, attributeModifier) -> { -+ attributeMap.put(org.bukkit.craftbukkit.attribute.CraftAttributeMap.fromMinecraft(attribute.toString()), org.bukkit.craftbukkit.attribute.CraftAttributeInstance.convert(attributeModifier)); ++ attributeMap.put( ++ org.bukkit.craftbukkit.attribute.CraftAttributeMap.fromMinecraft(attribute.toString()), ++ // use zero as amplifier to get the base amount, as it is amount = base * (amplifier + 1) ++ org.bukkit.craftbukkit.attribute.CraftAttributeInstance.convert(attributeModifier.create(0)) ++ ); + }); + return java.util.Map.copyOf(attributeMap); + } @@ -34,7 +38,7 @@ index 8f63c21186d8daa290286676bc2478d8629c533b..b3b7a4694f599d936f365e22d6190e61 + com.google.common.base.Preconditions.checkArgument(effectAmplifier >= 0, "effectAmplifier must be greater than or equal to 0"); + net.minecraft.world.entity.ai.attributes.Attribute nmsAttribute = org.bukkit.craftbukkit.attribute.CraftAttributeMap.toMinecraft(attribute); + com.google.common.base.Preconditions.checkArgument(this.handle.getAttributeModifiers().containsKey(nmsAttribute), attribute + " is not present on " + this.getKey()); -+ return this.handle.getAttributeModifierValue(effectAmplifier, this.handle.getAttributeModifiers().get(nmsAttribute)); ++ return this.handle.getAttributeModifiers().get(nmsAttribute).create(effectAmplifier).getAmount(); + } + + @Override diff --git a/patches/server/0751-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0758-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 100% rename from patches/server/0751-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/0758-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch diff --git a/patches/server/0752-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0759-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 100% rename from patches/server/0752-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/0759-API-for-creating-command-sender-which-forwards-feedb.patch diff --git a/patches/server/0753-Add-missing-structure-set-seed-configs.patch b/patches/server/0760-Add-missing-structure-set-seed-configs.patch similarity index 100% rename from patches/server/0753-Add-missing-structure-set-seed-configs.patch rename to patches/server/0760-Add-missing-structure-set-seed-configs.patch diff --git a/patches/server/0754-Implement-regenerateChunk.patch b/patches/server/0761-Implement-regenerateChunk.patch similarity index 100% rename from patches/server/0754-Implement-regenerateChunk.patch rename to patches/server/0761-Implement-regenerateChunk.patch diff --git a/patches/server/0755-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0762-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 100% rename from patches/server/0755-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0762-Fix-cancelled-powdered-snow-bucket-placement.patch diff --git a/patches/server/0756-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0763-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 100% rename from patches/server/0756-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0763-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch diff --git a/patches/server/0757-Add-GameEvent-tags.patch b/patches/server/0764-Add-GameEvent-tags.patch similarity index 100% rename from patches/server/0757-Add-GameEvent-tags.patch rename to patches/server/0764-Add-GameEvent-tags.patch diff --git a/patches/server/0758-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0765-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 82% rename from patches/server/0758-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0765-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index 3bbba7ace9..df4db48d20 100644 --- a/patches/server/0758-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0765-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,18 +9,18 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d3a54f4557f5eb91bf71877e6f7a1d24d9d34cb0..0640c7a30ac3e2be0fcf0b738efa810ac39ab37a 100644 +index 2503e2b2436a6e07fa22c0e55ad1539bae06de1a..5e90384ae64af46acff9d1b58c7d401e5590859c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1287,6 +1287,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -1469,7 +1470,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper -@@ -1547,6 +1550,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= i) { // CraftBukkit this.level().getProfiler().push("portal"); this.portalTime = i; @@ -22,7 +22,7 @@ index 200e3aeb234ae3f13deca88d808933cdb206b287..e6356b1400030f9c288b0bf33ac7a737 this.setPortalCooldown(); // CraftBukkit start if (this instanceof ServerPlayer) { -@@ -2980,6 +2987,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3022,6 +3029,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { this.changeDimension(worldserver1); } diff --git a/patches/server/0826-Don-t-use-level-random-in-entity-constructors.patch b/patches/server/0833-Don-t-use-level-random-in-entity-constructors.patch similarity index 100% rename from patches/server/0826-Don-t-use-level-random-in-entity-constructors.patch rename to patches/server/0833-Don-t-use-level-random-in-entity-constructors.patch diff --git a/patches/server/0827-Send-block-entities-after-destroy-prediction.patch b/patches/server/0834-Send-block-entities-after-destroy-prediction.patch similarity index 100% rename from patches/server/0827-Send-block-entities-after-destroy-prediction.patch rename to patches/server/0834-Send-block-entities-after-destroy-prediction.patch diff --git a/patches/server/0828-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0835-Warn-on-plugins-accessing-faraway-chunks.patch similarity index 98% rename from patches/server/0828-Warn-on-plugins-accessing-faraway-chunks.patch rename to patches/server/0835-Warn-on-plugins-accessing-faraway-chunks.patch index c469cf6bd0..f1a40b05c1 100644 --- a/patches/server/0828-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0835-Warn-on-plugins-accessing-faraway-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1bfa5971f049525ea7829df783facc59d95223da..3a2ad20ab45bebebd4bce8b17e902f704f748338 100644 +index a1c564571f5ebda3419a96ab86b52b62cf72c8e2..ed6e1bb540138e7c83df51cfd5c52dcc87fca076 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -440,7 +440,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0829-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0836-Custom-Chat-Completion-Suggestions-API.patch similarity index 100% rename from patches/server/0829-Custom-Chat-Completion-Suggestions-API.patch rename to patches/server/0836-Custom-Chat-Completion-Suggestions-API.patch diff --git a/patches/server/0830-Add-and-fix-missing-BlockFadeEvents.patch b/patches/server/0837-Add-and-fix-missing-BlockFadeEvents.patch similarity index 100% rename from patches/server/0830-Add-and-fix-missing-BlockFadeEvents.patch rename to patches/server/0837-Add-and-fix-missing-BlockFadeEvents.patch diff --git a/patches/server/0831-Collision-API.patch b/patches/server/0838-Collision-API.patch similarity index 100% rename from patches/server/0831-Collision-API.patch rename to patches/server/0838-Collision-API.patch diff --git a/patches/server/0832-Fix-suggest-command-message-for-brigadier-syntax-exc.patch b/patches/server/0839-Fix-suggest-command-message-for-brigadier-syntax-exc.patch similarity index 100% rename from patches/server/0832-Fix-suggest-command-message-for-brigadier-syntax-exc.patch rename to patches/server/0839-Fix-suggest-command-message-for-brigadier-syntax-exc.patch diff --git a/patches/server/0833-Block-Ticking-API.patch b/patches/server/0840-Block-Ticking-API.patch similarity index 100% rename from patches/server/0833-Block-Ticking-API.patch rename to patches/server/0840-Block-Ticking-API.patch diff --git a/patches/server/0834-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0841-Add-Velocity-IP-Forwarding-Support.patch similarity index 94% rename from patches/server/0834-Add-Velocity-IP-Forwarding-Support.patch rename to patches/server/0841-Add-Velocity-IP-Forwarding-Support.patch index 0ee93597dc..732f5e4db0 100644 --- a/patches/server/0834-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0841-Add-Velocity-IP-Forwarding-Support.patch @@ -15,7 +15,7 @@ login plugin message packet. diff --git a/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java new file mode 100644 -index 0000000000000000000000000000000000000000..c4934979b1ed85bfc4f8d9e6f8848b2beaad95c3 +index 0000000000000000000000000000000000000000..a34381122de53123169927e181df662814df4816 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java @@ -0,0 +1,75 @@ @@ -30,10 +30,10 @@ index 0000000000000000000000000000000000000000..c4934979b1ed85bfc4f8d9e6f8848b2b +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.UUID; -+ +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import net.minecraft.network.FriendlyByteBuf; ++import net.minecraft.network.protocol.login.custom.CustomQueryPayload; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.ProfilePublicKey; + @@ -123,7 +123,7 @@ index 2d06a8f85c5e29688aa0fd4726fd576721535384..dbccbcb9b44e4efacdf53c2d161115cc DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose."); } diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index ced150fa9160310408f57e89d115de740097eaf5..b926a487791901a61862b551ce2dbfda33a1fc4e 100644 +index f7ad9f51d4fb45d41c718a97c1fad72504d0c0ad..78810048fde7fd6299cdc99634ba646755e0c41c 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -62,6 +62,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -143,7 +143,7 @@ index ced150fa9160310408f57e89d115de740097eaf5..b926a487791901a61862b551ce2dbfda + this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt(); + net.minecraft.network.FriendlyByteBuf buf = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.buffer()); + buf.writeByte(com.destroystokyo.paper.proxy.VelocityProxy.MAX_SUPPORTED_FORWARDING_VERSION); -+ net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, buf); ++ net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket.PlayerInfoChannelPayload(com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, buf)); + this.connection.send(packet1); + return; + } @@ -164,18 +164,20 @@ index ced150fa9160310408f57e89d115de740097eaf5..b926a487791901a61862b551ce2dbfda String playerName = gameprofile.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.channel.remoteAddress()).getAddress(); // Paper -@@ -367,6 +384,47 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -367,6 +384,49 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @Override public void handleCustomQueryPacket(ServerboundCustomQueryAnswerPacket packet) { + // Paper start - Velocity support + if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled && packet.transactionId() == this.velocityLoginMessageId) { -+ net.minecraft.network.FriendlyByteBuf buf = packet.getData(); -+ if (buf == null) { ++ ServerboundCustomQueryAnswerPacket.QueryAnswerPayload payload = (ServerboundCustomQueryAnswerPacket.QueryAnswerPayload)packet.payload(); ++ if (payload == null) { + this.disconnect("This server requires you to connect with Velocity."); + return; + } + ++ net.minecraft.network.FriendlyByteBuf buf = payload.buffer; ++ + if (!com.destroystokyo.paper.proxy.VelocityProxy.checkIntegrity(buf)) { + this.disconnect("Unable to verify player details"); + return; diff --git a/patches/server/0835-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch b/patches/server/0842-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch similarity index 92% rename from patches/server/0835-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch rename to patches/server/0842-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch index be787c2d6a..02c71ad921 100644 --- a/patches/server/0835-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch +++ b/patches/server/0842-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use thread safe random in ServerLoginPacketListenerImpl diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index b926a487791901a61862b551ce2dbfda33a1fc4e..15169964f4f5f61e88d055521c2ad361ab3caf7e 100644 +index 78810048fde7fd6299cdc99634ba646755e0c41c..ff2dd53e9e943aa929188fd9d4c35498b78c497a 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -50,6 +50,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/server/0836-Add-NamespacedKey-biome-methods.patch b/patches/server/0843-Add-NamespacedKey-biome-methods.patch similarity index 100% rename from patches/server/0836-Add-NamespacedKey-biome-methods.patch rename to patches/server/0843-Add-NamespacedKey-biome-methods.patch diff --git a/patches/server/0837-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0844-Fix-plugin-loggers-on-server-shutdown.patch similarity index 96% rename from patches/server/0837-Fix-plugin-loggers-on-server-shutdown.patch rename to patches/server/0844-Fix-plugin-loggers-on-server-shutdown.patch index 5cdae05723..b4dc775c2f 100644 --- a/patches/server/0837-Fix-plugin-loggers-on-server-shutdown.patch +++ b/patches/server/0844-Fix-plugin-loggers-on-server-shutdown.patch @@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a90c0abadfb5195ff69305c2efa99af839e94c71..fd39dee91754137b7a52f06a03644f00e22bb8ef 100644 +index dd05048c5c9c37002708f0eee4e4fa0f6d86834c..b5ffa564cf6389b6af281ecf12b8daa139861608 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -980,6 +980,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> { diff --git a/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0858-Remove-unnecessary-onTrackingStart-during-navigation.patch similarity index 87% rename from patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch rename to patches/server/0858-Remove-unnecessary-onTrackingStart-during-navigation.patch index 0add81806c..7e34979e08 100644 --- a/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch +++ b/patches/server/0858-Remove-unnecessary-onTrackingStart-during-navigation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 880969b3db018fdd8bf3c35a2521140aca7ad8ba..0df3b3a1683ebe6123520c59550c02c67c32d20a 100644 +index 57ae7df11ce3159a014b73eca322136665660bd5..1324b69f5ac1571652f287d4542031dfdf35b36d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2559,7 +2559,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2587,7 +2587,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; @@ -17,7 +17,7 @@ index 880969b3db018fdd8bf3c35a2521140aca7ad8ba..0df3b3a1683ebe6123520c59550c02c6 String s = "onTrackingStart called during navigation iteration"; Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration")); -@@ -2644,7 +2644,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2672,7 +2672,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; diff --git a/patches/server/0852-Fix-custom-piglin-loved-items.patch b/patches/server/0859-Fix-custom-piglin-loved-items.patch similarity index 100% rename from patches/server/0852-Fix-custom-piglin-loved-items.patch rename to patches/server/0859-Fix-custom-piglin-loved-items.patch diff --git a/patches/server/0853-EntityPickupItemEvent-fixes.patch b/patches/server/0860-EntityPickupItemEvent-fixes.patch similarity index 100% rename from patches/server/0853-EntityPickupItemEvent-fixes.patch rename to patches/server/0860-EntityPickupItemEvent-fixes.patch diff --git a/patches/server/0854-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0861-Correctly-handle-interactions-with-items-on-cooldown.patch similarity index 100% rename from patches/server/0854-Correctly-handle-interactions-with-items-on-cooldown.patch rename to patches/server/0861-Correctly-handle-interactions-with-items-on-cooldown.patch diff --git a/patches/server/0855-Add-PlayerInventorySlotChangeEvent.patch b/patches/server/0862-Add-PlayerInventorySlotChangeEvent.patch similarity index 100% rename from patches/server/0855-Add-PlayerInventorySlotChangeEvent.patch rename to patches/server/0862-Add-PlayerInventorySlotChangeEvent.patch diff --git a/patches/server/0856-Elder-Guardian-appearance-API.patch b/patches/server/0863-Elder-Guardian-appearance-API.patch similarity index 100% rename from patches/server/0856-Elder-Guardian-appearance-API.patch rename to patches/server/0863-Elder-Guardian-appearance-API.patch diff --git a/patches/server/0857-Allow-changing-bed-s-occupied-property.patch b/patches/server/0864-Allow-changing-bed-s-occupied-property.patch similarity index 100% rename from patches/server/0857-Allow-changing-bed-s-occupied-property.patch rename to patches/server/0864-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/server/0858-Add-entity-knockback-API.patch b/patches/server/0865-Add-entity-knockback-API.patch similarity index 100% rename from patches/server/0858-Add-entity-knockback-API.patch rename to patches/server/0865-Add-entity-knockback-API.patch diff --git a/patches/server/0859-Detect-headless-JREs.patch b/patches/server/0866-Detect-headless-JREs.patch similarity index 100% rename from patches/server/0859-Detect-headless-JREs.patch rename to patches/server/0866-Detect-headless-JREs.patch diff --git a/patches/server/0860-fixed-entity-vehicle-collision-event-not-called.patch b/patches/server/0867-fixed-entity-vehicle-collision-event-not-called.patch similarity index 100% rename from patches/server/0860-fixed-entity-vehicle-collision-event-not-called.patch rename to patches/server/0867-fixed-entity-vehicle-collision-event-not-called.patch diff --git a/patches/server/0861-optimized-dirt-and-snow-spreading.patch b/patches/server/0868-optimized-dirt-and-snow-spreading.patch similarity index 100% rename from patches/server/0861-optimized-dirt-and-snow-spreading.patch rename to patches/server/0868-optimized-dirt-and-snow-spreading.patch diff --git a/patches/server/0862-Added-EntityToggleSitEvent.patch b/patches/server/0869-Added-EntityToggleSitEvent.patch similarity index 100% rename from patches/server/0862-Added-EntityToggleSitEvent.patch rename to patches/server/0869-Added-EntityToggleSitEvent.patch diff --git a/patches/server/0863-Add-fire-tick-delay-option.patch b/patches/server/0870-Add-fire-tick-delay-option.patch similarity index 100% rename from patches/server/0863-Add-fire-tick-delay-option.patch rename to patches/server/0870-Add-fire-tick-delay-option.patch diff --git a/patches/server/0864-Add-Moving-Piston-API.patch b/patches/server/0871-Add-Moving-Piston-API.patch similarity index 100% rename from patches/server/0864-Add-Moving-Piston-API.patch rename to patches/server/0871-Add-Moving-Piston-API.patch diff --git a/patches/server/0865-Ignore-impossible-spawn-tick.patch b/patches/server/0872-Ignore-impossible-spawn-tick.patch similarity index 100% rename from patches/server/0865-Ignore-impossible-spawn-tick.patch rename to patches/server/0872-Ignore-impossible-spawn-tick.patch diff --git a/patches/server/0866-Track-projectile-source-for-fireworks-from-dispenser.patch b/patches/server/0873-Track-projectile-source-for-fireworks-from-dispenser.patch similarity index 100% rename from patches/server/0866-Track-projectile-source-for-fireworks-from-dispenser.patch rename to patches/server/0873-Track-projectile-source-for-fireworks-from-dispenser.patch diff --git a/patches/server/0867-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0874-Fix-EntityArgument-suggestion-permissions-to-align-w.patch similarity index 100% rename from patches/server/0867-Fix-EntityArgument-suggestion-permissions-to-align-w.patch rename to patches/server/0874-Fix-EntityArgument-suggestion-permissions-to-align-w.patch diff --git a/patches/server/0868-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0875-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch similarity index 91% rename from patches/server/0868-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch rename to patches/server/0875-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch index 7885ac68f3..ccfe74aebd 100644 --- a/patches/server/0868-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch +++ b/patches/server/0875-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e6356b1400030f9c288b0bf33ac7a7371913815f..026e06476e4da489f3d5ad9d1595f06fb3428682 100644 +index 973b23d91de6e3bbdc3a9e9c69652d912bd47d06..5c82e2ceeb3c0a3bec441d988e730fff0e934f42 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3252,6 +3252,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3294,6 +3294,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { pluginManager.callEvent(entityCombustEvent); if (!entityCombustEvent.isCancelled()) { this.setSecondsOnFire(entityCombustEvent.getDuration(), false); diff --git a/patches/server/0869-Prevent-compass-from-loading-chunks.patch b/patches/server/0876-Prevent-compass-from-loading-chunks.patch similarity index 100% rename from patches/server/0869-Prevent-compass-from-loading-chunks.patch rename to patches/server/0876-Prevent-compass-from-loading-chunks.patch diff --git a/patches/server/0870-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0877-Add-PrePlayerAttackEntityEvent.patch similarity index 100% rename from patches/server/0870-Add-PrePlayerAttackEntityEvent.patch rename to patches/server/0877-Add-PrePlayerAttackEntityEvent.patch diff --git a/patches/server/0871-ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/0878-ensure-reset-EnderDragon-boss-event-name.patch similarity index 100% rename from patches/server/0871-ensure-reset-EnderDragon-boss-event-name.patch rename to patches/server/0878-ensure-reset-EnderDragon-boss-event-name.patch diff --git a/patches/server/0872-fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/server/0879-fix-MC-252817-green-map-markers-do-not-disappear.patch similarity index 100% rename from patches/server/0872-fix-MC-252817-green-map-markers-do-not-disappear.patch rename to patches/server/0879-fix-MC-252817-green-map-markers-do-not-disappear.patch diff --git a/patches/server/0873-Add-Player-Warden-Warning-API.patch b/patches/server/0880-Add-Player-Warden-Warning-API.patch similarity index 100% rename from patches/server/0873-Add-Player-Warden-Warning-API.patch rename to patches/server/0880-Add-Player-Warden-Warning-API.patch diff --git a/patches/server/0874-More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/0881-More-vanilla-friendly-methods-to-update-trades.patch similarity index 100% rename from patches/server/0874-More-vanilla-friendly-methods-to-update-trades.patch rename to patches/server/0881-More-vanilla-friendly-methods-to-update-trades.patch diff --git a/patches/server/0875-Add-paper-dumplisteners-command.patch b/patches/server/0882-Add-paper-dumplisteners-command.patch similarity index 100% rename from patches/server/0875-Add-paper-dumplisteners-command.patch rename to patches/server/0882-Add-paper-dumplisteners-command.patch diff --git a/patches/server/0876-check-global-player-list-where-appropriate.patch b/patches/server/0883-check-global-player-list-where-appropriate.patch similarity index 96% rename from patches/server/0876-check-global-player-list-where-appropriate.patch rename to patches/server/0883-check-global-player-list-where-appropriate.patch index 9926a025cd..411e89182b 100644 --- a/patches/server/0876-check-global-player-list-where-appropriate.patch +++ b/patches/server/0883-check-global-player-list-where-appropriate.patch @@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player instead of just checking players in their world. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0df3b3a1683ebe6123520c59550c02c67c32d20a..6ecc40a786d431838af4e865e23bcf1bab84fc78 100644 +index 1324b69f5ac1571652f287d4542031dfdf35b36d..a0e61d3a61861cedaef87e8116a40113cf1f9891 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2681,4 +2681,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2709,4 +2709,12 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::move); } } diff --git a/patches/server/0877-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0884-Fix-async-entity-add-due-to-fungus-trees.patch similarity index 100% rename from patches/server/0877-Fix-async-entity-add-due-to-fungus-trees.patch rename to patches/server/0884-Fix-async-entity-add-due-to-fungus-trees.patch diff --git a/patches/server/0878-ItemStack-damage-API.patch b/patches/server/0885-ItemStack-damage-API.patch similarity index 100% rename from patches/server/0878-ItemStack-damage-API.patch rename to patches/server/0885-ItemStack-damage-API.patch diff --git a/patches/server/0879-Friction-API.patch b/patches/server/0886-Friction-API.patch similarity index 100% rename from patches/server/0879-Friction-API.patch rename to patches/server/0886-Friction-API.patch diff --git a/patches/server/0880-Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/0887-Ability-to-control-player-s-insomnia-and-phantoms.patch similarity index 100% rename from patches/server/0880-Ability-to-control-player-s-insomnia-and-phantoms.patch rename to patches/server/0887-Ability-to-control-player-s-insomnia-and-phantoms.patch diff --git a/patches/server/0881-Fix-player-kick-on-shutdown.patch b/patches/server/0888-Fix-player-kick-on-shutdown.patch similarity index 81% rename from patches/server/0881-Fix-player-kick-on-shutdown.patch rename to patches/server/0888-Fix-player-kick-on-shutdown.patch index dd1ed741f8..f5de61909f 100644 --- a/patches/server/0881-Fix-player-kick-on-shutdown.patch +++ b/patches/server/0888-Fix-player-kick-on-shutdown.patch @@ -9,15 +9,15 @@ also check if all packets are ignored during the shutdown process. See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable) diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 047fc7206131e0f36ab45d04e98b7a235431e342..ae052902ccaa0959882be26bbe2f3c93bfd463d2 100644 +index 6ac03dee902051a26493dba468d6a2f5cecfe066..9a49f5271ec1d9de17632bfffe8309cb1ba0d8b1 100644 --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -@@ -25,7 +25,7 @@ public class PacketUtils { +@@ -43,7 +43,7 @@ public class PacketUtils { public static void ensureRunningOnSameThread(Packet packet, T listener, BlockableEventLoop engine) throws RunningOnDifferentThreadException { if (!engine.isSameThread()) { - engine.executeIfPossible(() -> { + engine.execute(() -> { // Paper - Fix preemptive player kick on a server shutdown. + packetProcessing.push(listener); // Paper - detailed watchdog information + try { // Paper - detailed watchdog information if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590 - if (listener.shouldHandleMessage(packet)) { - co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings diff --git a/patches/server/0882-Sync-offhand-slot-in-menus.patch b/patches/server/0889-Sync-offhand-slot-in-menus.patch similarity index 100% rename from patches/server/0882-Sync-offhand-slot-in-menus.patch rename to patches/server/0889-Sync-offhand-slot-in-menus.patch diff --git a/patches/server/0883-Player-Entity-Tracking-Events.patch b/patches/server/0890-Player-Entity-Tracking-Events.patch similarity index 94% rename from patches/server/0883-Player-Entity-Tracking-Events.patch rename to patches/server/0890-Player-Entity-Tracking-Events.patch index dab3d66e0d..4427e68f26 100644 --- a/patches/server/0883-Player-Entity-Tracking-Events.patch +++ b/patches/server/0890-Player-Entity-Tracking-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player Entity Tracking Events diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 7887e3c725ce45fd2e2d6d3fd3a8ff12930cc722..85ae57e8f58fe5c28322d5d986452baf4457a95c 100644 +index 8cda789284a30dab012bfda8f97409bdde861c7e..3d5f992c2f4a8df1cf0db1c209e2cce19e214b8a 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1282,9 +1282,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0884-Limit-pet-look-distance.patch b/patches/server/0891-Limit-pet-look-distance.patch similarity index 100% rename from patches/server/0884-Limit-pet-look-distance.patch rename to patches/server/0891-Limit-pet-look-distance.patch diff --git a/patches/server/0885-Properly-resend-entities.patch b/patches/server/0892-Properly-resend-entities.patch similarity index 98% rename from patches/server/0885-Properly-resend-entities.patch rename to patches/server/0892-Properly-resend-entities.patch index c760c1bd39..fb9ebfe962 100644 --- a/patches/server/0885-Properly-resend-entities.patch +++ b/patches/server/0892-Properly-resend-entities.patch @@ -95,7 +95,7 @@ index df6be8a358052c3305efdbf2704433b74ffc3a0f..aee557c408a914d8213e2e6a92838c50 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 446b77a31c1cd40449b80cfeefd1339d7f60a771..34e1f6399f78a7e507f1e73b535c5fb2eec77ebb 100644 +index 6b114f553759d60c55805dff0769ddf0cf7241ee..e53073d09343e29255f59e1e20fc36d7e7ad6171 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -357,7 +357,7 @@ public abstract class PlayerList { diff --git a/patches/server/0886-Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/0893-Fixes-and-additions-to-the-SpawnReason-API.patch similarity index 98% rename from patches/server/0886-Fixes-and-additions-to-the-SpawnReason-API.patch rename to patches/server/0893-Fixes-and-additions-to-the-SpawnReason-API.patch index f13dac0c4e..2e8a508b26 100644 --- a/patches/server/0886-Fixes-and-additions-to-the-SpawnReason-API.patch +++ b/patches/server/0893-Fixes-and-additions-to-the-SpawnReason-API.patch @@ -8,7 +8,7 @@ Fixes some wrong reasons, and adds missing spawn reasons for entities. Co-authored-by: Doc diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 5981b2bd5745ac32cdb377c15c4384d074a47680..0d38fe5a88af0afce85b8be7051d0e2f43f0ac34 100644 +index b1a5f160f5bd4da271f212f02c3c977a5e576b99..e6cddde3e5b87d114cda5d4c6de5f71ee96e933d 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java @@ -349,7 +349,7 @@ public class EntityType implements FeatureElement, EntityTypeT diff --git a/patches/server/0887-fix-Instruments.patch b/patches/server/0894-fix-Instruments.patch similarity index 100% rename from patches/server/0887-fix-Instruments.patch rename to patches/server/0894-fix-Instruments.patch diff --git a/patches/server/0888-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0895-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch similarity index 100% rename from patches/server/0888-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch rename to patches/server/0895-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch diff --git a/patches/server/0889-Fix-inconsistencies-in-dispense-events-regarding-sta.patch b/patches/server/0896-Fix-inconsistencies-in-dispense-events-regarding-sta.patch similarity index 100% rename from patches/server/0889-Fix-inconsistencies-in-dispense-events-regarding-sta.patch rename to patches/server/0896-Fix-inconsistencies-in-dispense-events-regarding-sta.patch diff --git a/patches/server/0890-Add-BlockLockCheckEvent.patch b/patches/server/0897-Add-BlockLockCheckEvent.patch similarity index 100% rename from patches/server/0890-Add-BlockLockCheckEvent.patch rename to patches/server/0897-Add-BlockLockCheckEvent.patch diff --git a/patches/server/0891-Add-Sneaking-API-for-Entities.patch b/patches/server/0898-Add-Sneaking-API-for-Entities.patch similarity index 100% rename from patches/server/0891-Add-Sneaking-API-for-Entities.patch rename to patches/server/0898-Add-Sneaking-API-for-Entities.patch diff --git a/patches/server/0892-Improve-logging-and-errors.patch b/patches/server/0899-Improve-logging-and-errors.patch similarity index 100% rename from patches/server/0892-Improve-logging-and-errors.patch rename to patches/server/0899-Improve-logging-and-errors.patch diff --git a/patches/server/0893-Improve-PortalEvents.patch b/patches/server/0900-Improve-PortalEvents.patch similarity index 89% rename from patches/server/0893-Improve-PortalEvents.patch rename to patches/server/0900-Improve-PortalEvents.patch index 806b319fba..3c6769ae28 100644 --- a/patches/server/0893-Improve-PortalEvents.patch +++ b/patches/server/0900-Improve-PortalEvents.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 026e06476e4da489f3d5ad9d1595f06fb3428682..cb618238da529dbf5aeab54e4b26cac111a9b120 100644 +index 5c82e2ceeb3c0a3bec441d988e730fff0e934f42..d173703fe775eb064f8e1889403297931f1cf371 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3635,7 +3635,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3677,7 +3677,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { Location enter = bukkitEntity.getLocation(); Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld()); diff --git a/patches/server/0894-Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/0901-Add-config-option-for-spider-worldborder-climbing.patch similarity index 93% rename from patches/server/0894-Add-config-option-for-spider-worldborder-climbing.patch rename to patches/server/0901-Add-config-option-for-spider-worldborder-climbing.patch index 2b34b4856e..23130d1045 100644 --- a/patches/server/0894-Add-config-option-for-spider-worldborder-climbing.patch +++ b/patches/server/0901-Add-config-option-for-spider-worldborder-climbing.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add config option for spider worldborder climbing diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cb618238da529dbf5aeab54e4b26cac111a9b120..4e764cd56b309f23baf7aef9b0f2022d33d22f51 100644 +index d173703fe775eb064f8e1889403297931f1cf371..52778a4fda0fa1850a95c4944b35da1527efabfc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -402,6 +402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -16,7 +16,7 @@ index cb618238da529dbf5aeab54e4b26cac111a9b120..4e764cd56b309f23baf7aef9b0f2022d public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -1394,7 +1395,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1436,7 +1437,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { io.papermc.paper.util.CollisionUtil.getCollisions(world, this, collisionBox, potentialCollisions, false, this.level.paperConfig().chunks.preventMovingIntoUnloadedChunks, false, false, null, null); diff --git a/patches/server/0895-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0902-Add-missing-SpigotConfig-logCommands-check.patch similarity index 100% rename from patches/server/0895-Add-missing-SpigotConfig-logCommands-check.patch rename to patches/server/0902-Add-missing-SpigotConfig-logCommands-check.patch diff --git a/patches/server/0896-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/0903-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch similarity index 100% rename from patches/server/0896-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch rename to patches/server/0903-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch diff --git a/patches/server/0897-Flying-Fall-Damage.patch b/patches/server/0904-Flying-Fall-Damage.patch similarity index 100% rename from patches/server/0897-Flying-Fall-Damage.patch rename to patches/server/0904-Flying-Fall-Damage.patch diff --git a/patches/server/0898-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/0905-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch similarity index 100% rename from patches/server/0898-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch rename to patches/server/0905-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch diff --git a/patches/server/0899-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0906-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch similarity index 86% rename from patches/server/0899-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to patches/server/0906-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch index be45916461..5ad1376ca9 100644 --- a/patches/server/0899-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch +++ b/patches/server/0906-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose pre-collision moving velocity to diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4e764cd56b309f23baf7aef9b0f2022d33d22f51..2e99b06e1f3992853694dc867ec0af9fc623f7f1 100644 +index 52778a4fda0fa1850a95c4944b35da1527efabfc..01bbce773adc1a4c1720a43250de825d83a89da4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1088,7 +1088,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1123,7 +1123,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } if (!bl.getType().isAir()) { diff --git a/patches/server/0900-config-for-disabling-entity-tag-tags.patch b/patches/server/0907-config-for-disabling-entity-tag-tags.patch similarity index 93% rename from patches/server/0900-config-for-disabling-entity-tag-tags.patch rename to patches/server/0907-config-for-disabling-entity-tag-tags.patch index a8c5b3040b..acdda06756 100644 --- a/patches/server/0900-config-for-disabling-entity-tag-tags.patch +++ b/patches/server/0907-config-for-disabling-entity-tag-tags.patch @@ -5,7 +5,7 @@ Subject: [PATCH] config for disabling entity tag tags diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 0d38fe5a88af0afce85b8be7051d0e2f43f0ac34..ee3db367162ce075ff420fd724484a8593da0fe7 100644 +index e6cddde3e5b87d114cda5d4c6de5f71ee96e933d..73871f456a85bda1e51f54986d0e61fb629822e8 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java @@ -493,6 +493,13 @@ public class EntityType implements FeatureElement, EntityTypeT diff --git a/patches/server/0901-Use-single-player-info-update-packet-on-join.patch b/patches/server/0908-Use-single-player-info-update-packet-on-join.patch similarity index 97% rename from patches/server/0901-Use-single-player-info-update-packet-on-join.patch rename to patches/server/0908-Use-single-player-info-update-packet-on-join.patch index 548fddb9d3..3a6836a667 100644 --- a/patches/server/0901-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0908-Use-single-player-info-update-packet-on-join.patch @@ -18,7 +18,7 @@ index be6245a1b01cb76641d31f33e2edeb7b815fae6a..7abada5b8b6b92f998154b6cb9851c4d }); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 34e1f6399f78a7e507f1e73b535c5fb2eec77ebb..178ad4c574de4fb509e313e32f69a59723512d8a 100644 +index e53073d09343e29255f59e1e20fc36d7e7ad6171..4cbb35cac2736c80cba2a72649c485a3ea8e920b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -339,6 +339,7 @@ public abstract class PlayerList { diff --git a/patches/server/0902-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0909-Correctly-shrink-items-during-EntityResurrectEvent.patch similarity index 100% rename from patches/server/0902-Correctly-shrink-items-during-EntityResurrectEvent.patch rename to patches/server/0909-Correctly-shrink-items-during-EntityResurrectEvent.patch diff --git a/patches/server/0903-Win-Screen-API.patch b/patches/server/0910-Win-Screen-API.patch similarity index 100% rename from patches/server/0903-Win-Screen-API.patch rename to patches/server/0910-Win-Screen-API.patch diff --git a/patches/server/0904-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0911-Remove-CraftItemStack-setAmount-null-assignment.patch similarity index 100% rename from patches/server/0904-Remove-CraftItemStack-setAmount-null-assignment.patch rename to patches/server/0911-Remove-CraftItemStack-setAmount-null-assignment.patch diff --git a/patches/server/0905-Fix-force-opening-enchantment-tables.patch b/patches/server/0912-Fix-force-opening-enchantment-tables.patch similarity index 100% rename from patches/server/0905-Fix-force-opening-enchantment-tables.patch rename to patches/server/0912-Fix-force-opening-enchantment-tables.patch diff --git a/patches/server/0906-Add-Entity-Body-Yaw-API.patch b/patches/server/0913-Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/server/0906-Add-Entity-Body-Yaw-API.patch rename to patches/server/0913-Add-Entity-Body-Yaw-API.patch diff --git a/patches/server/0907-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/0914-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch similarity index 100% rename from patches/server/0907-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch rename to patches/server/0914-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch diff --git a/patches/server/0908-Update-the-flag-when-a-captured-block-state-is-outda.patch b/patches/server/0915-Update-the-flag-when-a-captured-block-state-is-outda.patch similarity index 90% rename from patches/server/0908-Update-the-flag-when-a-captured-block-state-is-outda.patch rename to patches/server/0915-Update-the-flag-when-a-captured-block-state-is-outda.patch index 20753d800a..116fb20fed 100644 --- a/patches/server/0908-Update-the-flag-when-a-captured-block-state-is-outda.patch +++ b/patches/server/0915-Update-the-flag-when-a-captured-block-state-is-outda.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Update the flag when a captured block state is outdated diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 3a2ad20ab45bebebd4bce8b17e902f704f748338..70b473bfebd387a958ed0766cb87ac5f39450d37 100644 +index ed6e1bb540138e7c83df51cfd5c52dcc87fca076..49417e67ff27b77955e73908886d0a0ce3a44644 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -550,6 +550,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0909-Add-EntityFertilizeEggEvent.patch b/patches/server/0916-Add-EntityFertilizeEggEvent.patch similarity index 100% rename from patches/server/0909-Add-EntityFertilizeEggEvent.patch rename to patches/server/0916-Add-EntityFertilizeEggEvent.patch diff --git a/patches/server/0910-Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/0917-Fix-HumanEntity-drop-not-updating-the-client-inv.patch similarity index 100% rename from patches/server/0910-Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to patches/server/0917-Fix-HumanEntity-drop-not-updating-the-client-inv.patch diff --git a/patches/server/0911-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0918-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/server/0911-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/server/0918-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/server/0912-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0919-Correctly-handle-ArmorStand-invisibility.patch similarity index 100% rename from patches/server/0912-Correctly-handle-ArmorStand-invisibility.patch rename to patches/server/0919-Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/server/0913-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0920-Fix-advancement-triggers-for-entity-damage.patch similarity index 100% rename from patches/server/0913-Fix-advancement-triggers-for-entity-damage.patch rename to patches/server/0920-Fix-advancement-triggers-for-entity-damage.patch diff --git a/patches/server/0914-Fix-text-display-error-on-spawn.patch b/patches/server/0921-Fix-text-display-error-on-spawn.patch similarity index 100% rename from patches/server/0914-Fix-text-display-error-on-spawn.patch rename to patches/server/0921-Fix-text-display-error-on-spawn.patch diff --git a/patches/server/0915-Fix-certain-inventories-returning-null-Locations.patch b/patches/server/0922-Fix-certain-inventories-returning-null-Locations.patch similarity index 100% rename from patches/server/0915-Fix-certain-inventories-returning-null-Locations.patch rename to patches/server/0922-Fix-certain-inventories-returning-null-Locations.patch diff --git a/patches/server/0916-Add-Shearable-API.patch b/patches/server/0923-Add-Shearable-API.patch similarity index 97% rename from patches/server/0916-Add-Shearable-API.patch rename to patches/server/0923-Add-Shearable-API.patch index 7fe688ee70..dbb764b5e7 100644 --- a/patches/server/0916-Add-Shearable-API.patch +++ b/patches/server/0923-Add-Shearable-API.patch @@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..bcf254e3c81cf1e401bddc850fb24ad2 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index 3e0049c2442c5941e02da0b0fb643784746cb2a1..1efc208dbb00b693de0c1d883e90b310cbf253e7 100644 +index 7d9b8968334e536457b29be196545a1f4e312a83..efecddaa165decac6e0958b202ad838405220627 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.CraftServer; diff --git a/patches/server/0917-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0924-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/server/0917-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/server/0924-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/server/0918-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch b/patches/server/0925-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch similarity index 100% rename from patches/server/0918-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch rename to patches/server/0925-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch diff --git a/patches/server/0919-Optimize-Hoppers.patch b/patches/server/0926-Optimize-Hoppers.patch similarity index 99% rename from patches/server/0919-Optimize-Hoppers.patch rename to patches/server/0926-Optimize-Hoppers.patch index b2a8761704..cc41e78d40 100644 --- a/patches/server/0919-Optimize-Hoppers.patch +++ b/patches/server/0926-Optimize-Hoppers.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fd39dee91754137b7a52f06a03644f00e22bb8ef..f1ba2f3fa8488dadd59cc2f8f2acc5d86981efdd 100644 +index b5ffa564cf6389b6af281ecf12b8daa139861608..0dbfe7e9c57e0ff52d30ccce3ae3a6af413b7aa4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1508,6 +1508,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper diff --git a/patches/server/0920-Fix-beehives-generating-from-using-bonemeal.patch b/patches/server/0927-Fix-beehives-generating-from-using-bonemeal.patch similarity index 100% rename from patches/server/0920-Fix-beehives-generating-from-using-bonemeal.patch rename to patches/server/0927-Fix-beehives-generating-from-using-bonemeal.patch diff --git a/patches/server/0921-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/0928-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch similarity index 100% rename from patches/server/0921-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to patches/server/0928-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch diff --git a/patches/server/0922-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0929-Treat-sequence-violations-like-they-should-be.patch similarity index 100% rename from patches/server/0922-Treat-sequence-violations-like-they-should-be.patch rename to patches/server/0929-Treat-sequence-violations-like-they-should-be.patch diff --git a/patches/server/0923-remove-duplicate-animate-packet-for-records.patch b/patches/server/0930-remove-duplicate-animate-packet-for-records.patch similarity index 100% rename from patches/server/0923-remove-duplicate-animate-packet-for-records.patch rename to patches/server/0930-remove-duplicate-animate-packet-for-records.patch diff --git a/patches/server/0924-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0931-Prevent-causing-expired-keys-from-impacting-new-join.patch similarity index 100% rename from patches/server/0924-Prevent-causing-expired-keys-from-impacting-new-join.patch rename to patches/server/0931-Prevent-causing-expired-keys-from-impacting-new-join.patch diff --git a/patches/server/0925-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0932-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch similarity index 84% rename from patches/server/0925-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch rename to patches/server/0932-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch index 4691d5a2ea..06cbfe418c 100644 --- a/patches/server/0925-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch +++ b/patches/server/0932-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6ecc40a786d431838af4e865e23bcf1bab84fc78..e8b371b735924f0c574216c388b6154b1cb50074 100644 +index a0e61d3a61861cedaef87e8116a40113cf1f9891..8cb1299d9110adc8f11e9be984ed8a4326a330cf 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1667,6 +1667,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1695,6 +1695,11 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) { diff --git a/patches/server/0926-Use-array-for-gamerule-storage.patch b/patches/server/0933-Use-array-for-gamerule-storage.patch similarity index 100% rename from patches/server/0926-Use-array-for-gamerule-storage.patch rename to patches/server/0933-Use-array-for-gamerule-storage.patch diff --git a/patches/server/0927-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0934-Fix-a-couple-of-upstream-bed-issues.patch similarity index 100% rename from patches/server/0927-Fix-a-couple-of-upstream-bed-issues.patch rename to patches/server/0934-Fix-a-couple-of-upstream-bed-issues.patch diff --git a/patches/server/0928-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0935-Fix-demo-flag-not-enabling-demo-mode.patch similarity index 100% rename from patches/server/0928-Fix-demo-flag-not-enabling-demo-mode.patch rename to patches/server/0935-Fix-demo-flag-not-enabling-demo-mode.patch diff --git a/patches/server/0929-Add-Mob-Experience-reward-API.patch b/patches/server/0936-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/server/0929-Add-Mob-Experience-reward-API.patch rename to patches/server/0936-Add-Mob-Experience-reward-API.patch diff --git a/patches/server/0930-Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/0937-Break-redstone-on-top-of-trap-doors-early.patch similarity index 100% rename from patches/server/0930-Break-redstone-on-top-of-trap-doors-early.patch rename to patches/server/0937-Break-redstone-on-top-of-trap-doors-early.patch diff --git a/patches/server/0931-Fix-DamageCause-for-Falling-Blocks.patch b/patches/server/0938-Fix-DamageCause-for-Falling-Blocks.patch similarity index 100% rename from patches/server/0931-Fix-DamageCause-for-Falling-Blocks.patch rename to patches/server/0938-Fix-DamageCause-for-Falling-Blocks.patch diff --git a/patches/server/0932-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0939-Avoid-Lazy-Initialization-for-Enum-Fields.patch similarity index 100% rename from patches/server/0932-Avoid-Lazy-Initialization-for-Enum-Fields.patch rename to patches/server/0939-Avoid-Lazy-Initialization-for-Enum-Fields.patch diff --git a/patches/server/0933-More-accurate-isInOpenWater-impl.patch b/patches/server/0940-More-accurate-isInOpenWater-impl.patch similarity index 100% rename from patches/server/0933-More-accurate-isInOpenWater-impl.patch rename to patches/server/0940-More-accurate-isInOpenWater-impl.patch diff --git a/patches/server/0934-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch b/patches/server/0941-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch similarity index 100% rename from patches/server/0934-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch rename to patches/server/0941-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch diff --git a/patches/server/0935-Optimise-recalcBlockCounts-for-empty-sections.patch b/patches/server/0942-Optimise-recalcBlockCounts-for-empty-sections.patch similarity index 100% rename from patches/server/0935-Optimise-recalcBlockCounts-for-empty-sections.patch rename to patches/server/0942-Optimise-recalcBlockCounts-for-empty-sections.patch diff --git a/patches/server/0936-Expand-PlayerItemMendEvent.patch b/patches/server/0943-Expand-PlayerItemMendEvent.patch similarity index 100% rename from patches/server/0936-Expand-PlayerItemMendEvent.patch rename to patches/server/0943-Expand-PlayerItemMendEvent.patch diff --git a/patches/server/0937-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0944-Refresh-ProjectileSource-for-projectiles.patch similarity index 97% rename from patches/server/0937-Refresh-ProjectileSource-for-projectiles.patch rename to patches/server/0944-Refresh-ProjectileSource-for-projectiles.patch index 76667871ec..9ad3bf103e 100644 --- a/patches/server/0937-Refresh-ProjectileSource-for-projectiles.patch +++ b/patches/server/0944-Refresh-ProjectileSource-for-projectiles.patch @@ -14,7 +14,7 @@ clearing the owner. Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2e99b06e1f3992853694dc867ec0af9fc623f7f1..65557c81e02faa316b9c681f84ba37d94217a65f 100644 +index 01bbce773adc1a4c1720a43250de825d83a89da4..768e243c44ed3c95339efa46827a81f0a679250d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -381,6 +381,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0938-Add-transient-modifier-API.patch b/patches/server/0945-Add-transient-modifier-API.patch similarity index 100% rename from patches/server/0938-Add-transient-modifier-API.patch rename to patches/server/0945-Add-transient-modifier-API.patch diff --git a/patches/server/0939-Fix-block-place-logic.patch b/patches/server/0946-Fix-block-place-logic.patch similarity index 97% rename from patches/server/0939-Fix-block-place-logic.patch rename to patches/server/0946-Fix-block-place-logic.patch index 8fc67ee6e8..bc43b624e5 100644 --- a/patches/server/0939-Fix-block-place-logic.patch +++ b/patches/server/0946-Fix-block-place-logic.patch @@ -41,7 +41,7 @@ index 08464c7f114a04169c9ddeceef936749952770e6..62fc1b110ec319bb91aa0639b18aa354 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 70b473bfebd387a958ed0766cb87ac5f39450d37..f67f5cef69621e0baf9b4ba157993d97e431f3d1 100644 +index 49417e67ff27b77955e73908886d0a0ce3a44644..aa21c3b9ac5101d0c2150baf2c259ed247e94349 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -664,17 +664,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0940-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0947-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch similarity index 100% rename from patches/server/0940-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch rename to patches/server/0947-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch diff --git a/patches/server/0941-Ignore-inline-definitions-of-trim-material-pattern.patch b/patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch similarity index 100% rename from patches/server/0941-Ignore-inline-definitions-of-trim-material-pattern.patch rename to patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch diff --git a/patches/server/0942-Call-BlockGrowEvent-for-missing-blocks.patch b/patches/server/0949-Call-BlockGrowEvent-for-missing-blocks.patch similarity index 100% rename from patches/server/0942-Call-BlockGrowEvent-for-missing-blocks.patch rename to patches/server/0949-Call-BlockGrowEvent-for-missing-blocks.patch diff --git a/patches/server/0943-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0950-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch similarity index 100% rename from patches/server/0943-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch rename to patches/server/0950-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch diff --git a/patches/server/0944-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0951-fix-MapLike-spam-for-missing-key-selector.patch similarity index 100% rename from patches/server/0944-fix-MapLike-spam-for-missing-key-selector.patch rename to patches/server/0951-fix-MapLike-spam-for-missing-key-selector.patch diff --git a/patches/server/0945-Fix-sniffer-removeExploredLocation.patch b/patches/server/0952-Fix-sniffer-removeExploredLocation.patch similarity index 100% rename from patches/server/0945-Fix-sniffer-removeExploredLocation.patch rename to patches/server/0952-Fix-sniffer-removeExploredLocation.patch diff --git a/patches/server/0946-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0953-Add-method-to-remove-all-active-potion-effects.patch similarity index 100% rename from patches/server/0946-Add-method-to-remove-all-active-potion-effects.patch rename to patches/server/0953-Add-method-to-remove-all-active-potion-effects.patch diff --git a/patches/server/0947-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch b/patches/server/0954-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch similarity index 100% rename from patches/server/0947-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch rename to patches/server/0954-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch diff --git a/patches/server/0948-Fix-incorrect-crafting-result-amount-for-fireworks.patch b/patches/server/0955-Fix-incorrect-crafting-result-amount-for-fireworks.patch similarity index 100% rename from patches/server/0948-Fix-incorrect-crafting-result-amount-for-fireworks.patch rename to patches/server/0955-Fix-incorrect-crafting-result-amount-for-fireworks.patch diff --git a/patches/server/0949-Properly-Cancel-Usable-Items.patch b/patches/server/0956-Properly-Cancel-Usable-Items.patch similarity index 100% rename from patches/server/0949-Properly-Cancel-Usable-Items.patch rename to patches/server/0956-Properly-Cancel-Usable-Items.patch diff --git a/patches/server/0950-Add-event-for-player-editing-sign.patch b/patches/server/0957-Add-event-for-player-editing-sign.patch similarity index 100% rename from patches/server/0950-Add-event-for-player-editing-sign.patch rename to patches/server/0957-Add-event-for-player-editing-sign.patch diff --git a/patches/server/0951-Only-tick-item-frames-if-players-can-see-it.patch b/patches/server/0958-Only-tick-item-frames-if-players-can-see-it.patch similarity index 100% rename from patches/server/0951-Only-tick-item-frames-if-players-can-see-it.patch rename to patches/server/0958-Only-tick-item-frames-if-players-can-see-it.patch diff --git a/patches/server/0952-Improve-command-function-perm-level-checks.patch b/patches/server/0959-Improve-command-function-perm-level-checks.patch similarity index 100% rename from patches/server/0952-Improve-command-function-perm-level-checks.patch rename to patches/server/0959-Improve-command-function-perm-level-checks.patch diff --git a/patches/server/0953-Add-option-to-disable-block-updates.patch b/patches/server/0960-Add-option-to-disable-block-updates.patch similarity index 100% rename from patches/server/0953-Add-option-to-disable-block-updates.patch rename to patches/server/0960-Add-option-to-disable-block-updates.patch diff --git a/patches/server/0954-Call-missing-BlockDispenseEvent.patch b/patches/server/0961-Call-missing-BlockDispenseEvent.patch similarity index 100% rename from patches/server/0954-Call-missing-BlockDispenseEvent.patch rename to patches/server/0961-Call-missing-BlockDispenseEvent.patch diff --git a/patches/server/0955-Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/0962-Don-t-load-chunks-for-supporting-block-checks.patch similarity index 84% rename from patches/server/0955-Don-t-load-chunks-for-supporting-block-checks.patch rename to patches/server/0962-Don-t-load-chunks-for-supporting-block-checks.patch index 24c268f2a9..2261351d16 100644 --- a/patches/server/0955-Don-t-load-chunks-for-supporting-block-checks.patch +++ b/patches/server/0962-Don-t-load-chunks-for-supporting-block-checks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't load chunks for supporting block checks diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 65557c81e02faa316b9c681f84ba37d94217a65f..59914195962b45f4667ccb6afcb90de68cbe7361 100644 +index 768e243c44ed3c95339efa46827a81f0a679250d..e07be1692ecee46e0eb9188e2cf8ee1c16c6cc1c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1281,7 +1281,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1323,7 +1323,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } protected BlockPos getOnPos(float offset) { diff --git a/patches/server/0956-Optimize-player-lookups-for-beacons.patch b/patches/server/0963-Optimize-player-lookups-for-beacons.patch similarity index 71% rename from patches/server/0956-Optimize-player-lookups-for-beacons.patch rename to patches/server/0963-Optimize-player-lookups-for-beacons.patch index 4a00d5ead8..5245e38833 100644 --- a/patches/server/0956-Optimize-player-lookups-for-beacons.patch +++ b/patches/server/0963-Optimize-player-lookups-for-beacons.patch @@ -7,10 +7,10 @@ For larger ranges, it's better to iterate over the player list than the entity slices. diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 2f12a1054c9c9e311e02dc5c3244ad3688db15ba..45e3a4f09a0e515932d08f52e7d07cf8f6014fb6 100644 +index 2f12a1054c9c9e311e02dc5c3244ad3688db15ba..f13943db6f2fb923c52dcf9e8bf7000041d0a362 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -329,7 +329,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -329,7 +329,22 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name double d0 = blockEntity != null ? blockEntity.getEffectRange() : (i * 10 + 10);// Paper - custom beacon ranges AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D); @@ -20,9 +20,15 @@ index 2f12a1054c9c9e311e02dc5c3244ad3688db15ba..45e3a4f09a0e515932d08f52e7d07cf8 + if (d0 <= 128.0) { + list = world.getEntitiesOfClass(Player.class, axisalignedbb); + } else { -+ list = (List)world.getNearbyPlayers(null, (double)blockposition.getX() + 0.5, (double)blockposition.getY() + 0.5, (double)blockposition.getZ() + 0.5, -1.0, (net.minecraft.world.entity.Entity entity) -> { -+ return !entity.isSpectator() && entity.getBoundingBox().intersects(axisalignedbb); -+ }); ++ list = new java.util.ArrayList<>(); ++ for (Player player : world.players()) { ++ if (player.isSpectator()) { ++ continue; ++ } ++ if (player.getBoundingBox().intersects(axisalignedbb)) { ++ list.add(player); ++ } ++ } + } + // Paper end - optimize player lookup for beacons diff --git a/patches/server/0957-Add-Sign-getInteractableSideFor.patch b/patches/server/0964-Add-Sign-getInteractableSideFor.patch similarity index 100% rename from patches/server/0957-Add-Sign-getInteractableSideFor.patch rename to patches/server/0964-Add-Sign-getInteractableSideFor.patch diff --git a/patches/server/0958-Array-backed-synched-entity-data.patch b/patches/server/0965-Array-backed-synched-entity-data.patch similarity index 100% rename from patches/server/0958-Array-backed-synched-entity-data.patch rename to patches/server/0965-Array-backed-synched-entity-data.patch diff --git a/patches/server/0959-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0966-fix-item-meta-for-tadpole-buckets.patch similarity index 100% rename from patches/server/0959-fix-item-meta-for-tadpole-buckets.patch rename to patches/server/0966-fix-item-meta-for-tadpole-buckets.patch diff --git a/patches/server/0960-Suppress-Item-Meta-Validation-Checks.patch b/patches/server/0967-Suppress-Item-Meta-Validation-Checks.patch similarity index 100% rename from patches/server/0960-Suppress-Item-Meta-Validation-Checks.patch rename to patches/server/0967-Suppress-Item-Meta-Validation-Checks.patch diff --git a/patches/server/0961-Fix-BanList-API.patch b/patches/server/0968-Fix-BanList-API.patch similarity index 100% rename from patches/server/0961-Fix-BanList-API.patch rename to patches/server/0968-Fix-BanList-API.patch diff --git a/patches/server/0962-Determine-lava-and-water-fluid-explosion-resistance-.patch b/patches/server/0969-Determine-lava-and-water-fluid-explosion-resistance-.patch similarity index 100% rename from patches/server/0962-Determine-lava-and-water-fluid-explosion-resistance-.patch rename to patches/server/0969-Determine-lava-and-water-fluid-explosion-resistance-.patch diff --git a/patches/server/0963-Fix-possible-NPE-on-painting-creation.patch b/patches/server/0970-Fix-possible-NPE-on-painting-creation.patch similarity index 100% rename from patches/server/0963-Fix-possible-NPE-on-painting-creation.patch rename to patches/server/0970-Fix-possible-NPE-on-painting-creation.patch diff --git a/patches/server/0964-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0971-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch similarity index 100% rename from patches/server/0964-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to patches/server/0971-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch diff --git a/patches/server/0965-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0972-ExperienceOrb-should-call-EntitySpawnEvent.patch similarity index 100% rename from patches/server/0965-ExperienceOrb-should-call-EntitySpawnEvent.patch rename to patches/server/0972-ExperienceOrb-should-call-EntitySpawnEvent.patch diff --git a/patches/server/0966-Don-t-tick-signs.patch b/patches/server/0973-Don-t-tick-signs.patch similarity index 100% rename from patches/server/0966-Don-t-tick-signs.patch rename to patches/server/0973-Don-t-tick-signs.patch diff --git a/patches/server/0967-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch b/patches/server/0974-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch similarity index 100% rename from patches/server/0967-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch rename to patches/server/0974-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch diff --git a/patches/server/0968-Add-whitelist-events.patch b/patches/server/0975-Add-whitelist-events.patch similarity index 100% rename from patches/server/0968-Add-whitelist-events.patch rename to patches/server/0975-Add-whitelist-events.patch diff --git a/patches/server/0969-Implement-PlayerFailMoveEvent.patch b/patches/server/0976-Implement-PlayerFailMoveEvent.patch similarity index 100% rename from patches/server/0969-Implement-PlayerFailMoveEvent.patch rename to patches/server/0976-Implement-PlayerFailMoveEvent.patch diff --git a/patches/unapplied/server/0971-Folia-scheduler-and-owned-region-API.patch b/patches/server/0977-Folia-scheduler-and-owned-region-API.patch similarity index 98% rename from patches/unapplied/server/0971-Folia-scheduler-and-owned-region-API.patch rename to patches/server/0977-Folia-scheduler-and-owned-region-API.patch index 3ba4ace0e0..291be467b7 100644 --- a/patches/unapplied/server/0971-Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/0977-Folia-scheduler-and-owned-region-API.patch @@ -1121,10 +1121,10 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b31470c4caeb1bd29b99bfafea90bf10d714568c..67ee3a4ca8a6cdeb275653d492a1fea8037c51fb 100644 +index 0dbfe7e9c57e0ff52d30ccce3ae3a6af413b7aa4..8f0769d248c7f3cce753130147223403c7923304 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1478,6 +1478,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Fri, 30 Oct 2020 22:37:16 -0700 -Subject: [PATCH] Add packet limiter config - -Example config: -packet-limiter: - kick-message: '&cSent too many packets' - limits: - all: - interval: 7.0 - max-packet-rate: 500.0 - ServerboundPlaceRecipePacket: - interval: 4.0 - max-packet-rate: 5.0 - action: DROP - -all section refers to all incoming packets, the action for all is -hard coded to KICK. - -For specific limits, the section name is the class's name, -and an action can be defined: DROP or KICK - -If interval or rate are less-than 0, the limit is ignored - -diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 890d14503e157d6c07a6db1f180f49f81118e301..9a9924a645c71e0cec30e29a9defcd1e22e2e8ef 100644 ---- a/src/main/java/net/minecraft/network/Connection.java -+++ b/src/main/java/net/minecraft/network/Connection.java -@@ -158,6 +158,22 @@ public class Connection extends SimpleChannelInboundHandler> { - } - } - // Paper end - allow controlled flushing -+ // Paper start - packet limiter -+ protected final Object PACKET_LIMIT_LOCK = new Object(); -+ protected final @Nullable io.papermc.paper.util.IntervalledCounter allPacketCounts = io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.allPackets.isEnabled() ? new io.papermc.paper.util.IntervalledCounter( -+ (long)(io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.allPackets.interval() * 1.0e9) -+ ) : null; -+ protected final java.util.Map>, io.papermc.paper.util.IntervalledCounter> packetSpecificLimits = new java.util.HashMap<>(); -+ -+ private boolean stopReadingPackets; -+ private void killForPacketSpam() { -+ this.sendPacket(new ClientboundDisconnectPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.kickMessage)), PacketSendListener.thenRun(() -> { -+ this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.kickMessage)); -+ })); -+ this.setReadOnly(); -+ this.stopReadingPackets = true; -+ } -+ // Paper end - packet limiter - - public Connection(PacketFlow side) { - this.receiving = side; -@@ -246,6 +262,48 @@ public class Connection extends SimpleChannelInboundHandler> { - - protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet packet) { - if (this.channel.isOpen()) { -+ // Paper start - packet limiter -+ if (this.stopReadingPackets) { -+ return; -+ } -+ if (this.allPacketCounts != null || -+ io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.containsKey(packet.getClass())) { -+ long time = System.nanoTime(); -+ synchronized (PACKET_LIMIT_LOCK) { -+ if (this.allPacketCounts != null) { -+ this.allPacketCounts.updateAndAdd(1, time); -+ if (this.allPacketCounts.getRate() >= io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.allPackets.maxPacketRate()) { -+ this.killForPacketSpam(); -+ return; -+ } -+ } -+ -+ for (Class check = packet.getClass(); check != Object.class; check = check.getSuperclass()) { -+ io.papermc.paper.configuration.GlobalConfiguration.PacketLimiter.PacketLimit packetSpecificLimit = -+ io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.get(check); -+ if (packetSpecificLimit == null || !packetSpecificLimit.isEnabled()) { -+ continue; -+ } -+ io.papermc.paper.util.IntervalledCounter counter = this.packetSpecificLimits.computeIfAbsent((Class)check, (clazz) -> { -+ return new io.papermc.paper.util.IntervalledCounter((long)(packetSpecificLimit.interval() * 1.0e9)); -+ }); -+ counter.updateAndAdd(1, time); -+ if (counter.getRate() >= packetSpecificLimit.maxPacketRate()) { -+ switch (packetSpecificLimit.action()) { -+ case DROP: -+ return; -+ case KICK: -+ String deobfedPacketName = io.papermc.paper.util.ObfHelper.INSTANCE.deobfClassName(check.getName()); -+ String playerName = this.getPlayer() == null ? "Player (null)" : this.getPlayer().getName().getString(); -+ Connection.LOGGER.warn("{} kicked for packet spamming: {}", playerName, deobfedPacketName.substring(deobfedPacketName.lastIndexOf(".") + 1)); -+ this.killForPacketSpam(); -+ return; -+ } -+ } -+ } -+ } -+ } -+ // Paper end - packet limiter - try { - Connection.genericsFtw(packet, this.packetListener); - } catch (RunningOnDifferentThreadException cancelledpackethandleexception) {