Yatopia/patches/server/0046-Give-them-items-motion.patch
Ivan Pekov 21db600711
Villager stuff
Fixes #152 

There is still the issue with doors which I will try to fix later on, but the new option should make them more "vanilla".

See the description of the new patch for more information.
2020-09-13 08:22:23 +03:00

20 lines
1022 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Pekov <ivan@mrivanplays.com>
Date: Thu, 10 Sep 2020 20:55:13 +0300
Subject: [PATCH] Give them items motion
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 07ae7f9592d78b3e0f0dd7ef543e8c8ac10543ca..ebe17a86dc340338fb4b4f1a5112bce8cc46dfd2 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1548,7 +1548,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public void setPositionRotation(double d0, double d1, double d2, float f, float f1) {
- this.mot = new Vec3D(0, 0, 0); // Paper - cancel entity velocity if teleported
+ if (this instanceof EntityPlayer) { this.mot = Vec3D.ORIGIN; } // Paper - cancel entity velocity if teleported // Yatopia - fix PaperMC-4292
this.g(d0, d1, d2);
this.yaw = f;
this.pitch = f1;