diff --git a/pom.xml b/pom.xml
index c9527bf..8469adf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
tech.sbdevelopment
VehiclesPlusConverter
- 0.2.2
+ 0.2.3
jar
VehiclesPlusConverter
diff --git a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java
index ec30e7f..b059df6 100644
--- a/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java
+++ b/src/main/java/tech/sbdevelopment/vehiclesplusconverter/handlers/Converter.java
@@ -85,7 +85,7 @@ public class Converter {
private static void convertRims() {
for (Map.Entry entry : VehiclesPlus.getVehicleManager().getRimDesignHashMap().entrySet()) {
nl.sbdeveloper.vehiclesplus.api.vehicles.rims.RimDesign rd = new nl.sbdeveloper.vehiclesplus.api.vehicles.rims.RimDesign(
- entry.getValue().getName(),
+ entry.getValue().getName().toLowerCase(),
entry.getValue().getSkin(),
HolderItemPosition.HEAD,
entry.getValue().getPrice()
@@ -191,7 +191,7 @@ public class Converter {
wheel.getXOffset(),
wheel.getYOffset(),
wheel.getZOffset(),
- nl.sbdeveloper.vehiclesplus.api.VehiclesPlusAPI.getRimDesign(VehiclesPlus.getVehicleManager().getRimDesignHashMap().values().stream().findFirst().orElseThrow(() -> new ConversionException("No RimDesign found while loading Wheel in file", baseVehicle.getName())).getName()).orElseThrow(() -> new ConversionException("No matching RimDesign found while loading Wheel in file", baseVehicle.getName())),
+ nl.sbdeveloper.vehiclesplus.api.VehiclesPlusAPI.getRimDesign(VehiclesPlus.getVehicleManager().getRimDesignHashMap().values().stream().map(str -> str.getName().toLowerCase()).findFirst().orElseThrow(() -> new ConversionException("No RimDesign found while loading Wheel in file", baseVehicle.getName()))).orElseThrow(() -> new ConversionException("No matching RimDesign found while loading Wheel in file", baseVehicle.getName())),
wheel.getColor(),
wheel.getSteering(),
wheel.getRotationOffset()
@@ -301,6 +301,15 @@ public class Converter {
false
);
+ // Set the vehicle's stats
+ newVehicle.getStatics().forceSetMaxSpeed(vehicle.getVehicleStats().getSpeed());
+ newVehicle.getStatics().forceSetTurningRadius(vehicle.getVehicleStats().getSteering());
+ newVehicle.getStatics().forceSetFuelTank(vehicle.getVehicleStats().getFuelTank());
+ newVehicle.getStatics().setCurrentFuel(vehicle.getVehicleStats().getCurrentFuel());
+ newVehicle.getStatics().forceSetAcceleration(vehicle.getVehicleStats().getAcceleration());
+ newVehicle.getStatics().setBroken(vehicle.getVehicleStats().getBroken());
+ newVehicle.getStatics().setCurrentHealth(vehicle.getVehicleStats().getHealth());
+
newVehicle.forceSave();
garage.addVehicle(newVehicle.getUuid());
} catch (Exception e) {