Skip to content

Commit

Permalink
Fix #148 (for real this time)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sm0keySa1m0n committed Nov 21, 2023
1 parent e1c45fe commit 7b9628c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ public final void whistle() {
public void tick() {
super.tick();

if (this.isRemoved()) {
return;
}

if (this.level().isClientSide()) {
if (Seasons.isPolarExpress(this)
&& (!MathUtil.nearZero(this.getDeltaMovement().x())
Expand Down Expand Up @@ -545,10 +549,14 @@ private void processTicket() {

@Override
protected void applyNaturalSlowdown() {
if (this.isRemoved()) {
return;
}

this.setDeltaMovement(this.getDeltaMovement().multiply(getDrag(), 0.0D, getDrag()));

if (this.isReverse() && this.getSpeed().getLevel() > this.getMaxReverseSpeed().getLevel()) {
setSpeed(getMaxReverseSpeed());
this.setSpeed(this.getMaxReverseSpeed());
}

var speed = this.getSpeed();
Expand Down

0 comments on commit 7b9628c

Please sign in to comment.