Compare commits

..
Author SHA1 Message Date
DreamMasterXXL 04ea5e8862 bump version 2020-12-03 20:37:56 +01:00
Martin Robertz b411fec0c1 Merge pull request #3 from KiloJoel/magnetFix
items go lower and don't move when close
2020-11-22 21:20:48 +01:00
KiloJoel 82368a06bf items go lower and don't move when close 2020-11-22 20:08:47 +00:00
2 changed files with 5 additions and 2 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
version_major=2
version_minor=5
version_rev=4-GTNH
version_rev=5-GTNH
version_forestry=4.2.+
version_botania=r1.8-248
@@ -184,10 +184,13 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
for (EntityItem e : list) {
if (e.age >= 10) {
double x = player.posX - e.posX;
double y = player.posY - e.posY;
double y = player.posY - e.posY - 1.f;
double z = player.posZ - e.posZ;
double length = Math.sqrt(x * x + y * y + z * z) * 2;
if (length < 1.2f)
continue;
x = x / length + player.motionX / 2;
y = y / length + player.motionY / 2;