Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnMuijsers committed May 11, 2023
1 parent 798ae73 commit fe9c202
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group=org.galemc.gale
version=1.19.4-R0.1-SNAPSHOT

mcVersion=1.19.4
paperRef=bcec5b11e6728f3eb3078aa4fcc8e87f3d545ec2
paperRef=688409279f45ec4e88b7c1f91dc62ce377a71caf

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)

diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b24af137664c30ab2443d334b2863f8ccc4684bb..f56dbc32851f8b47d468cf2d024d8a77992d8408 100644
index ede3879b58e195ef84efc068fe322af99a552607..7fb3d6dc94da734e685e6fecb833433fddf2e200 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2361,6 +2361,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2362,6 +2362,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}

private boolean updateChatOrder(Instant timestamp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ index fe7d1850b4b26b9a739d6805bfe85c0961f0cd0b..1f74a55093367ffb3ed8ed39d2e6d0a1
// CraftBukkit end
public boolean isRealPlayer; // Paper
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f56dbc32851f8b47d468cf2d024d8a77992d8408..6f0abe57bbc6f813b646863e46f1798c1c4dfa2d 100644
index 7fb3d6dc94da734e685e6fecb833433fddf2e200..2eb627c4cdc393b15e6b85f617c8a29efbd24985 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2338,6 +2338,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2339,6 +2339,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
this.send(new ClientboundSystemChatPacket(PaperAdventure.asAdventure(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED)), false)); // Paper - Adventure
return Optional.empty();
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0057-Do-not-log-empty-message-warnings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
Gale - https://galemc.org

diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6f0abe57bbc6f813b646863e46f1798c1c4dfa2d..a5115c9d6723cd3f8f4bc829a2111c9a050b0a58 100644
index 2eb627c4cdc393b15e6b85f617c8a29efbd24985..b255f13f3e8242b3fcfa606bb4e716602a4f2454 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -185,6 +185,7 @@ import net.minecraft.world.phys.shapes.BooleanOp;
Expand All @@ -18,7 +18,7 @@ index 6f0abe57bbc6f813b646863e46f1798c1c4dfa2d..a5115c9d6723cd3f8f4bc829a2111c9a
import org.galemc.gale.configuration.GaleGlobalConfiguration;
import org.slf4j.Logger;

