Skip to content

Commit

Permalink
Quick fix to remove on block collision projectile
Browse files Browse the repository at this point in the history
  • Loading branch information
DeeCaaD committed Jan 5, 2022
1 parent 6129b42 commit 8e1e22c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public RemoveOnBlockCollisionProjectile(Location location, Vector motion, FakeEn
@Override
public boolean handleCollisions(boolean disableEntityCollisions) {

Vector possibleNextLocation = getLocation().add(getMotion());
double distance = Math.ceil(getMotionLength());

// If distance is 0 or below, it will cause issues
Expand All @@ -48,6 +49,8 @@ public boolean handleCollisions(boolean disableEntityCollisions) {
return true;
}

setRawLocation(possibleNextLocation);

// There wasn't any collisions
return false;
}
Expand Down
Empty file.
Empty file.
Empty file.

0 comments on commit 8e1e22c

Please sign in to comment.