2016-04-23 06:01:28 +08:00
|
|
|
From 79460328e041588c8172ed1602ee333378b8f245 Mon Sep 17 00:00:00 2001
|
2016-04-13 11:26:42 +08: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-04-23 06:01:28 +08:00
|
|
|
index c0b0a26..a00baa6 100644
|
2016-04-13 11:26:42 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
@@ -288,6 +288,7 @@ public abstract class Entity implements ICommandListener {
|
|
|
|
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
|
|
|
|
index f0c04e5..d267a44 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
@@ -205,7 +205,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
- private void d() {
|
|
|
|
+ public void captureCurrentPosition() { d(); } private void d() { // Paper // OBFHELPER
|
|
|
|
this.l = this.player.locX;
|
|
|
|
this.m = this.player.locY;
|
|
|
|
this.n = this.player.locZ;
|
|
|
|
--
|
2016-04-18 22:43:19 +08:00
|
|
|
2.8.0
|
2016-04-13 11:26:42 +08:00
|
|
|
|