Fix Minecart speed cap on rail being initialized to 0 (#7315)

This commit is contained in:
Take Weiland 2020-09-09 19:09:00 +02:00 committed by GitHub
parent 45f8dc5245
commit c382527ba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -207,9 +207,9 @@
+ private boolean canUseRail = true;
+ @Override public boolean canUseRail() { return canUseRail; }
+ @Override public void setCanUseRail(boolean value) { this.canUseRail = value; }
+ private float currentSpeedOnRail;
+ @Override public float getCurrentCartSpeedCapOnRail() { return currentSpeedOnRail; }
+ @Override public void setCurrentCartSpeedCapOnRail(float value) { currentSpeedOnRail = Math.min(value, getMaxCartSpeedOnRail()); }
+ private float currentSpeedCapOnRail = getMaxCartSpeedOnRail();
+ @Override public float getCurrentCartSpeedCapOnRail() { return currentSpeedCapOnRail; }
+ @Override public void setCurrentCartSpeedCapOnRail(float value) { currentSpeedCapOnRail = Math.min(value, getMaxCartSpeedOnRail()); }
+ private float maxSpeedAirLateral = DEFAULT_MAX_SPEED_AIR_LATERAL;
+ @Override public float getMaxSpeedAirLateral() { return maxSpeedAirLateral; }
+ @Override public void setMaxSpeedAirLateral(float value) { maxSpeedAirLateral = value; }