gravity fix

This commit is contained in:
Mini-Chiss 2015-05-04 15:34:57 -05:00
parent 0d1de153ec
commit 7505bbc1a2

View File

@ -113,6 +113,20 @@ public class GravityPlayer extends GravityObject
if (!Ent.equals(player))
return;
boolean nearBlock = false;
for (Block block : UtilBlock.getSurrounding(Base.getLocation().getBlock(), true))
{
if (block.getType() != Material.AIR)
{
nearBlock = true;
break;
}
}
//Requires near block OR batsit
if (!Bat.isSitting() && !nearBlock)
return;
GrabDelay = System.currentTimeMillis();
AddVelocity(player.getLocation().getDirection().multiply(0.5), 0.5);