Archiviert
13
0

Update "Don't special case x move value" patch to ensure that move events are always fired, regardless if there are any "special cases"

Dieser Commit ist enthalten in:
md_5 2014-02-24 18:04:12 +11:00
Ursprung 505ac3fb4e
Commit eb9e4c0460
6 geänderte Dateien mit 44 neuen und 34 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From 35c118d7278bdca1671c45a5e8f6ab1a99ad5ee3 Mon Sep 17 00:00:00 2001
From 0afa39732c99413db7ac202857278521cfad9204 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 6 Oct 2013 17:36:28 +1100
Subject: [PATCH] Don't Special Case X Move Value
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 0c85c57..0cf3c98 100644
index e9652a5..58e0e41 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -105,6 +105,7 @@ public class PlayerConnection implements PacketPlayInListener {
@ -16,24 +16,34 @@ index 0c85c57..0cf3c98 100644
// For the PacketPlayOutBlockPlace hack :(
Long lastPacket;
@@ -229,7 +230,7 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -201,6 +202,18 @@ public class PlayerConnection implements PacketPlayInListener {
// CraftBukkit start
Player player = this.getPlayer();
+ // Spigot Start
+ if ( !hasMoved )
+ {
+ Location curPos = player.getLocation();
+ lastPosX = curPos.getX();
+ lastPosY = curPos.getY();
+ lastPosZ = curPos.getZ();
+ lastYaw = curPos.getYaw();
+ lastPitch = curPos.getPitch();
+ hasMoved = true;
+ }
+ // Spigot End
Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location.
Location to = player.getLocation().clone(); // Start off the To location as the Players current location.
@@ -229,7 +242,7 @@ public class PlayerConnection implements PacketPlayInListener {
this.lastPitch = to.getPitch();
// Skip the first time we do this
- if (from.getX() != Double.MAX_VALUE) {
+ if (hasMoved) { // Spigot - Better Check!
+ if (true) { // Spigot - don't skip any move events
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
this.server.getPluginManager().callEvent(event);
@@ -253,7 +254,7 @@ public class PlayerConnection implements PacketPlayInListener {
this.justTeleported = false;
return;
}
- }
+ } else { hasMoved = true; } // Spigot - Better Check!
}
if (this.checkMovement && !this.player.dead) {
--
1.8.4.msysgit.0
1.8.3.2

Datei anzeigen

@ -1,14 +1,14 @@
From 054f1855d4ff3344c64b9e7d53b2ca6b46637a95 Mon Sep 17 00:00:00 2001
From 484ad198db7915314a71b20265b34676a1685a01 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 8 Dec 2013 16:52:42 +1100
Subject: [PATCH] Remove OS X Special Chars from Signs
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 0fa731e..c9585fc 100644
index 58e0e41..82ad68d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1572,6 +1572,7 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -1584,6 +1584,7 @@ public class PlayerConnection implements PacketPlayInListener {
for (j = 0; j < 4; ++j) {
boolean flag = true;
@ -17,5 +17,5 @@ index 0fa731e..c9585fc 100644
if (packetplayinupdatesign.f()[j].length() > 15) {
flag = false;
--
1.8.4.msysgit.0
1.8.3.2

Datei anzeigen

@ -1,4 +1,4 @@
From ad4c58f956161e81eb940369b6ec91cb1c8cab45 Mon Sep 17 00:00:00 2001
From 758a088dd2fc4bb2f80aef88332574003b35882b Mon Sep 17 00:00:00 2001
From: bloodshot <jdroque@gmail.com>
Date: Mon, 6 Jan 2014 18:02:01 -0500
Subject: [PATCH] Update Client's Hand when BlockPlaceEvent Cancelled
@ -16,10 +16,10 @@ PlayerConnection.a(handlePlace) not to send the appropriate packet to
client which causes the bug.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c9585fc..9e6901c 100644
index 82ad68d..1b862fb 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -626,7 +626,9 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -638,7 +638,9 @@ public class PlayerConnection implements PacketPlayInListener {
return;
}
@ -31,5 +31,5 @@ index c9585fc..9e6901c 100644
flag = true;
--
1.8.4.msysgit.0
1.8.3.2

Datei anzeigen

@ -1,14 +1,14 @@
From 406fe8af81203e6c840334f49d1c3ed1f553d1af Mon Sep 17 00:00:00 2001
From e67b722b97fcf2cffa5f3fa31f3dcad8afe494e6 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 8 Feb 2014 08:13:40 +0000
Subject: [PATCH] Spam Filter Exclusions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9e6901c..f028c02 100644
index 1b862fb..692432b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -836,9 +836,19 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -848,9 +848,19 @@ public class PlayerConnection implements PacketPlayInListener {
this.minecraftServer.getPlayerList().sendMessage(chatmessage1, false);
}
@ -56,5 +56,5 @@ index 61fb942..8da3cc9 100644
+ }
}
--
1.8.4.msysgit.0
1.8.3.2

Datei anzeigen

@ -1,14 +1,14 @@
From a7f19eb0f5dd8d22baf5992e28232f3d12a9c811 Mon Sep 17 00:00:00 2001
From 920db20e433e577e3478b52ae8637fc5d15fea12 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 12 Feb 2014 18:18:01 +1100
Subject: [PATCH] Allow Disabling Creative Item Filter
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f028c02..0f0fc49 100644
index 692432b..25cc14b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1489,7 +1489,7 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -1501,7 +1501,7 @@ public class PlayerConnection implements PacketPlayInListener {
ItemStack itemstack = packetplayinsetcreativeslot.d();
boolean flag1 = packetplayinsetcreativeslot.c() >= 1 && packetplayinsetcreativeslot.c() < 36 + PlayerInventory.getHotbarSize();
// CraftBukkit - Add invalidItems check
@ -33,5 +33,5 @@ index 7cba69f..7589246 100644
+ }
}
--
1.8.4.msysgit.0
1.8.3.2

Datei anzeigen

@ -1,4 +1,4 @@
From aae251cf6e684bf373226e0af74e527721a04779 Mon Sep 17 00:00:00 2001
From bb0f910435c62c1cad0c8ae5d488602c32395a74 Mon Sep 17 00:00:00 2001
From: hcherndon <hcherndon@gmail.com>
Date: Sat, 15 Feb 2014 01:51:20 -0600
Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
@ -6,10 +6,10 @@ Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
This would literally mean the world to me. You have no idea how much this method being final is fucking me over right now. (Working with NPC's and what not.)
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 0f0fc49..f506da0 100644
index 25cc14b..f84df92 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1846,7 +1846,7 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -1858,7 +1858,7 @@ public class PlayerConnection implements PacketPlayInListener {
}
// CraftBukkit start - Add "isDisconnected" method
@ -19,5 +19,5 @@ index 0f0fc49..f506da0 100644
}
// CraftBukkit end
--
1.8.4.msysgit.0
1.8.3.2