We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 067062c commit 3d84836Copy full SHA for 3d84836
src/main/java/com/simibubi/create/content/trains/entity/Navigation.java
@@ -264,9 +264,11 @@ public void tick(Level level) {
264
double topSpeed = train.maxSpeed();
265
266
if (targetDistance < 10) {
267
- double target = topSpeed * ((targetDistance) / 10);
268
- if (target < Math.abs(train.speed)) {
269
- train.speed += (target - Math.abs(train.speed)) * .5f * speedMod;
+ double maxApproachSpeed = topSpeed * ((targetDistance) / 10);
+ double speedRelativeToStation = train.speed * speedMod;
+
270
+ if (speedRelativeToStation > maxApproachSpeed) {
271
+ train.speed += (maxApproachSpeed - Math.abs(train.speed)) * .5f * speedMod;
272
return;
273
}
274
0 commit comments