2016-09-11 02:42:47 +00:00
|
|
|
From 0be73628c26f8911b84923c97bdc8e9bcb909e9a Mon Sep 17 00:00:00 2001
|
2016-04-13 03:26:42 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Sun, 10 Apr 2016 22:36:10 -0400
|
|
|
|
Subject: [PATCH] SPIGOT-1903: Update PlayerConnection on teleporting players
|
|
|
|
|
|
|
|
Otherwise the player will trigger a "moved too quickly" next movement packet
|
|
|
|
and rubber band.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2016-09-11 02:42:47 +00:00
|
|
|
index a17355c..66337e4 100644
|
2016-04-13 03:26:42 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2016-08-11 20:07:07 +00:00
|
|
|
@@ -293,6 +293,7 @@ public abstract class Entity implements ICommandListener {
|
2016-04-13 03:26:42 +00:00
|
|
|
this.locX = d0;
|
|
|
|
this.locY = d1;
|
|
|
|
this.locZ = d2;
|
|
|
|
+ if (this instanceof EntityPlayer && ((EntityPlayer) this).playerConnection != null) ((EntityPlayer) this).playerConnection.captureCurrentPosition(); // Paper
|
|
|
|
float f = this.width / 2.0F;
|
|
|
|
float f1 = this.length;
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2016-09-11 02:42:47 +00:00
|
|
|
index 89bf52f..9911265 100644
|
2016-04-13 03:26:42 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2016-05-12 02:07:46 +00:00
|
|
|
@@ -204,7 +204,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
2016-04-13 03:26:42 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
- private void d() {
|
2016-07-27 22:46:02 +00:00
|
|
|
+ public void captureCurrentPosition() { d(); } private void d() { // Paper - OBFHELPER
|
2016-04-13 03:26:42 +00:00
|
|
|
this.l = this.player.locX;
|
|
|
|
this.m = this.player.locY;
|
|
|
|
this.n = this.player.locZ;
|
|
|
|
--
|
2016-09-11 02:42:47 +00:00
|
|
|
2.10.0.windows.1
|
2016-04-13 03:26:42 +00:00
|
|
|
|