From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Callum Seabrook <callum.seabrook@prevarinite.com>
Date: Fri, 14 May 2021 21:22:57 +0100
Subject: [PATCH] Configurable powered rail boost modifier


diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
index 1e3077a22d9d3d26356b865001dcce81c9c1d7e5..cc57ff699d159a0cc748e91b61d53965ac822ff4 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -715,7 +715,7 @@ public abstract class AbstractMinecart extends Entity {
             if (d18 > 0.01D) {
                 double d20 = 0.06D;
 
-                this.setDeltaMovement(vec3d4.add(vec3d4.x / d18 * 0.06D, 0.0D, vec3d4.z / d18 * 0.06D));
+                this.setDeltaMovement(vec3d4.add(vec3d4.x / d18 * this.level.purpurConfig.poweredRailBoostModifier, 0.0D, vec3d4.z / d18 * this.level.purpurConfig.poweredRailBoostModifier)); // Purpur
             } else {
                 Vec3 vec3d5 = this.getDeltaMovement();
                 double d21 = vec3d5.x;
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index b54dba107a355fe8f4e12f0763fb0b6590788c05..2bef8f37783cd83ac10a41103c3fa868a8cc9fea 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -226,6 +226,7 @@ public class PurpurWorldConfig {
     public boolean minecartControllableFallDamage = true;
     public double minecartControllableBaseSpeed = 0.1D;
     public Map<Block, Double> minecartControllableBlockSpeeds = new HashMap<>();
+    public double poweredRailBoostModifier = 0.06;
     private void minecartSettings() {
         if (PurpurConfig.version < 12) {
             boolean oldBool = getBoolean("gameplay-mechanics.controllable-minecarts.place-anywhere", minecartPlaceAnywhere);
@@ -278,6 +279,7 @@ public class PurpurWorldConfig {
             set("gameplay-mechanics.minecart.controllable.block-speed.grass_block", 0.3D);
             set("gameplay-mechanics.minecart.controllable.block-speed.stone", 0.5D);
         }
+        poweredRailBoostModifier = getDouble("gameplay-mechanics.minecart.powered-rail.boost-modifier", poweredRailBoostModifier);
     }
 
     public boolean catSpawning;
