Improve tag parser handling, move hunks out of chunk system patch
This commit is contained in:
parent
c5d168cef9
commit
9e171ef8ff
53 changed files with 355 additions and 248 deletions
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9440310f6a46fb62c4526f3cfb0464750fe72f84..c4c9b3061aa79b8ab8e5b1f68780f4910a657b1d 100644
|
||||
index 0bc974ff4124ff6bfc355a6dac362574a649c476..e19c05504151885ca18496b50dcf6091d94078c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1271,8 +1271,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1279,8 +1279,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER
|
||||
double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; // Paper - OBFHELPER
|
||||
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
|
||||
|
@ -19,7 +19,7 @@ index 9440310f6a46fb62c4526f3cfb0464750fe72f84..c4c9b3061aa79b8ab8e5b1f68780f491
|
|||
|
||||
if (this.player.isPassenger()) {
|
||||
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
|
||||
@@ -1337,8 +1337,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1345,8 +1345,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) {
|
||||
|
@ -36,7 +36,7 @@ index 9440310f6a46fb62c4526f3cfb0464750fe72f84..c4c9b3061aa79b8ab8e5b1f68780f491
|
|||
}
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
|
||||
@@ -1347,9 +1353,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1355,9 +1361,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
// CraftBukkit end
|
||||
|
@ -56,7 +56,7 @@ index 9440310f6a46fb62c4526f3cfb0464750fe72f84..c4c9b3061aa79b8ab8e5b1f68780f491
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1411,14 +1424,29 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1419,14 +1432,29 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
d8 = d2 - this.player.getZ();
|
||||
d10 = d6 * d6 + d7 * d7 + d8 * d8;
|
||||
|
@ -89,7 +89,7 @@ index 9440310f6a46fb62c4526f3cfb0464750fe72f84..c4c9b3061aa79b8ab8e5b1f68780f491
|
|||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
||||
} else {
|
||||
@@ -3351,4 +3379,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3359,4 +3387,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue