Skip to content

Commit

Permalink
Jumping off cliffs is still inconsistent ._. (Is it inconsistent in V…
Browse files Browse the repository at this point in the history
…anilla as well?)
  • Loading branch information
audaki committed May 21, 2024
1 parent 164e9fd commit 3848d30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.0] - 2024-05-20
- Make jump width after rail cliff like vanilla
- [!] Improve brakes for ridden carts
- Brakes now always stop a ridden cart in exactly 1 brake tile
- Brakes now stop the cart in the 2nd half of the tile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,6 @@ protected void modifiedMoveAlongTrack(BlockPos startPos, BlockState state) {

this.applyNaturalSlowdown();

if (exitIsAir) {
momentum = this.getDeltaMovement();
horizontalMomentum = momentum.horizontalDistance();
if (horizontalMomentum > vanillaMaxMomentum) {
double ratioToSlowdown = vanillaMaxMomentum / horizontalMomentum;
this.setDeltaMovement(momentum.multiply(ratioToSlowdown, 1., ratioToSlowdown));
}
}

// Todo: 100% understand this vanilla code block & rename variables
Vec3 vec3d4 = this.getPos(this.getX(), this.getY(), this.getZ());
if (vec3d4 != null && vec3 != null) {
Expand Down Expand Up @@ -526,5 +517,15 @@ protected void modifiedMoveAlongTrack(BlockPos startPos, BlockState state) {
this.setDeltaMovement(ah, momentum.y, ai);
}
}

// TODO: Falling is still inconsistent, is it a vanilla inconsistency?
// if (exitIsAir) {
// momentum = this.getDeltaMovement();
// horizontalMomentum = momentum.horizontalDistance();
// if (horizontalMomentum > vanillaMaxSpeed) {
// double ratioToSlowdown = vanillaMaxSpeed / horizontalMomentum;
// this.setDeltaMovement(momentum.multiply(ratioToSlowdown, 1., ratioToSlowdown));
// }
// }
}
}

0 comments on commit 3848d30

Please sign in to comment.