Skip to content

Commit

Permalink
Merge pull request #19 from James103/fix_gravity
Browse files Browse the repository at this point in the history
Fix #18: Avoid excessive velocities by limiting exponential gravity.
  • Loading branch information
asanetargoss authored Apr 6, 2020
2 parents 3208f20 + b6669bf commit fe4f513
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/mchorse/vanilla_pack/morphs/IronGolemMorph.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public void update(EntityLivingBase target, IMorphing cap)
target.motionX *= 0.5;
target.motionZ *= 0.5;

target.motionY *= 1.3;
if (target.motionY > -5)
{
target.motionY *= (1.1 + target.motionY / 50.0);
}
}

super.update(target, cap);
Expand Down Expand Up @@ -55,4 +58,4 @@ public AbstractMorph clone()

return morph;
}
}
}

0 comments on commit fe4f513

Please sign in to comment.