From c382527ba264f6092f810511ee886f30c762ebaa Mon Sep 17 00:00:00 2001 From: Take Weiland Date: Wed, 9 Sep 2020 19:09:00 +0200 Subject: [PATCH] Fix Minecart speed cap on rail being initialized to 0 (#7315) --- .../entity/item/minecart/AbstractMinecartEntity.java.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/minecraft/net/minecraft/entity/item/minecart/AbstractMinecartEntity.java.patch b/patches/minecraft/net/minecraft/entity/item/minecart/AbstractMinecartEntity.java.patch index 4bd426e6f..3026c51e5 100644 --- a/patches/minecraft/net/minecraft/entity/item/minecart/AbstractMinecartEntity.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/minecart/AbstractMinecartEntity.java.patch @@ -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; }