Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Document newton task
Browse files Browse the repository at this point in the history
  • Loading branch information
Mubelotix committed Jan 4, 2024
1 parent 1298a82 commit 3f0b69b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions minecraft-server/src/entities/tasks/newton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ use crate::CollisionShape;

use super::*;

/// This task applies gravity and velocity to an entity.
/// It has minimal performance impact.
///
/// It can be used by other larger tasks.
/// In that case, other tasks should stick to modifying `x`, `z`, `vx`, `vz` and `vy`.
/// This task shall be called at the end of their tick.
/// See the [ZombieTask] for an example.
pub struct NewtonTask {
width: f64,
height: f64,
Expand Down

0 comments on commit 3f0b69b

Please sign in to comment.