mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
the malicious gigglefish from the silly dimension
This commit is contained in:
parent
222f81191e
commit
7fe0a11388
@ -1,5 +1,7 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -34,7 +36,7 @@ public class BlockEnumMulti extends BlockMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
} else {
|
||||
this.blockIcon = reg.registerIcon(this.getTextureName());
|
||||
@ -45,7 +47,7 @@ public class BlockEnumMulti extends BlockMulti {
|
||||
|
||||
if(this.multiName) {
|
||||
Enum num = EnumUtil.grabEnumSafely(this.theEnum, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase();
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
return this.getUnlocalizedName();
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.BlockEnums.EnumBiomeType;
|
||||
|
||||
@ -30,9 +32,9 @@ public class BlockBiomeStone extends BlockEnumMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase());
|
||||
this.iconsTop[i] = reg.registerIcon(this.getTextureName() + "_top." + num.name().toLowerCase());
|
||||
this.iconsLayer[i] = reg.registerIcon(this.getTextureName() + "_layer." + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase(Locale.US));
|
||||
this.iconsTop[i] = reg.registerIcon(this.getTextureName() + "_top." + num.name().toLowerCase(Locale.US));
|
||||
this.iconsLayer[i] = reg.registerIcon(this.getTextureName() + "_layer." + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
@ -87,8 +88,8 @@ public class BlockTallPlant extends BlockEnumMulti implements IPlantable, IGrowa
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase() + ".upper");
|
||||
this.bottomIcons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase() + ".lower");
|
||||
this.icons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase(Locale.US) + ".upper");
|
||||
this.bottomIcons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase(Locale.US) + ".lower");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -77,7 +78,7 @@ public class DeuteriumTower extends BlockDummyable implements ILookOverlay {
|
||||
text.add((tower.power < tower.getMaxPower() / 20 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(tower.power) + "HE");
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase()) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAutosaw;
|
||||
@ -50,7 +51,7 @@ public class MachineAutosaw extends BlockContainer implements ILookOverlay {
|
||||
TileEntityMachineAutosaw saw = (TileEntityMachineAutosaw) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(I18nUtil.resolveKey("hbmfluid." + saw.tank.getTankType().getName().toLowerCase()) + ": " + saw.tank.getFill() + "/" + saw.tank.getMaxFill() + "mB");
|
||||
text.add(I18nUtil.resolveKey("hbmfluid." + saw.tank.getTankType().getName().toLowerCase(Locale.US)) + ": " + saw.tank.getFill() + "/" + saw.tank.getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -70,7 +71,7 @@ public class MachineCatalyticCracker extends BlockDummyable implements ILookOver
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
cracker.tanks[0].setTankType(type);
|
||||
cracker.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -129,7 +130,7 @@ public class MachineCatalyticCracker extends BlockDummyable implements ILookOver
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < cracker.tanks.length; i++)
|
||||
text.add((i < 2 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase()) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 2 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.machine.TileEntityCondenser;
|
||||
@ -38,7 +39,7 @@ public class MachineCondenser extends BlockContainer implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < condenser.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + condenser.tanks[i].getTankType().getName().toLowerCase()) + ": " + condenser.tanks[i].getFill() + "/" + condenser.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + condenser.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + condenser.tanks[i].getFill() + "/" + condenser.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -66,7 +67,7 @@ public class MachineDeuteriumExtractor extends BlockContainer implements ILookOv
|
||||
text.add((extractor.power < extractor.getMaxPower() / 20 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(extractor.power) + "HE");
|
||||
|
||||
for(int i = 0; i < extractor.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + extractor.tanks[i].getTankType().getName().toLowerCase()) + ": " + extractor.tanks[i].getFill() + "/" + extractor.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + extractor.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + extractor.tanks[i].getFill() + "/" + extractor.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -73,7 +74,7 @@ public class MachineFractionTower extends BlockDummyable implements ILookOverlay
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
frac.tanks[0].setTankType(type);
|
||||
frac.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -115,7 +116,7 @@ public class MachineFractionTower extends BlockDummyable implements ILookOverlay
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < cracker.tanks.length; i++)
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase()) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
@ -68,7 +69,7 @@ public class MachineHeatBoiler extends BlockDummyable implements ILookOverlay, I
|
||||
if(type.hasTrait(FT_Heatable.class) && type.getTrait(FT_Heatable.class).getEfficiency(HeatingType.BOILER) > 0) {
|
||||
boiler.tanks[0].setTankType(type);
|
||||
boiler.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -110,7 +111,7 @@ public class MachineHephaestus extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
for(int i = 0; i < heatex.getAllTanks().length; i++) {
|
||||
FluidTank tank = heatex.getAllTanks()[i];
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tank.getTankType().getName().toLowerCase()) + ": " + tank.getFill() + "/" + tank.getMaxFill() + "mB");
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tank.getTankType().getName().toLowerCase(Locale.US)) + ": " + tank.getFill() + "/" + tank.getMaxFill() + "mB");
|
||||
}
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -77,7 +78,7 @@ public class MachineTowerLarge extends BlockDummyable implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase()) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -74,7 +75,7 @@ public class MachineTowerSmall extends BlockDummyable implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase()) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.util.I18nUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -85,16 +86,16 @@ public class MachineTurbineGas extends BlockDummyable implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], -1, -1, 0, x, y, z) || hitCheck(dir, pos[0], pos[1], pos[2], 1, -1, 0, x, y, z)) {
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[0].getTankType().getName().toLowerCase()));
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[1].getTankType().getName().toLowerCase()));
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[0].getTankType().getName().toLowerCase(Locale.US)));
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[1].getTankType().getName().toLowerCase(Locale.US)));
|
||||
}
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], -1, 4, 0, x, y, z) || hitCheck(dir, pos[0], pos[1], pos[2], 1, 4, 0, x, y, z)) {
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[2].getTankType().getName().toLowerCase()));
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[2].getTankType().getName().toLowerCase(Locale.US)));
|
||||
}
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], 0, 5, 1, x, y, z)) {
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[3].getTankType().getName().toLowerCase()));
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[3].getTankType().getName().toLowerCase(Locale.US)));
|
||||
}
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], 0, -4, 1, x, y, z)) {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class PotionConfig {
|
||||
@ -37,9 +39,9 @@ public class PotionConfig {
|
||||
|
||||
String s = CommonConfig.createConfigString(config, CATEGORY_POTION, "8.S0_potionSickness", "Valid configs include \"NORMAL\" and \"TERRARIA\", otherwise potion sickness is turned off", "OFF");
|
||||
|
||||
if("normal".equals(s.toLowerCase()))
|
||||
if("normal".equals(s.toLowerCase(Locale.US)))
|
||||
potionSickness = 1;
|
||||
if("terraria".equals(s.toLowerCase()))
|
||||
if("terraria".equals(s.toLowerCase(Locale.US)))
|
||||
potionSickness = 2;
|
||||
|
||||
}
|
||||
|
||||
@ -1,15 +1,26 @@
|
||||
package com.hbm.entity.train;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.rail.IRailNTM.TrackGauge;
|
||||
import com.hbm.inventory.gui.GuiInfoContainer;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -62,20 +73,12 @@ public class TrainCargoTram extends EntityRailCarRidable implements IGUIProvider
|
||||
return speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackGauge getGauge() {
|
||||
return TrackGauge.STANDARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLengthSpan() {
|
||||
return 1.5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getRiderSeatPosition() {
|
||||
return Vec3.createVectorHelper(0.375, 2.25, 0.5);
|
||||
}
|
||||
@Override public TrackGauge getGauge() { return TrackGauge.STANDARD; }
|
||||
@Override public double getLengthSpan() { return 1.5; }
|
||||
@Override public Vec3 getRiderSeatPosition() { return Vec3.createVectorHelper(0.375, 2.25, 0.5); }
|
||||
@Override public boolean shouldRiderSit() { return false; }
|
||||
@Override public int getSizeInventory() { return 29; }
|
||||
@Override public String getInventoryName() { return this.hasCustomInventoryName() ? this.getEntityName() : "container.trainTram"; }
|
||||
|
||||
@Override
|
||||
public DummyConfig[] getDummies() {
|
||||
@ -95,11 +98,6 @@ public class TrainCargoTram extends EntityRailCarRidable implements IGUIProvider
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRiderSit() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3[] getPassengerSeats() {
|
||||
return new Vec3[] {
|
||||
@ -108,26 +106,112 @@ public class TrainCargoTram extends EntityRailCarRidable implements IGUIProvider
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 27;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.getEntityName() : "container.trainTram";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
//return new ContainerTrainCargoTram(player.inventory, (TrainCargoTram)player.worldObj.getEntityByID(x));
|
||||
return null;
|
||||
return new ContainerTrainCargoTram(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
//return new GUITrainCargoTram(player.inventory, (TrainCargoTram) player.worldObj.getEntityByID(x));
|
||||
return null;
|
||||
return new GUITrainCargoTram(player.inventory, this);
|
||||
}
|
||||
|
||||
/*
|
||||
* ##### ##### # # ##### ##### ### # # ##### ####
|
||||
* # # # ## # # # # # ## # # # #
|
||||
* # # # # # # # ##### # # # # ### ####
|
||||
* # # # # ## # # # # # ## # # #
|
||||
* ##### ##### # # # # # ### # # ##### # #
|
||||
*/
|
||||
public static class ContainerTrainCargoTram extends Container {
|
||||
private TrainCargoTram train;
|
||||
public ContainerTrainCargoTram(InventoryPlayer invPlayer, TrainCargoTram train) {
|
||||
this.train = train;
|
||||
for(int i = 0; i < 4; i++) {
|
||||
for(int j = 0; j < 7; j++) {
|
||||
this.addSlotToContainer(new Slot(train, i * 7 + j, 8 + j * 18, 18 + i * 18));
|
||||
}
|
||||
}
|
||||
this.addSlotToContainer(new Slot(train, 28, 152, 72));
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 122 + i * 18));
|
||||
}
|
||||
}
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 180));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) {
|
||||
ItemStack stackCopy = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(slotIndex);
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
stackCopy = stack.copy();
|
||||
if(slotIndex < train.getSizeInventory()) {
|
||||
if(!this.mergeItemStack(stack, train.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(stackCopy.getItem() instanceof IBatteryItem) {
|
||||
if(!this.mergeItemStack(stack, 28, 29, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if(!this.mergeItemStack(stack, 0, 28, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
return stackCopy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return train.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ##### # # ###
|
||||
* # # # #
|
||||
* # ## # # #
|
||||
* # # # # #
|
||||
* ##### ##### ###
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class GUITrainCargoTram extends GuiInfoContainer {
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/vehicles/gui_cargo_tram.png");
|
||||
private TrainCargoTram train;
|
||||
public GUITrainCargoTram(InventoryPlayer invPlayer, TrainCargoTram train) {
|
||||
super(new ContainerTrainCargoTram(invPlayer, train));
|
||||
this.train = train;
|
||||
this.xSize = 176;
|
||||
this.ySize = 204;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.train.hasCustomInventoryName() ? this.train.getInventoryName() : I18n.format(this.train.getInventoryName());
|
||||
this.fontRendererObj.drawString(name, 140 / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xffffff);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float intero, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.inventory.fluid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@ -55,12 +56,12 @@ public class FluidType {
|
||||
public FluidType(String name, int color, int p, int f, int r, EnumSymbol symbol) {
|
||||
this.stringId = name;
|
||||
this.color = color;
|
||||
this.unlocalized = "hbmfluid." + name.toLowerCase();
|
||||
this.unlocalized = "hbmfluid." + name.toLowerCase(Locale.US);
|
||||
this.poison = p;
|
||||
this.flammability = f;
|
||||
this.reactivity = r;
|
||||
this.symbol = symbol;
|
||||
this.texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/fluids/" + name.toLowerCase() + ".png");
|
||||
this.texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/fluids/" + name.toLowerCase(Locale.US) + ".png");
|
||||
|
||||
this.id = Fluids.registerSelf(this);
|
||||
}
|
||||
@ -124,7 +125,7 @@ public class FluidType {
|
||||
return this.unlocalized;
|
||||
}
|
||||
public String getDict(int quantity) {
|
||||
return "container" + quantity + this.stringId.replace("_", "").toLowerCase();
|
||||
return "container" + quantity + this.stringId.replace("_", "").toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public boolean isHot() {
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
@ -85,7 +86,7 @@ public class GUIAnvil extends GuiContainer {
|
||||
|
||||
private void search(String search) {
|
||||
|
||||
search = search.toLowerCase();
|
||||
search = search.toLowerCase(Locale.US);
|
||||
|
||||
this.recipes.clear();
|
||||
|
||||
@ -320,7 +321,7 @@ public class GUIAnvil extends GuiContainer {
|
||||
for(AStack stack : recipe.input) {
|
||||
if(stack instanceof ComparableStack) {
|
||||
ItemStack input = ((ComparableStack) stack).toStack();
|
||||
list.add(input.getDisplayName().toLowerCase());
|
||||
list.add(input.getDisplayName().toLowerCase(Locale.US));
|
||||
|
||||
} else if(stack instanceof OreDictStack) {
|
||||
OreDictStack input = (OreDictStack) stack;
|
||||
@ -328,7 +329,7 @@ public class GUIAnvil extends GuiContainer {
|
||||
|
||||
if(ores.size() > 0) {
|
||||
for(ItemStack ore : ores) {
|
||||
list.add(ore.getDisplayName().toLowerCase());
|
||||
list.add(ore.getDisplayName().toLowerCase(Locale.US));
|
||||
}
|
||||
|
||||
}
|
||||
@ -336,7 +337,7 @@ public class GUIAnvil extends GuiContainer {
|
||||
}
|
||||
|
||||
for(AnvilOutput stack : recipe.output) {
|
||||
list.add(stack.stack.getDisplayName().toLowerCase());
|
||||
list.add(stack.stack.getDisplayName().toLowerCase(Locale.US));
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@ -51,7 +52,7 @@ public class GUIHadron extends GuiInfoContainer {
|
||||
|
||||
List<String> stats = new ArrayList();
|
||||
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hadron.stats"));
|
||||
stats.add((hadron.stat_success ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + I18n.format("hadron." + this.hadron.stat_state.name().toLowerCase()));
|
||||
stats.add((hadron.stat_success ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + I18n.format("hadron." + this.hadron.stat_state.name().toLowerCase(Locale.US)));
|
||||
if(this.hadron.state.showCoord) stats.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hadron.stats_coord", hadron.stat_x, hadron.stat_y, hadron.stat_z));
|
||||
stats.add(EnumChatFormatting.GRAY + I18nUtil.resolveKey("hadron.stats_momentum", String.format("%,d", hadron.stat_charge)));
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 41, guiTop + 92, 25, 11, mouseX, mouseY, stats.toArray(new String[0]));
|
||||
@ -89,7 +90,7 @@ public class GUIHadron extends GuiInfoContainer {
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
|
||||
String state = I18n.format("hadron." + this.hadron.state.name().toLowerCase());
|
||||
String state = I18n.format("hadron." + this.hadron.state.name().toLowerCase(Locale.US));
|
||||
this.fontRendererObj.drawString(state, this.xSize / 2 - this.fontRendererObj.getStringWidth(state) / 2, 76, this.hadron.state.color);
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.inventory.gui;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@ -96,7 +97,7 @@ public class GUIRBMKConsole extends GuiScreen {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
int id = i * 2 + j + 1;
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 6 + 40 * j, guiTop + 8 + 21 * i, 18, 18, mouseX, mouseY, new String[]{ EnumChatFormatting.YELLOW + I18nUtil.resolveKey("rbmk.console." + console.screens[id - 1].type.name().toLowerCase(), id) } );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 6 + 40 * j, guiTop + 8 + 21 * i, 18, 18, mouseX, mouseY, new String[]{ EnumChatFormatting.YELLOW + I18nUtil.resolveKey("rbmk.console." + console.screens[id - 1].type.name().toLowerCase(Locale.US), id) } );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 24 + 40 * j, guiTop + 8 + 21 * i, 18, 18, mouseX, mouseY, new String[]{ I18nUtil.resolveKey("rbmk.console.assign", id) } );
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.inventory.gui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -166,10 +167,10 @@ public class GUIScreenFluid extends GuiScreen {
|
||||
this.searchArray = new FluidType[9];
|
||||
|
||||
int next = 0;
|
||||
String subs = this.search.getText().toLowerCase();
|
||||
String subs = this.search.getText().toLowerCase(Locale.US);
|
||||
|
||||
for(FluidType type : Fluids.getInNiceOrder()) {
|
||||
String name = I18nUtil.resolveKey(type.getUnlocalizedName()).toLowerCase();
|
||||
String name = I18nUtil.resolveKey(type.getUnlocalizedName()).toLowerCase(Locale.US);
|
||||
|
||||
if(name.contains(subs) && !type.hasNoID()) {
|
||||
this.searchArray[next] = type;
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.inventory.gui;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -122,7 +123,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
return;
|
||||
}
|
||||
|
||||
sub = sub.toLowerCase();
|
||||
sub = sub.toLowerCase(Locale.US);
|
||||
|
||||
outer:
|
||||
for(ItemStack stack : allStacks) {
|
||||
@ -132,7 +133,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
if(o instanceof String) {
|
||||
String text = (String) o;
|
||||
|
||||
if(text.toLowerCase().contains(sub)) {
|
||||
if(text.toLowerCase(Locale.US).contains(sub)) {
|
||||
stacks.add(stack);
|
||||
continue outer;
|
||||
}
|
||||
@ -142,7 +143,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
if(stack.getItem() == ModItems.fluid_identifier) {
|
||||
FluidType fluid = Fluids.fromID(stack.getItemDamage());
|
||||
|
||||
if(I18nUtil.resolveKey(fluid.getUnlocalizedName()).toLowerCase().contains(sub)) {
|
||||
if(I18nUtil.resolveKey(fluid.getUnlocalizedName()).toLowerCase(Locale.US).contains(sub)) {
|
||||
stacks.add(stack);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.inventory.material;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
@ -45,7 +46,7 @@ public class NTMMaterial {
|
||||
}
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
return "hbmmat." + this.names[0].toLowerCase();
|
||||
return "hbmmat." + this.names[0].toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public NTMMaterial setConversion(NTMMaterial mat, int in, int out) {
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
@ -60,7 +61,7 @@ public class GasCentrifugeRecipes {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return I18nUtil.resolveKey("hbmpseudofluid.".concat(this.toString().toLowerCase()));
|
||||
return I18nUtil.resolveKey("hbmpseudofluid.".concat(this.toString().toLowerCase(Locale.US)));
|
||||
}
|
||||
|
||||
public boolean getIfHighSpeed() {
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
@ -151,7 +152,7 @@ public class PressRecipes extends SerializableRecipe {
|
||||
|
||||
writer.name("input");
|
||||
this.writeAStack(entry.getKey().getKey(), writer);
|
||||
writer.name("stamp").value(entry.getKey().getValue().name().toLowerCase());
|
||||
writer.name("stamp").value(entry.getKey().getValue().name().toLowerCase(Locale.US));
|
||||
writer.name("output");
|
||||
this.writeItemStack(entry.getValue(), writer);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.EnumUtil;
|
||||
@ -54,7 +55,7 @@ public class ItemEnumMulti extends Item {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "." + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "." + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
} else {
|
||||
this.itemIcon = reg.registerIcon(this.getIconString());
|
||||
@ -91,7 +92,7 @@ public class ItemEnumMulti extends Item {
|
||||
|
||||
if(multiName) {
|
||||
Enum num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase();
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase(Locale.US);
|
||||
} else {
|
||||
return super.getUnlocalizedName(stack);
|
||||
}
|
||||
|
||||
@ -1031,6 +1031,7 @@ public class ModItems {
|
||||
public static Item can_key;
|
||||
|
||||
public static Item cart;
|
||||
public static Item train;
|
||||
|
||||
public static Item coin_creeper;
|
||||
public static Item coin_radiation;
|
||||
@ -3456,6 +3457,7 @@ public class ModItems {
|
||||
can_key = new Item().setUnlocalizedName("can_key").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_key");
|
||||
|
||||
cart = new ItemModMinecart().setUnlocalizedName("cart");
|
||||
train = new ItemTrain().setUnlocalizedName("train");
|
||||
|
||||
coin_creeper = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_creeper").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_creeper");
|
||||
coin_radiation = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_radiation").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_radiation");
|
||||
@ -7647,6 +7649,7 @@ public class ModItems {
|
||||
|
||||
//Minecarts
|
||||
GameRegistry.registerItem(cart, cart.getUnlocalizedName());
|
||||
GameRegistry.registerItem(train, train.getUnlocalizedName());
|
||||
|
||||
//High Explosive Lenses
|
||||
GameRegistry.registerItem(early_explosive_lenses, early_explosive_lenses.getUnlocalizedName());
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.food;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.entity.effect.EntityVortex;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
@ -93,14 +94,14 @@ public class ItemConserve extends ItemEnumMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
Enum num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
return "item.canned_" + num.name().toLowerCase();
|
||||
return "item.canned_" + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public static enum EnumFoodType {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.food;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.items.machine.ItemChemicalDye.EnumChemDye;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -44,7 +45,7 @@ public class ItemCrayon extends ItemFood {
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
Enum num = EnumUtil.grabEnumSafely(EnumChemDye.class, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase();
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.food;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
|
||||
@ -30,7 +32,7 @@ public class ItemFlask extends ItemEnumMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.util.EnumUtil;
|
||||
@ -27,14 +28,14 @@ public class ItemDrillbit extends ItemEnumMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
Enum num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase();
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
@ -28,14 +29,14 @@ public class ItemPistons extends ItemEnumMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
Enum num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase();
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
@ -87,14 +88,14 @@ public class ItemZirnoxRod extends ItemEnumMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
Enum num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase();
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public static enum EnumZirnoxType {
|
||||
|
||||
@ -3,6 +3,9 @@ package com.hbm.items.special;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.items.special.ItemByproduct.EnumByproduct;
|
||||
import static com.hbm.items.special.ItemByproduct.EnumByproduct.*;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
@ -57,7 +60,7 @@ public class ItemBedrockOre extends ItemEnumMulti {
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
|
||||
EnumBedrockOre ore = EnumUtil.grabEnumSafely(EnumBedrockOre.class, stack.getItemDamage());
|
||||
String oreName = StatCollector.translateToLocal("item.ore." + ore.oreName.toLowerCase());
|
||||
String oreName = StatCollector.translateToLocal("item.ore." + ore.oreName.toLowerCase(Locale.US));
|
||||
return StatCollector.translateToLocalFormatted(this.getUnlocalizedNameInefficiently(stack) + ".name", oreName);
|
||||
}
|
||||
|
||||
|
||||
55
src/main/java/com/hbm/items/special/ItemTrain.java
Normal file
55
src/main/java/com/hbm/items/special/ItemTrain.java
Normal file
@ -0,0 +1,55 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import com.hbm.blocks.rail.IRailNTM;
|
||||
import com.hbm.entity.train.EntityRailCarBase;
|
||||
import com.hbm.entity.train.TrainCargoTram;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemTrain extends ItemEnumMulti {
|
||||
|
||||
public ItemTrain() {
|
||||
super(EnumTrainType.class, true, true);
|
||||
}
|
||||
|
||||
public static enum EnumTrainType {
|
||||
|
||||
CARGO_TRAM(TrainCargoTram.class);
|
||||
|
||||
public Class<? extends EntityRailCarBase> train;
|
||||
private EnumTrainType(Class<? extends EntityRailCarBase> train) {
|
||||
this.train = train;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer entity, World world, int x, int y, int z, int side, float fx, float fy, float fz) {
|
||||
|
||||
Block b = world.getBlock(x, y, z);
|
||||
|
||||
if(b instanceof IRailNTM) {
|
||||
|
||||
EnumTrainType type = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
EntityRailCarBase train = null;
|
||||
try { train = type.train.getConstructor(World.class).newInstance(world); } catch(Exception e) { }
|
||||
|
||||
if(train != null && train.getGauge() == ((IRailNTM) b).getGauge(world, x, y, z)) {
|
||||
if(!world.isRemote) {
|
||||
train.setPosition(x + fx, y + fy, z + fz);
|
||||
train.rotationYaw = entity.rotationYaw;
|
||||
world.spawnEntityInWorld(train);
|
||||
}
|
||||
|
||||
stack.stackSize--;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.entity.cart.*;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -103,7 +104,7 @@ public class ItemModMinecart extends Item {
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
EnumMinecart cart = EnumUtil.grabEnumSafely(EnumMinecart.class, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "." + cart.name().toLowerCase();
|
||||
return super.getUnlocalizedName() + "." + cart.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,7 +127,7 @@ public class ItemModMinecart extends Item {
|
||||
|
||||
for(int i = 0; i < EnumCartBase.values().length; i++) {
|
||||
EnumCartBase base = EnumCartBase.values()[i];
|
||||
bases[i] = reg.registerIcon(this.getIconString() + "." + base.name().toLowerCase());
|
||||
bases[i] = reg.registerIcon(this.getIconString() + "." + base.name().toLowerCase(Locale.US));
|
||||
}
|
||||
|
||||
EnumMinecart[] enums = EnumMinecart.values();
|
||||
@ -134,7 +135,7 @@ public class ItemModMinecart extends Item {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_overlay." + num.name().toLowerCase());
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_overlay." + num.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.tool;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
@ -90,7 +91,7 @@ public class ItemToolAbility extends ItemTool implements IItemAbility, IDepthRoc
|
||||
this.setHarvestLevel("pickaxe", material.getHarvestLevel());
|
||||
this.setHarvestLevel("shovel", material.getHarvestLevel());
|
||||
} else {
|
||||
this.setHarvestLevel(type.toString().toLowerCase(), material.getHarvestLevel());
|
||||
this.setHarvestLevel(type.toString().toLowerCase(Locale.US), material.getHarvestLevel());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.weapon;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoRocket;
|
||||
@ -108,7 +109,7 @@ public class ItemAmmo extends ItemEnumMulti {
|
||||
public String key = "desc.item.ammo.";
|
||||
|
||||
private AmmoItemTrait() {
|
||||
key += this.toString().toLowerCase();
|
||||
key += this.toString().toLowerCase(Locale.US);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
@ -1310,7 +1311,7 @@ public class ModEventHandler {
|
||||
|
||||
String[] msg = message.split(" ");
|
||||
|
||||
String m = msg[0].substring(1, msg[0].length()).toLowerCase();
|
||||
String m = msg[0].substring(1, msg[0].length()).toLowerCase(Locale.US);
|
||||
|
||||
if("gv".equals(m)) {
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.main;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@ -446,7 +447,7 @@ public class ModEventHandlerClient {
|
||||
if(invis != null && invis.getAmplifier() > 0)
|
||||
event.setCanceled(true);
|
||||
|
||||
if(player.getDisplayName().toLowerCase().equals("martmn")) {
|
||||
if(player.getDisplayName().toLowerCase(Locale.US).equals("martmn")) {
|
||||
|
||||
event.setCanceled(true);
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine.rbmk;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
@ -389,7 +390,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
short col = this.data.getShort("color");
|
||||
|
||||
if(col >= 0 && col < RBMKColor.values().length)
|
||||
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("rbmk.control." + RBMKColor.values()[col].name().toLowerCase()));
|
||||
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("rbmk.control." + RBMKColor.values()[col].name().toLowerCase(Locale.US)));
|
||||
}
|
||||
|
||||
case CONTROL_AUTO:
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.handler.HazmatRegistry;
|
||||
@ -241,7 +242,7 @@ public class ArmorUtil {
|
||||
|
||||
for(String metal : metals) {
|
||||
|
||||
if(name.toLowerCase().contains(metal))
|
||||
if(name.toLowerCase(Locale.US).contains(metal))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 218 B |
Loading…
x
Reference in New Issue
Block a user