From 619a990680994129edd7c2bc7ab452ce18d590d1 Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Tue, 23 Sep 2014 05:46:11 +0800 Subject: [PATCH] #1033 Vacuum chests "fight" over items when too close to each other --- .../enderio/machine/vacuum/TileVacuumChest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/crazypants/enderio/machine/vacuum/TileVacuumChest.java b/src/main/java/crazypants/enderio/machine/vacuum/TileVacuumChest.java index c00f4245..c8ff0216 100644 --- a/src/main/java/crazypants/enderio/machine/vacuum/TileVacuumChest.java +++ b/src/main/java/crazypants/enderio/machine/vacuum/TileVacuumChest.java @@ -64,13 +64,13 @@ public class TileVacuumChest extends TileEntity implements IEntitySelector, IIn if(distance < 1.25) { hooverEntity(entity); } else { - double speed = 0.035; - entity.motionX += x / distance * speed; - entity.motionY += y * speed; - if(y > 0) { - entity.motionY = 0.12; - } - entity.motionZ += z / distance * speed; + double speed = 0.06; + double distScale = 1.0 - Math.min(0.9, distance / (RANGE*RANGE)); + distScale *= distScale; + + entity.motionX += x / distance * distScale * speed; + entity.motionY += y / distance * distScale * 0.2; + entity.motionZ += z / distance * distScale * speed; } }