diff --git a/src/main/java/galena/copperative/config/CommonConfig.java b/src/main/java/galena/copperative/config/CommonConfig.java index cf1ae02..e3674e1 100644 --- a/src/main/java/galena/copperative/config/CommonConfig.java +++ b/src/main/java/galena/copperative/config/CommonConfig.java @@ -15,6 +15,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.function.BooleanSupplier; import java.util.function.Predicate; @@ -129,7 +130,7 @@ public CommonConfig(ConfigBuilder builder) { var property = builder.define("enabled", true); var targets = ImmutableMap.builder(); for (OverrideTarget target : OverrideTarget.values()) { - var targetProperty = builder.define(target.name().toLowerCase(), true); + var targetProperty = builder.define(target.name().toLowerCase(Locale.ROOT), true); targets.put(target, targetProperty::get); } diff --git a/src/main/java/galena/copperative/config/OverwriteEnabledCondition.java b/src/main/java/galena/copperative/config/OverwriteEnabledCondition.java index 85ccc59..38869d9 100644 --- a/src/main/java/galena/copperative/config/OverwriteEnabledCondition.java +++ b/src/main/java/galena/copperative/config/OverwriteEnabledCondition.java @@ -11,6 +11,7 @@ import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nullable; +import java.util.Locale; import java.util.Objects; public class OverwriteEnabledCondition implements ICondition { @@ -47,7 +48,7 @@ public static class Serializer implements IConditionSerializer> blocks, String base) blocks.forEach(block -> { if(block.get() instanceof WeatheringCopper copper && copper.getAge() != WeatheringCopper.WeatherState.UNAFFECTED) { var name = copper.getAge().name(); - var prefix = name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase(); + var prefix = name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase(Locale.ROOT); addBlock(block, prefix + " " + base); } else { addBlock(block, base); diff --git a/src/main/java/galena/copperative/data/provider/CItemModelProvider.java b/src/main/java/galena/copperative/data/provider/CItemModelProvider.java index d7d6bca..983e6cd 100644 --- a/src/main/java/galena/copperative/data/provider/CItemModelProvider.java +++ b/src/main/java/galena/copperative/data/provider/CItemModelProvider.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Locale; import java.util.function.Supplier; public abstract class CItemModelProvider extends ItemModelProvider { @@ -151,7 +152,7 @@ public ItemModelBuilder cogBlock(Block block) { public String weatherPrefix(Block block) { if (block instanceof WeatheringCopper it) { var age = it.getAge(); - if (age != WeatheringCopper.WeatherState.UNAFFECTED) return age.name().toLowerCase() + "_"; + if (age != WeatheringCopper.WeatherState.UNAFFECTED) return age.name().toLowerCase(Locale.ROOT) + "_"; } return ""; } diff --git a/src/main/java/galena/copperative/index/CBlocks.java b/src/main/java/galena/copperative/index/CBlocks.java index 5fbb8f3..f3ce3a9 100644 --- a/src/main/java/galena/copperative/index/CBlocks.java +++ b/src/main/java/galena/copperative/index/CBlocks.java @@ -149,7 +149,7 @@ public static RegistryObject register(String name, Supplier public static CopperSet registerConvertedSet(String name, Supplier targetSupplier, Function function, ResourceKey tab) { var weathered = Stream.of(WeatherState.EXPOSED, WeatherState.WEATHERED, WeatherState.OXIDIZED).>map(weatherState -> { - String prefix = weatherState.name().toLowerCase() + "_"; + String prefix = weatherState.name().toLowerCase(Locale.ROOT) + "_"; return register(prefix + name, () -> function.apply(weatherState), tab); }).toList(); return new CopperSet<>(targetSupplier, weathered); @@ -164,7 +164,7 @@ public static List> registerWeatheringSet(Un WeatherState[] wStates = WeatherState.values(); ArrayList> blocks = new ArrayList<>(4); for (final WeatherState weatherState : wStates) { - String prefix = weatherState.equals(WeatherState.UNAFFECTED) ? "" : weatherState.name().toLowerCase() + "_"; + String prefix = weatherState.equals(WeatherState.UNAFFECTED) ? "" : weatherState.name().toLowerCase(Locale.ROOT) + "_"; Supplier supplier = () -> function.apply(weatherState); blocks.add(register(name.apply(prefix), supplier, tab)); }