Skip to content

Commit

Permalink
Calculate push command impacts better
Browse files Browse the repository at this point in the history
try to avoid getting stuck on a block
  • Loading branch information
mcmonkey4eva committed Dec 12, 2014
1 parent aec11c8 commit d6f63a5
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -248,7 +248,8 @@ public void run() {

// Check if the entity has collided with something
// using the most basic possible calculation
if (lastEntity.getLocation().add(newVel).getBlock().getType().isSolid()) {
if (lastEntity.getLocation().add(v3).getBlock().getType().isSolid()
|| lastEntity.getLocation().add(newVel).getBlock().getType().isSolid()) {
runs = maxTicks;
}

Expand Down

0 comments on commit d6f63a5

Please sign in to comment.