mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-08 11:50:32 +01:00
Temporarily remove PlayerMicroMoveEvent implementation
Breaks the existing PlayerMoveEvent, to be re-worked soon
This commit is contained in:
parent
0daad69443
commit
f6fba00cbc
@ -1,4 +1,4 @@
|
|||||||
From 2d5e9cd7821456f0ca27163bbf734a6f18130fd6 Mon Sep 17 00:00:00 2001
|
From c44a6dba8b52c5fa6e889cb015be4ee2ae946586 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Thu, 23 Jul 2015 12:44:06 -0700
|
Date: Thu, 23 Jul 2015 12:44:06 -0700
|
||||||
Subject: [PATCH] Add BeaconEffectEvent
|
Subject: [PATCH] Add BeaconEffectEvent
|
||||||
@ -62,5 +62,5 @@ index 3ea1b62..a24dc68 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
1.9.5.msysgit.1
|
2.4.5.windows.1
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From 8b0fe684b14defdd3f55914bcbcc0502ac3ae95a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Techcable <Techcable@outlook.com>
|
|
||||||
Date: Thu, 23 Jul 2015 04:29:22 -0700
|
|
||||||
Subject: [PATCH] Add PlayerMicroMoveEvent
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
||||||
index 18d8d2d..47a54a0 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
||||||
@@ -63,6 +63,7 @@ import org.bukkit.util.NumberConversions;
|
|
||||||
// CraftBukkit end
|
|
||||||
|
|
||||||
import org.github.paperspigot.PaperSpigotConfig; // PaperSpigot
|
|
||||||
+import org.github.paperspigot.event.player.PlayerMicroMoveEvent; // PaperSpigot
|
|
||||||
|
|
||||||
public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerListBox {
|
|
||||||
|
|
||||||
@@ -258,7 +259,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
||||||
double delta = Math.pow(this.lastPosX - to.getX(), 2) + Math.pow(this.lastPosY - to.getY(), 2) + Math.pow(this.lastPosZ - to.getZ(), 2);
|
|
||||||
float deltaAngle = Math.abs(this.lastYaw - to.getYaw()) + Math.abs(this.lastPitch - to.getPitch());
|
|
||||||
|
|
||||||
- if ((delta > 1f / 256 || deltaAngle > 10f) && (this.checkMovement && !this.player.dead)) {
|
|
||||||
+ if ((delta > 0 || deltaAngle > 0) && (this.checkMovement && !this.player.dead)) { // PaperSpigot
|
|
||||||
this.lastPosX = to.getX();
|
|
||||||
this.lastPosY = to.getY();
|
|
||||||
this.lastPosZ = to.getZ();
|
|
||||||
@@ -268,7 +269,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
||||||
// Skip the first time we do this
|
|
||||||
if (true) { // Spigot - don't skip any move events
|
|
||||||
Location oldTo = to.clone();
|
|
||||||
- PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
|
||||||
+ PlayerMoveEvent event = (delta > 1f / 256 || deltaAngle > 10f) ? new PlayerMoveEvent(player, from, to) : new PlayerMicroMoveEvent(player, from, to); // PaperSpigot - PlayerMicroMoveEvent
|
|
||||||
this.server.getPluginManager().callEvent(event);
|
|
||||||
|
|
||||||
// If the event is cancelled we move the player back to their old location.
|
|
||||||
--
|
|
||||||
2.4.5.windows.1
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
From fa4981a0ce83d10645859aacfcfb1ce509f44f15 Mon Sep 17 00:00:00 2001
|
From 8eb107a8af1324f3431a30eedc601bb723d53eda Mon Sep 17 00:00:00 2001
|
||||||
From: Sudzzy <originmc@outlook.com>
|
From: Sudzzy <originmc@outlook.com>
|
||||||
Date: Thu, 23 Jul 2015 22:05:22 -0700
|
Date: Thu, 23 Jul 2015 22:05:22 -0700
|
||||||
Subject: [PATCH] Configurable container update tick rate
|
Subject: [PATCH] Configurable container update tick rate
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index baa08c9..a389819 100644
|
index 4631ca1..1a2484d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -65,6 +65,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -65,6 +65,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
@ -48,5 +48,5 @@ index cde11b2..bd1b363 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
1.9.5.msysgit.1
|
2.4.5.windows.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user