aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-04-27 15:50:33 -0700
committerJake Potrebic <[email protected]>2024-04-27 15:50:38 -0700
commitd02bb811de6f9d7e42001137b93d6a6f88359ab6 (patch)
treea396cbb1f0ada45b98703f8125f06f17334dc080 /patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch
parentdd571d89f2202bda719a40fd15f92cc754b6ade1 (diff)
downloadPaper-d02bb811de6f9d7e42001137b93d6a6f88359ab6.tar.gz
Paper-d02bb811de6f9d7e42001137b93d6a6f88359ab6.zip
proper migration to gamerules for keep spawn loaded distance
Diffstat (limited to 'patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch')
-rw-r--r--patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch
new file mode 100644
index 0000000000..6a98c63b52
--- /dev/null
+++ b/patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Spottedleaf <[email protected]>
+Date: Tue, 16 Feb 2021 00:16:56 -0800
+Subject: [PATCH] Send full pos packets for hard colliding entities
+
+Prevent collision problems due to desync (i.e boats)
+
+Configurable under
+`send-full-pos-for-hard-colliding-entities`
+
+diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
+index 22eec853588ded2d255ab69d408f8e987832abe2..4f103f731623a8570238a6867fda1c5f83fca4e4 100644
+--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
++++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
+@@ -183,7 +183,7 @@ public class ServerEntity {
+ long i1 = this.positionCodec.encodeZ(vec3d);
+ boolean flag6 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L;
+
+- if (!flag6 && this.teleportDelay <= 400 && !this.wasRiding && this.wasOnGround == this.entity.onGround()) {
++ if (!flag6 && this.teleportDelay <= 400 && !this.wasRiding && this.wasOnGround == this.entity.onGround()&& !(io.papermc.paper.configuration.GlobalConfiguration.get().collisions.sendFullPosForHardCollidingEntities && this.entity.hardCollides())) { // Paper - send full pos for hard colliding entities to prevent collision problems due to desync
+ if ((!flag2 || !flag3) && !(this.entity instanceof AbstractArrow)) {
+ if (flag2) {
+ packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.onGround());