mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-04 09:50:03 +01:00
22 lines
791 B
Diff
22 lines
791 B
Diff
From 9fcce5b028144d7682bd590fa97feaf303bd3272 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 19 Jan 2013 01:11:30 -0500
|
|
Subject: [PATCH] Skip entity.move() if we are not moving anywhere.
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 51a5b38..1044e4d 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -417,6 +417,7 @@ public abstract class Entity {
|
|
}
|
|
|
|
public void move(double d0, double d1, double d2) {
|
|
+ if (d0 == 0 && d1 == 0 && d2 == 0) { return; } // Spigot
|
|
if (this.Z) {
|
|
this.boundingBox.d(d0, d1, d2);
|
|
this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D;
|
|
--
|
|
1.8.2.1
|
|
|