mirror of
https://github.com/GTNewHorizons/EnderCore.git
synced 2026-11-14 01:04:18 +00:00
Add locale to all toLowerCase calls
This commit is contained in:
1 parent
ba39d7a918
commit
3feefd21d2
5 files changed
+13
-8
No files matched your search
@@ -4,6 +4,7 @@ import java.lang.reflect.Field;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.enderio.core.EnderCore;
|
||||
import com.enderio.core.common.config.ConfigHandler;
|
||||
@@ -54,8 +55,8 @@ public class GuiEnhancedModList extends GuiModList {
|
||||
|
||||
@Override
|
||||
public int compare(ModContainer o1, ModContainer o2) {
|
||||
String name1 = StringUtils.stripControlCodes(o1.getName()).toLowerCase();
|
||||
String name2 = StringUtils.stripControlCodes(o2.getName()).toLowerCase();
|
||||
String name1 = StringUtils.stripControlCodes(o1.getName()).toLowerCase(Locale.US);
|
||||
String name2 = StringUtils.stripControlCodes(o2.getName()).toLowerCase(Locale.US);
|
||||
switch (type) {
|
||||
case A_TO_Z:
|
||||
return name1.compareTo(name2);
|
||||
@@ -234,7 +235,7 @@ public class GuiEnhancedModList extends GuiModList {
|
||||
List<ModContainer> mods = getMods();
|
||||
mods.clear();
|
||||
for (ModContainer m : Loader.instance().getActiveModList()) {
|
||||
if (m.getName().toLowerCase().contains(search.getText().toLowerCase()) && m.getMetadata().parentMod == null) {
|
||||
if (m.getName().toLowerCase(Locale.US).contains(search.getText().toLowerCase(Locale.US)) && m.getMetadata().parentMod == null) {
|
||||
mods.add(m);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ package com.enderio.core.client.render;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -226,12 +227,12 @@ public class TechneUtil {
|
||||
}
|
||||
|
||||
public static Map<String, GroupObject> getModel(String modid, String modelPath) {
|
||||
TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(), modelPath + ".tcn"));
|
||||
TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(Locale.US), modelPath + ".tcn"));
|
||||
return TechneUtil.bakeModel(tm, 1f / 16, new Matrix4f().scale(new Vector3f(-1, -1, 1)));
|
||||
}
|
||||
|
||||
public static Collection<GroupObject> getModelAll(String modid, String modelPath) {
|
||||
TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(), modelPath + ".tcn"));
|
||||
TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(Locale.US), modelPath + ".tcn"));
|
||||
return TechneUtil.bakeModel(tm, 1f / 16, new Matrix4f().scale(new Vector3f(-1, -1, 1))).values();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import lombok.NonNull;
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
@@ -46,7 +47,7 @@ public abstract class AbstractConfigHandler implements IConfigHandler
|
||||
|
||||
public String lc()
|
||||
{
|
||||
return name.toLowerCase();
|
||||
return name.toLowerCase(Locale.US);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.enderio.core.common.config;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
@@ -156,7 +157,7 @@ public class ConfigHandler extends AbstractConfigHandler implements ITweakConfig
|
||||
}
|
||||
|
||||
public void loadRightClickCrops() {
|
||||
JsonConfigReader<PlantInfo> reader = new JsonConfigReader<PlantInfo>(new ModToken(EnderCore.class, EnderCore.MODID.toLowerCase() + "/config"),
|
||||
JsonConfigReader<PlantInfo> reader = new JsonConfigReader<PlantInfo>(new ModToken(EnderCore.class, EnderCore.MODID.toLowerCase(Locale.US) + "/config"),
|
||||
enderConfigFolder.getAbsolutePath() + "/cropConfig.json", PlantInfo.class);
|
||||
for (PlantInfo i : reader) {
|
||||
i.init();
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -76,7 +77,7 @@ public class ResourcePackAssembler
|
||||
this.dir = directory;
|
||||
this.zip = new File(dir.getAbsolutePath() + ".zip");
|
||||
this.name = packName;
|
||||
this.modid = modid.toLowerCase();
|
||||
this.modid = modid.toLowerCase(Locale.US);
|
||||
this.mcmeta = String.format(MC_META_BASE, this.name);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user