Skip to content

Commit

Permalink
Reset fall distance when teleporting entities
Browse files Browse the repository at this point in the history
  • Loading branch information
56738 committed Jan 8, 2025
1 parent 575a929 commit 9ae9575
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public EntityLocationProperty(Entity entity) {

@Override
public boolean setValue(@NotNull Location value) {
return entity.teleport(value);
boolean ok = entity.teleport(value);
if (ok) {
entity.setFallDistance(0);
}
return ok;
}
}

0 comments on commit 9ae9575

Please sign in to comment.