@@ -2550,7 +2551,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2551,7 +2552,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// CraftBukkit start
String s = message.signedContent();
if (s.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
Gale - https://galemc.org

diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a5115c9d6723cd3f8f4bc829a2111c9a050b0a58..750850cce3d129f4b453c21fcd43a5d570805a54 100644
index b255f13f3e8242b3fcfa606bb4e716602a4f2454..98661516868c93c19866a14aeacde57793c4ea4e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2328,7 +2328,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2329,7 +2329,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic

private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
if (!this.updateChatOrder(timestamp)) {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0082-Reduce-array-allocations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ index 48adbfbb8a55f6719c92a1fe83c64d87f1b236d5..834b497053f4fa20cf94c00e1ee2db48

for (int j = 0; j < i; ++j) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ef0b765c04bfdb684d8a3aef7aa4184fafb38864..5eb689cb445c0cf8b645e543c8c3a324b1eca536 100644
index 9676d4523c14559cd13e6c53d220bf7472558d8a..288372fbf6c1e669ee16381be57120e5b569f4a4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -38,6 +38,8 @@ import java.util.stream.Collectors;
Expand Down Expand Up @@ -469,7 +469,7 @@ index ef0b765c04bfdb684d8a3aef7aa4184fafb38864..5eb689cb445c0cf8b645e543c8c3a324
return ret;
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 750850cce3d129f4b453c21fcd43a5d570805a54..a3854010434a1550d26c22c16e9978e9e5fdb3af 100644
index 98661516868c93c19866a14aeacde57793c4ea4e..4be1658c5bb8251cd6be19583139460cc1bce95c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -29,6 +29,8 @@ import java.util.function.UnaryOperator;
Expand Down Expand Up @@ -531,7 +531,7 @@ index 750850cce3d129f4b453c21fcd43a5d570805a54..a3854010434a1550d26c22c16e9978e9
return;
}
// Paper end
@@ -3294,7 +3292,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3295,7 +3293,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Paper start
if (!org.bukkit.Bukkit.isPrimaryThread()) {
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
Expand Down Expand Up @@ -827,7 +827,7 @@ index d4527b0f11893925c93b1846305fb3b17ba8e89a..b19e842be160748a6969e498952eb02f
return slices.getChunkEntities();
}
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
index ae90e86327957bb784e2d81694ee7eea288bb455..d36f554e545686487e2c5198ddb5ad1a1b61af13 100644
index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..1694b48cd979778027811e7be3c940dc473611b0 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
@@ -3,6 +3,8 @@ package net.minecraft.world.level.block;
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0117-Send-multiple-keep-alive-packets.patch
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a3854010434a1550d26c22c16e9978e9e5fdb3af..0a0c829b4884ae5bf48e652a607d04f5c094929d 100644
index 4be1658c5bb8251cd6be19583139460cc1bce95c..a8f01686eb164158e5ddff079036486347d4b021 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
Expand Down Expand Up @@ -91,7 +91,7 @@ index a3854010434a1550d26c22c16e9978e9e5fdb3af..0a0c829b4884ae5bf48e652a607d04f5
if (this.keepAlivePending) {
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info
@@ -3496,6 +3517,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3497,6 +3518,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic

@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ index 1d33c02088c150189d7f4b0aa27f6a1de96b11cf..4c8275728175ebc1fdc8d0e8d0ba8398
this.debugLogging(pos, false, sequence, "too far");
} else if (pos.getY() >= worldHeight) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 0a0c829b4884ae5bf48e652a607d04f5c094929d..a7772ffe063485865812608999e5b6daa2ecc342 100644
index a8f01686eb164158e5ddff079036486347d4b021..dbca3976f19401f67f999195ef9dad94169b4660 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -253,7 +253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Expand Down Expand Up @@ -55,7 +55,7 @@ index 0a0c829b4884ae5bf48e652a607d04f5c094929d..a7772ffe063485865812608999e5b6da
Vec3 vec3d2 = vec3d.subtract(vec3d1);
double d0 = 1.0000001D;

@@ -2820,7 +2827,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2821,7 +2828,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic

AABB axisalignedbb = entity.getBoundingBox();

Expand Down
8 changes: 4 additions & 4 deletions patches/server/0151-Base-thread-pool.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ index df4db98618c6c9261b4ec8e2987c4ed26af4bd4b..83a57b9bc59063ed8299f98bc33e14b5
public class ServerChunkCache extends ChunkSource {

diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 781f0fefe3e1ed7db92d81890e6b39ca7aa91f7a..5af506704a22f969fac91051ec09deb3c6ccc397 100644
index 0dfc703c3a1101da4b817227e2c41d467c37ae88..feeca393f960210a62740da053d21fecd62b0252 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -22,6 +22,8 @@ import java.io.Writer;
Expand Down Expand Up @@ -1474,7 +1474,7 @@ index 781f0fefe3e1ed7db92d81890e6b39ca7aa91f7a..5af506704a22f969fac91051ec09deb3
for (Object o : worldData.cache.values() )
{
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a7772ffe063485865812608999e5b6daa2ecc342..661a7c442309abbfa227cb96b6369544c82ad5b2 100644
index dbca3976f19401f67f999195ef9dad94169b4660..ce378f07b848b10a9f6559243c7ad0de312d5cb7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -187,8 +187,9 @@ import net.minecraft.world.phys.shapes.BooleanOp;
Expand Down Expand Up @@ -1593,7 +1593,7 @@ index a7772ffe063485865812608999e5b6daa2ecc342..661a7c442309abbfa227cb96b6369544
} else {
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages());

@@ -2355,9 +2353,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2356,9 +2354,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
if (!this.updateChatOrder(timestamp)) {
if (GaleGlobalConfiguration.get().logToConsole.chat.outOfOrderMessageWarning) ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper // Gale - do not log out-of-order message warnings
Expand All @@ -1606,7 +1606,7 @@ index a7772ffe063485865812608999e5b6daa2ecc342..661a7c442309abbfa227cb96b6369544
return Optional.empty();
} else {
Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(acknowledgment);
@@ -3320,7 +3318,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3321,7 +3319,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Paper start
if (!org.bukkit.Bukkit.isPrimaryThread()) {
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
Expand Down

0 comments on commit fe9c202

Please sign in to comment.