mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-19 19:49:55 +00:00
Fixed possible problems with Turkish locale
This commit is contained in:
1 parent
ba22dbb69b
commit
bab27d6189
9 files changed
+46
-24
No files matched your search
@@ -10,6 +10,7 @@ import tombenpotter.emt.ModInformation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static tombenpotter.emt.common.util.ConfigHandler.*;
|
||||
|
||||
@@ -23,10 +24,10 @@ public class EMTGuiConfig extends GuiConfig {
|
||||
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_RANDOM.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_VALUES.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_RESEARCH.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_OUTPUTS.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_RANDOM.toLowerCase(Locale.US))));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_VALUES.toLowerCase(Locale.US))));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_RESEARCH.toLowerCase(Locale.US))));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_OUTPUTS.toLowerCase(Locale.US))));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
+2
-1
@@ -34,6 +34,7 @@ import tombenpotter.emt.ModInformation;
|
||||
import tombenpotter.emt.common.util.ConfigHandler;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
|
||||
@@ -105,7 +106,7 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack torchStack = player.inventory.mainInventory[i];
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) {
|
||||
continue;
|
||||
}
|
||||
Item item = torchStack.getItem();
|
||||
|
||||
@@ -45,6 +45,7 @@ import tombenpotter.emt.common.util.ConfigHandler;
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
|
||||
@@ -157,7 +158,7 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
if (!player.isSneaking()) {
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack torchStack = player.inventory.mainInventory[i];
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) {
|
||||
continue;
|
||||
}
|
||||
Item item = torchStack.getItem();
|
||||
|
||||
@@ -34,6 +34,7 @@ import tombenpotter.emt.ModInformation;
|
||||
import tombenpotter.emt.common.util.ConfigHandler;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
|
||||
@@ -116,7 +117,7 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack torchStack = player.inventory.mainInventory[i];
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) {
|
||||
continue;
|
||||
}
|
||||
Item item = torchStack.getItem();
|
||||
|
||||
@@ -13,6 +13,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class RandomHelper {
|
||||
|
||||
public static boolean isRKMPressed(World world){
|
||||
@@ -27,7 +29,7 @@ public class RandomHelper {
|
||||
public static boolean placeTorch(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack torchStack = player.inventory.mainInventory[i];
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) continue;
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) continue;
|
||||
Item item = torchStack.getItem();
|
||||
if (!(item instanceof ItemBlock)) continue;
|
||||
int oldMeta = torchStack.getItemDamage();
|
||||
|
||||
Reference in new issue
Block a user