Merge pull request #322 from CivMC/transport

Make skyBase not additive
This commit is contained in:
okx-code
2024-02-23 23:37:34 +00:00
committed by GitHub
2 changed files with 11 additions and 9 deletions

View File

@@ -88,10 +88,12 @@ public final class BetterRails extends SimpleHack<BetterRailsConfig> implements
Material belowRail = minecart.getLocation().subtract(0, 1, 0).getBlock().getType();
Material belowRail2 = minecart.getLocation().subtract(0, 2, 0).getBlock().getType();
double speedMetresPerSecond = maxOrGet(config.getMaxSpeedMetresPerSecond(belowRail), config.getMaxSpeedMetresPerSecond(belowRail2), config.getBaseSpeed());
double speedMetresPerSecond;
if (minecart.getLocation().getBlockY() == minecart.getWorld().getHighestBlockYAt(minecart.getLocation(), HeightMap.WORLD_SURFACE)) {
speedMetresPerSecond += maxOrGet(config.getSkySpeedMetresPerSecond(belowRail), config.getSkySpeedMetresPerSecond(belowRail2), config.getSkySpeed());
speedMetresPerSecond = maxOrGet(config.getSkySpeedMetresPerSecond(belowRail), config.getSkySpeedMetresPerSecond(belowRail2), config.getSkySpeed());
} else {
speedMetresPerSecond = maxOrGet(config.getMaxSpeedMetresPerSecond(belowRail), config.getMaxSpeedMetresPerSecond(belowRail2), config.getBaseSpeed());
}

View File

@@ -521,20 +521,20 @@ hacks:
enabled: true
# All in metres per second
# Minecraft will prevent you going faster than 30m/s
base: 12
base: 11
materials:
COBBLESTONE: 8
COPPER_BLOCK: 29
EXPOSED_COPPER: 23
WEATHERED_COPPER: 18
OXIDIZED_COPPER: 14
skyBase: 1
skyBase: 12
skyMaterials:
COBBLESTONE: 0
COPPER_BLOCK: 1
EXPOSED_COPPER: 1
WEATHERED_COPPER: 1
OXIDIZED_COPPER: 1
COBBLESTONE: 8
COPPER_BLOCK: 30
EXPOSED_COPPER: 24
WEATHERED_COPPER: 19
OXIDIZED_COPPER: 15
CopperRail:
enabled: true
deoxidise: true