23 lines
1.2 KiB
Diff
23 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: ishland <ishlandmc@yeah.net>
|
|
Date: Sun, 12 Dec 2021 17:19:00 -0500
|
|
Subject: [PATCH] vmp: skip entity move if movement is zero
|
|
|
|
Copyright (c) 2021-2022 ishland
|
|
|
|
Original code by RelativityMC, licensed under MIT
|
|
You can find the original code on https://github.com/RelativityMC/VMP-fabric (Yarn mappings)
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 87c8c3aca37570b93cd8c10ef4ed7ed5cd54ccb8..c6d0e78dec3ff55b83322a43127ccdcd29ece750 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -958,6 +958,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
|
// Paper end - detailed watchdog information
|
|
|
|
public void move(MoverType movementType, Vec3 movement) {
|
|
+ if (movement.equals(Vec3.ZERO)) return; // VMP - skip if movement is zero
|
|
// Paper start - detailed watchdog information
|
|
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
|
synchronized (this.posLock) {
|