Fix toLowerCase stuff

This commit is contained in:
Ellpeck 2015-11-03 23:27:24 +01:00
parent 93bc1d4f2a
commit 184b0c9770
3 changed files with 7 additions and 3 deletions

View file

@ -33,6 +33,7 @@ import java.net.URI;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiBooklet extends GuiScreen{ public class GuiBooklet extends GuiScreen{
@ -185,7 +186,7 @@ public class GuiBooklet extends GuiScreen{
currentEntry.chapters.clear(); currentEntry.chapters.clear();
for(BookletChapter chapter : currentEntry.allChapters){ for(BookletChapter chapter : currentEntry.allChapters){
if(chapter.getLocalizedName().toLowerCase().contains(this.searchField.getText().toLowerCase())){ if(chapter.getLocalizedName().toLowerCase(Locale.ROOT).contains(this.searchField.getText().toLowerCase(Locale.ROOT))){
currentEntry.chapters.add(chapter); currentEntry.chapters.add(chapter);
} }
} }

View file

@ -13,13 +13,15 @@ package ellpeck.actuallyadditions.util;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import java.util.Locale;
public class ModUtil{ public class ModUtil{
public static final String VERSION = "1.7.10-r2"; public static final String VERSION = "1.7.10-r2";
public static final String MOD_ID = "ActuallyAdditions"; public static final String MOD_ID = "ActuallyAdditions";
public static final String NAME = "Actually Additions"; public static final String NAME = "Actually Additions";
public static final String MOD_ID_LOWER = MOD_ID.toLowerCase(); public static final String MOD_ID_LOWER = MOD_ID.toLowerCase(Locale.ROOT);
public static final Logger LOGGER = LogManager.getLogger(MOD_ID); public static final Logger LOGGER = LogManager.getLogger(MOD_ID);

View file

@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.util;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import java.util.Locale;
import java.util.Objects; import java.util.Objects;
public class StringUtil{ public class StringUtil{
@ -42,7 +43,7 @@ public class StringUtil{
return null; return null;
} }
else{ else{
return string.toLowerCase(); return string.toLowerCase(Locale.ROOT);
} }
} }
} }