mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Changed StatCollector.translateToLocal() to StringUtil.localize() which does exactly the same. Just for convenience.
This commit is contained in:
parent
8189e569bb
commit
f1dda0c171
40 changed files with 163 additions and 223 deletions
|
@ -1,8 +1,8 @@
|
||||||
package ellpeck.actuallyadditions.achievement;
|
package ellpeck.actuallyadditions.achievement;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.stats.Achievement;
|
import net.minecraft.stats.Achievement;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.common.AchievementPage;
|
import net.minecraftforge.common.AchievementPage;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -24,7 +24,7 @@ public class InitAchievements{
|
||||||
achievementList.add(TheAchievements.values()[i].ach);
|
achievementList.add(TheAchievements.values()[i].ach);
|
||||||
}
|
}
|
||||||
|
|
||||||
theAchievementPage = new AchievementPage(StatCollector.translateToLocal("achievement.page." + ModUtil.MOD_ID_LOWER), achievementList.toArray(new Achievement[achievementList.size()]));
|
theAchievementPage = new AchievementPage(StringUtil.localize("achievement.page."+ModUtil.MOD_ID_LOWER), achievementList.toArray(new Achievement[achievementList.size()]));
|
||||||
AchievementPage.registerAchievementPage(theAchievementPage);
|
AchievementPage.registerAchievementPage(theAchievementPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
|
||||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.INameableItem;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
@ -16,7 +17,6 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
@ -159,7 +159,7 @@ public class BlockColoredLamp extends Block implements INameableItem{
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack stack){
|
public String getItemStackDisplayName(ItemStack stack){
|
||||||
if(stack.getItemDamage() >= allLampTypes.length) return null;
|
if(stack.getItemDamage() >= allLampTypes.length) return null;
|
||||||
return StatCollector.translateToLocal(this.getUnlocalizedName(stack) + ".name") + (((BlockColoredLamp)this.theBlock).isOn ? " (" + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".onSuffix.desc") + ")" : "");
|
return StringUtil.localize(this.getUnlocalizedName(stack)+".name") + (((BlockColoredLamp)this.theBlock).isOn ? " (" + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".onSuffix.desc") + ")" : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,7 +15,6 @@ import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -103,7 +102,7 @@ public class BlockInputter extends BlockContainerBase implements INameableItem{
|
||||||
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS)+1;
|
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS)+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return StatCollector.translateToLocal(this.getUnlocalizedName() + ".name") + " (" + StatCollector.translateToLocal("tile." + ModUtil.MOD_ID_LOWER + ".blockInputter.add." + this.toPick + ".name") + ")";
|
return StringUtil.localize(this.getUnlocalizedName()+".name") + " (" + StringUtil.localize("tile."+ModUtil.MOD_ID_LOWER+".blockInputter.add."+this.toPick+".name") + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -115,13 +114,13 @@ public class BlockInputter extends BlockContainerBase implements INameableItem{
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc.1"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc.1"));
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocalFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc.2", StringUtil.OBFUSCATED, StringUtil.LIGHT_GRAY));
|
list.add(StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc.2", StringUtil.OBFUSCATED, StringUtil.LIGHT_GRAY));
|
||||||
for(int i = 3; i <= 7; i++){
|
for(int i = 3; i <= 7; i++){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".blockInputter.desc." + i));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc."+i));
|
||||||
}
|
}
|
||||||
if((((BlockInputter)theBlock).isAdvanced)) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)theBlock).getName() + ".desc"));
|
if((((BlockInputter)theBlock).isAdvanced)) list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+((INameableItem)theBlock).getName()+".desc"));
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.blocks;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityLavaFactoryController;
|
import ellpeck.actuallyadditions.tile.TileEntityLavaFactoryController;
|
||||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
@ -17,7 +14,6 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -58,10 +54,10 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IN
|
||||||
if(factory != null){
|
if(factory != null){
|
||||||
int state = factory.isMultiblock();
|
int state = factory.isMultiblock();
|
||||||
if(state == TileEntityLavaFactoryController.NOT_MULTI){
|
if(state == TileEntityLavaFactoryController.NOT_MULTI){
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".factory.notPart.desc")));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.notPart.desc")));
|
||||||
}
|
}
|
||||||
if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){
|
if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc")));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc")));
|
||||||
}
|
}
|
||||||
player.addChatComponentMessage(new ChatComponentText(factory.storage.getEnergyStored() + "/" + factory.storage.getMaxEnergyStored() + " RF"));
|
player.addChatComponentMessage(new ChatComponentText(factory.storage.getEnergyStored() + "/" + factory.storage.getMaxEnergyStored() + " RF"));
|
||||||
}
|
}
|
||||||
|
@ -102,7 +98,7 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IN
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
BlockUtil.addInformation(theBlock, list, 3, "");
|
BlockUtil.addInformation(theBlock, list, 3, "");
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " + TileEntityLavaFactoryController.energyNeededToProduceLava + " RF/B");
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " + TileEntityLavaFactoryController.energyNeededToProduceLava + " RF/B");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -61,33 +60,33 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte
|
||||||
if(tile != null){
|
if(tile != null){
|
||||||
if(tile instanceof TileEntityPhantomface){
|
if(tile instanceof TileEntityPhantomface){
|
||||||
TileEntityPhantomface phantom = (TileEntityPhantomface)tile;
|
TileEntityPhantomface phantom = (TileEntityPhantomface)tile;
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + phantom.range));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + phantom.range));
|
||||||
if(phantom.hasBoundTile()){
|
if(phantom.hasBoundTile()){
|
||||||
int distance = (int)Vec3.createVectorHelper(x, y, z).distanceTo(Vec3.createVectorHelper(phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ()));
|
int distance = (int)Vec3.createVectorHelper(x, y, z).distanceTo(Vec3.createVectorHelper(phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ()));
|
||||||
Item item = phantom.boundPosition.getItemBlock();
|
Item item = phantom.boundPosition.getItemBlock();
|
||||||
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.boundPosition.getBlock(), 1, phantom.boundPosition.getMetadata()));
|
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.boundPosition.getBlock(), 1, phantom.boundPosition.getMetadata()));
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ(), distance)));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ(), distance)));
|
||||||
|
|
||||||
if(phantom.isBoundTileInRage()) player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc")));
|
if(phantom.isBoundTileInRage()) player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc")));
|
||||||
else player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc")));
|
else player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc")));
|
||||||
}
|
}
|
||||||
else player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc")));
|
else player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc")));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(tile instanceof TileEntityPhantomPlacer){
|
else if(tile instanceof TileEntityPhantomPlacer){
|
||||||
if(player.isSneaking()){
|
if(player.isSneaking()){
|
||||||
TileEntityPhantomPlacer phantom = (TileEntityPhantomPlacer)tile;
|
TileEntityPhantomPlacer phantom = (TileEntityPhantomPlacer)tile;
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + phantom.range));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + phantom.range));
|
||||||
if(phantom.hasBoundPosition()){
|
if(phantom.hasBoundPosition()){
|
||||||
int distance = (int)Vec3.createVectorHelper(x, y, z).distanceTo(Vec3.createVectorHelper(phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ()));
|
int distance = (int)Vec3.createVectorHelper(x, y, z).distanceTo(Vec3.createVectorHelper(phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ()));
|
||||||
Item item = phantom.boundPosition.getItemBlock();
|
Item item = phantom.boundPosition.getItemBlock();
|
||||||
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.boundPosition.getBlock(), 1, phantom.boundPosition.getMetadata()));
|
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.boundPosition.getBlock(), 1, phantom.boundPosition.getMetadata()));
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ(), distance)));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.boundPosition.getX(), phantom.boundPosition.getY(), phantom.boundPosition.getZ(), distance)));
|
||||||
|
|
||||||
if(phantom.isBoundPositionInRange()) player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc")));
|
if(phantom.isBoundPositionInRange()) player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc")));
|
||||||
else player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc")));
|
else player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc")));
|
||||||
}
|
}
|
||||||
else player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc")));
|
else player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc")));
|
||||||
}
|
}
|
||||||
else player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.PHANTOM_PLACER.ordinal(), world, x, y, z);
|
else player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.PHANTOM_PLACER.ordinal(), world, x, y, z);
|
||||||
}
|
}
|
||||||
|
@ -167,10 +166,10 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte
|
||||||
BlockUtil.addInformation(theBlock, list, 2, "");
|
BlockUtil.addInformation(theBlock, list, 2, "");
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
if(((BlockPhantomface)this.theBlock).type == LIQUIFACE){
|
if(((BlockPhantomface)this.theBlock).type == LIQUIFACE){
|
||||||
list.add(StringUtil.ORANGE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.3"));
|
list.add(StringUtil.ORANGE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.3"));
|
||||||
list.add(StringUtil.ORANGE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.4"));
|
list.add(StringUtil.ORANGE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.4"));
|
||||||
}
|
}
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + ((BlockPhantomface)theBlock).range);
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + ((BlockPhantomface)theBlock).range);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import ellpeck.actuallyadditions.util.KeyUtil;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.StringUtil;
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
@ -16,45 +15,45 @@ public class TooltipEvent{
|
||||||
private static final String TEXT_PRE = StringUtil.GRAY+" ";
|
private static final String TEXT_PRE = StringUtil.GRAY+" ";
|
||||||
private static final String HEADER_PRE = StringUtil.LIGHT_GRAY+" -";
|
private static final String HEADER_PRE = StringUtil.LIGHT_GRAY+" -";
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent(priority = EventPriority.LOW)
|
||||||
public void onTooltipEvent(ItemTooltipEvent event){
|
public void onTooltipEvent(ItemTooltipEvent event){
|
||||||
if(event.itemStack.getItem() != null){
|
if(event.itemStack.getItem() != null){
|
||||||
if(KeyUtil.isControlPressed()){
|
if(KeyUtil.isControlPressed()){
|
||||||
if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){
|
if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){
|
||||||
event.toolTip.add(StringUtil.GRAY+StringUtil.ITALIC+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".extraInfo.desc")+":");
|
event.toolTip.add(StringUtil.GRAY+StringUtil.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".extraInfo.desc")+":");
|
||||||
|
|
||||||
//OreDict Names
|
//OreDict Names
|
||||||
int[] oreIDs = OreDictionary.getOreIDs(event.itemStack);
|
int[] oreIDs = OreDictionary.getOreIDs(event.itemStack);
|
||||||
event.toolTip.add(HEADER_PRE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".oredictName.desc")+":");
|
event.toolTip.add(HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".oredictName.desc")+":");
|
||||||
if(oreIDs.length > 0){
|
if(oreIDs.length > 0){
|
||||||
for(int oreID : oreIDs){
|
for(int oreID : oreIDs){
|
||||||
event.toolTip.add(TEXT_PRE+OreDictionary.getOreName(oreID));
|
event.toolTip.add(TEXT_PRE+OreDictionary.getOreName(oreID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.toolTip.add(TEXT_PRE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".noOredictNameAvail.desc"));
|
event.toolTip.add(TEXT_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".noOredictNameAvail.desc"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Code Name
|
//Code Name
|
||||||
event.toolTip.add(HEADER_PRE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".codeName.desc")+":");
|
event.toolTip.add(HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".codeName.desc")+":");
|
||||||
event.toolTip.add(TEXT_PRE+Item.itemRegistry.getNameForObject(event.itemStack.getItem()));
|
event.toolTip.add(TEXT_PRE+Item.itemRegistry.getNameForObject(event.itemStack.getItem()));
|
||||||
|
|
||||||
//Base Item's Unlocalized Name
|
//Base Item's Unlocalized Name
|
||||||
String baseName = event.itemStack.getItem().getUnlocalizedName();
|
String baseName = event.itemStack.getItem().getUnlocalizedName();
|
||||||
event.toolTip.add(HEADER_PRE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".baseUnlocName.desc")+":");
|
event.toolTip.add(HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".baseUnlocName.desc")+":");
|
||||||
event.toolTip.add(TEXT_PRE+baseName);
|
event.toolTip.add(TEXT_PRE+baseName);
|
||||||
|
|
||||||
//Unlocalized Name
|
//Unlocalized Name
|
||||||
String metaName = event.itemStack.getItem().getUnlocalizedName(event.itemStack);
|
String metaName = event.itemStack.getItem().getUnlocalizedName(event.itemStack);
|
||||||
if(!metaName.equals(baseName)){
|
if(!metaName.equals(baseName)){
|
||||||
event.toolTip.add(HEADER_PRE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".unlocName.desc")+":");
|
event.toolTip.add(HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".unlocName.desc")+":");
|
||||||
event.toolTip.add(TEXT_PRE+metaName);
|
event.toolTip.add(TEXT_PRE+metaName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(ConfigBoolValues.CTRL_INFO_FOR_EXTRA_INFO.isEnabled()){
|
if(ConfigBoolValues.CTRL_INFO_FOR_EXTRA_INFO.isEnabled()){
|
||||||
event.toolTip.add(StringUtil.GRAY+StringUtil.ITALIC+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".ctrlForMoreInfo.desc"));
|
event.toolTip.add(StringUtil.GRAY+StringUtil.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".ctrlForMoreInfo.desc"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ import ellpeck.actuallyadditions.inventory.ContainerCanolaPress;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityCanolaPress;
|
import ellpeck.actuallyadditions.tile.TileEntityCanolaPress;
|
||||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -67,7 +67,7 @@ public class GuiCanolaPress extends GuiContainer{
|
||||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
String text2 = this.press.tank.getFluidAmount() + "/" + this.press.tank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.canolaoil");
|
String text2 = this.press.tank.getFluidAmount() + "/" + this.press.tank.getCapacity() + " mB " +StringUtil.localize("fluid.canolaoil");
|
||||||
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
||||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,12 @@ import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityCoffeeMachine;
|
import ellpeck.actuallyadditions.tile.TileEntityCoffeeMachine;
|
||||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fluids.FluidRegistry;
|
import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
@ -49,7 +49,7 @@ public class GuiCoffeeMachine extends GuiContainer{
|
||||||
public void initGui(){
|
public void initGui(){
|
||||||
super.initGui();
|
super.initGui();
|
||||||
|
|
||||||
GuiButton buttonOkay = new GuiButton(0, guiLeft+60, guiTop+11, 58, 20, StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.ok"));
|
GuiButton buttonOkay = new GuiButton(0, guiLeft+60, guiTop+11, 58, 20, StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.ok"));
|
||||||
this.buttonList.add(buttonOkay);
|
this.buttonList.add(buttonOkay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ public class GuiCoffeeMachine extends GuiContainer{
|
||||||
this.func_146283_a(Collections.singletonList(text3), x, y);
|
this.func_146283_a(Collections.singletonList(text3), x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
String text2 = this.machine.coffeeCacheAmount + "/" + this.machine.coffeeCacheMaxAmount+" "+StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.coffee");
|
String text2 = this.machine.coffeeCacheAmount + "/" + this.machine.coffeeCacheMaxAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.coffee");
|
||||||
if(x >= guiLeft+40 && y >= guiTop+25 && x <= guiLeft+49 && y <= guiTop+56){
|
if(x >= guiLeft+40 && y >= guiTop+25 && x <= guiLeft+49 && y <= guiTop+56){
|
||||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@ import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityFeeder;
|
import ellpeck.actuallyadditions.tile.TileEntityFeeder;
|
||||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -57,7 +57,7 @@ public class GuiFeeder extends GuiContainer{
|
||||||
public void drawScreen(int x, int y, float f){
|
public void drawScreen(int x, int y, float f){
|
||||||
super.drawScreen(x, y, f);
|
super.drawScreen(x, y, f);
|
||||||
if(x >= guiLeft+69 && y >= guiTop+30 && x <= guiLeft+69+10 && y <= guiTop+30+10){
|
if(x >= guiLeft+69 && y >= guiTop+30 && x <= guiLeft+69+10 && y <= guiTop+30+10){
|
||||||
String[] array = new String[]{(this.tileFeeder.currentAnimalAmount+" "+StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold) ? StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold ? StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.tooMany") : StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.notEnough")))};
|
String[] array = new String[]{(this.tileFeeder.currentAnimalAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold) ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.tooMany") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.notEnough")))};
|
||||||
this.func_146283_a(Arrays.asList(array), x, y);
|
this.func_146283_a(Arrays.asList(array), x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ import ellpeck.actuallyadditions.inventory.ContainerFermentingBarrel;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityFermentingBarrel;
|
import ellpeck.actuallyadditions.tile.TileEntityFermentingBarrel;
|
||||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -63,12 +63,12 @@ public class GuiFermentingBarrel extends GuiContainer{
|
||||||
public void drawScreen(int x, int y, float f){
|
public void drawScreen(int x, int y, float f){
|
||||||
super.drawScreen(x, y, f);
|
super.drawScreen(x, y, f);
|
||||||
|
|
||||||
String text1 = this.press.canolaTank.getFluidAmount() + "/" + this.press.canolaTank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.canolaoil");
|
String text1 = this.press.canolaTank.getFluidAmount() + "/" + this.press.canolaTank.getCapacity() + " mB " +StringUtil.localize("fluid.canolaoil");
|
||||||
if(x >= guiLeft+61 && y >= guiTop+6 && x <= guiLeft+76 && y <= guiTop+88){
|
if(x >= guiLeft+61 && y >= guiTop+6 && x <= guiLeft+76 && y <= guiTop+88){
|
||||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
String text2 = this.press.oilTank.getFluidAmount() + "/" + this.press.oilTank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.oil");
|
String text2 = this.press.oilTank.getFluidAmount() + "/" + this.press.oilTank.getCapacity() + " mB " +StringUtil.localize("fluid.oil");
|
||||||
if(x >= guiLeft+99 && y >= guiTop+6 && x <= guiLeft+114 && y <= guiTop+88){
|
if(x >= guiLeft+99 && y >= guiTop+6 && x <= guiLeft+114 && y <= guiTop+88){
|
||||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
@ -54,13 +53,13 @@ public class GuiInputter extends GuiContainer{
|
||||||
public static final int OFFSET_ADVANCED = 12+36;
|
public static final int OFFSET_ADVANCED = 12+36;
|
||||||
|
|
||||||
public static final String[] sideString = new String[]{
|
public static final String[] sideString = new String[]{
|
||||||
StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.disabled"),
|
StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.disabled"),
|
||||||
StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.up"),
|
StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.up"),
|
||||||
StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.down"),
|
StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.down"),
|
||||||
StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.north"),
|
StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.north"),
|
||||||
StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.east"),
|
StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.east"),
|
||||||
StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.south"),
|
StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.south"),
|
||||||
StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.west")};
|
StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.west")};
|
||||||
|
|
||||||
public GuiInputter(InventoryPlayer inventory, TileEntityBase tile, int x, int y, int z, World world, boolean isAdvanced){
|
public GuiInputter(InventoryPlayer inventory, TileEntityBase tile, int x, int y, int z, World world, boolean isAdvanced){
|
||||||
super(new ContainerInputter(inventory, tile, isAdvanced));
|
super(new ContainerInputter(inventory, tile, isAdvanced));
|
||||||
|
@ -188,8 +187,8 @@ public class GuiInputter extends GuiContainer{
|
||||||
this.mc.getTextureManager().bindTexture(this.isAdvanced ? resLocAdvanced : resLoc);
|
this.mc.getTextureManager().bindTexture(this.isAdvanced ? resLocAdvanced : resLoc);
|
||||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93+(isAdvanced ? OFFSET_ADVANCED : 0));
|
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93+(isAdvanced ? OFFSET_ADVANCED : 0));
|
||||||
|
|
||||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.pull"), guiLeft+22+3, guiTop+32+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.pull"), guiLeft+22+3, guiTop+32+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.put"), guiLeft+107+3, guiTop+32+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.put"), guiLeft+107+3, guiTop+32+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||||
|
|
||||||
this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft+24+1, guiTop+45+3+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft+24+1, guiTop+45+3+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||||
this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft+109+1, guiTop+45+3+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft+109+1, guiTop+45+3+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||||
|
@ -214,11 +213,11 @@ public class GuiInputter extends GuiContainer{
|
||||||
this.whitelistPut.displayString = this.tileInputter.isPutWhitelist ? "O" : "X";
|
this.whitelistPut.displayString = this.tileInputter.isPutWhitelist ? "O" : "X";
|
||||||
|
|
||||||
if(this.isAdvanced){
|
if(this.isAdvanced){
|
||||||
String text1 = this.tileInputter.isPullWhitelist ? StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist");
|
String text1 = this.tileInputter.isPullWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist");
|
||||||
if(x >= guiLeft+3 && y >= guiTop+16 && x <= guiLeft+18 && y <= guiTop+31){
|
if(x >= guiLeft+3 && y >= guiTop+16 && x <= guiLeft+18 && y <= guiTop+31){
|
||||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||||
}
|
}
|
||||||
String text2 = this.tileInputter.isPutWhitelist ? StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist");
|
String text2 = this.tileInputter.isPutWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist");
|
||||||
if(x >= guiLeft+157 && y >= guiTop+16 && x <= guiLeft+172 && y <= guiTop+31){
|
if(x >= guiLeft+157 && y >= guiTop+16 && x <= guiLeft+172 && y <= guiTop+31){
|
||||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||||
}
|
}
|
||||||
|
@ -227,19 +226,19 @@ public class GuiInputter extends GuiContainer{
|
||||||
int newTopOffset = this.guiTop+(this.isAdvanced ? OFFSET_ADVANCED : 0);
|
int newTopOffset = this.guiTop+(this.isAdvanced ? OFFSET_ADVANCED : 0);
|
||||||
//Info Mode on!
|
//Info Mode on!
|
||||||
if(x >= guiLeft+11 && y >= newTopOffset+65 && x <= guiLeft+11+31 && y <= newTopOffset+65+12){
|
if(x >= guiLeft+11 && y >= newTopOffset+65 && x <= guiLeft+11+31 && y <= newTopOffset+65+12){
|
||||||
String[] strings = StatCollector.translateToLocalFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("[p]", StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.pull")).split(Pattern.quote("|"));
|
String[] strings = StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("[p]", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.pull")).split(Pattern.quote("|"));
|
||||||
this.func_146283_a(Arrays.asList(strings), x, y);
|
this.func_146283_a(Arrays.asList(strings), x, y);
|
||||||
}
|
}
|
||||||
if(x >= guiLeft+96 && y >= newTopOffset+65 && x <= guiLeft+96+31 && y <= newTopOffset+65+12){
|
if(x >= guiLeft+96 && y >= newTopOffset+65 && x <= guiLeft+96+31 && y <= newTopOffset+65+12){
|
||||||
String[] strings = StatCollector.translateToLocalFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("[p]", StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.put")).split(Pattern.quote("|"));
|
String[] strings = StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("[p]", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.put")).split(Pattern.quote("|"));
|
||||||
this.func_146283_a(Arrays.asList(strings), x, y);
|
this.func_146283_a(Arrays.asList(strings), x, y);
|
||||||
}
|
}
|
||||||
if(x >= guiLeft+48 && y >= newTopOffset+65 && x <= guiLeft+48+31 && y <= newTopOffset+65+12){
|
if(x >= guiLeft+48 && y >= newTopOffset+65 && x <= guiLeft+48+31 && y <= newTopOffset+65+12){
|
||||||
String[] strings = StatCollector.translateToLocalFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("[p]", StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.pull")).split(Pattern.quote("|"));
|
String[] strings = StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("[p]", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.pull")).split(Pattern.quote("|"));
|
||||||
this.func_146283_a(Arrays.asList(strings), x, y);
|
this.func_146283_a(Arrays.asList(strings), x, y);
|
||||||
}
|
}
|
||||||
if(x >= guiLeft+133 && y >= newTopOffset+65 && x <= guiLeft+133+31 && y <= newTopOffset+65+12){
|
if(x >= guiLeft+133 && y >= newTopOffset+65 && x <= guiLeft+133+31 && y <= newTopOffset+65+12){
|
||||||
String[] strings = StatCollector.translateToLocalFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("[p]", StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.put")).split(Pattern.quote("|"));
|
String[] strings = StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("[p]", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.put")).split(Pattern.quote("|"));
|
||||||
this.func_146283_a(Arrays.asList(strings), x, y);
|
this.func_146283_a(Arrays.asList(strings), x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ import ellpeck.actuallyadditions.inventory.ContainerOilGenerator;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityOilGenerator;
|
import ellpeck.actuallyadditions.tile.TileEntityOilGenerator;
|
||||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -66,7 +66,7 @@ public class GuiOilGenerator extends GuiContainer{
|
||||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||||
}
|
}
|
||||||
String text2 = this.generator.tank.getFluidAmount() + "/" + this.generator.tank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.oil");
|
String text2 = this.generator.tank.getFluidAmount() + "/" + this.generator.tank.getCapacity() + " mB " +StringUtil.localize("fluid.oil");
|
||||||
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
||||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ import ellpeck.actuallyadditions.inventory.ContainerOreMagnet;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityOreMagnet;
|
import ellpeck.actuallyadditions.tile.TileEntityOreMagnet;
|
||||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -62,7 +62,7 @@ public class GuiOreMagnet extends GuiContainer{
|
||||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||||
}
|
}
|
||||||
String text2 = this.magnet.tank.getFluidAmount() + "/" + this.magnet.tank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.oil");
|
String text2 = this.magnet.tank.getFluidAmount() + "/" + this.magnet.tank.getCapacity() + " mB " +StringUtil.localize("fluid.oil");
|
||||||
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
||||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,7 @@ package ellpeck.actuallyadditions.items;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -13,7 +10,6 @@ import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemArmor;
|
import net.minecraft.item.ItemArmor;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -50,8 +46,8 @@ public class ItemArmorAA extends ItemArmor implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,12 @@ package ellpeck.actuallyadditions.items;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -51,7 +47,7 @@ public class ItemBattery extends ItemEnergy implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".itemBattery.desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemBattery.desc"));
|
||||||
list.add(this.getEnergyStored(stack) + "/" + this.getMaxEnergyStored(stack) + " RF");
|
list.add(this.getEnergyStored(stack) + "/" + this.getMaxEnergyStored(stack) + " RF");
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
|
|
|
@ -4,10 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
@ -19,7 +16,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.potion.Potion;
|
import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -50,7 +46,7 @@ public class ItemCoffee extends ItemFood implements INameableItem{
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getExtraText(){
|
public String getExtraText(){
|
||||||
return StatCollector.translateToLocal("container.nei." + ModUtil.MOD_ID_LOWER + ".coffee.extra.milk");
|
return StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.extra.milk");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
registerIngredient(new Ingredient(new ItemStack(Items.sugar), new PotionEffect[]{new PotionEffect(Potion.moveSpeed.getId(), 30, 0)}, 4));
|
registerIngredient(new Ingredient(new ItemStack(Items.sugar), new PotionEffect[]{new PotionEffect(Potion.moveSpeed.getId(), 30, 0)}, 4));
|
||||||
|
@ -199,19 +195,19 @@ public class ItemCoffee extends ItemFood implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.1"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.1"));
|
||||||
list.add(StatCollector.translateToLocalFormatted("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.2", this.getMaxDamage()+1));
|
list.add(StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.2", this.getMaxDamage()+1));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+this.func_150905_g(stack));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+this.func_150905_g(stack));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+this.func_150906_h(stack));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+this.func_150906_h(stack));
|
||||||
list.add("");
|
list.add("");
|
||||||
|
|
||||||
PotionEffect[] effects = getEffectsFromStack(stack);
|
PotionEffect[] effects = getEffectsFromStack(stack);
|
||||||
if(effects != null && effects.length > 0){
|
if(effects != null && effects.length > 0){
|
||||||
for(PotionEffect effect : effects){
|
for(PotionEffect effect : effects){
|
||||||
list.add(StatCollector.translateToLocal(effect.getEffectName())+" "+(effect.getAmplifier()+1)+ " (" + Potion.getDurationString(new PotionEffect(0, effect.getDuration()*20, 0)) + ")");
|
list.add(StringUtil.localize(effect.getEffectName())+" "+(effect.getAmplifier()+1)+ " (" + Potion.getDurationString(new PotionEffect(0, effect.getDuration()*20, 0)) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".noEffects.desc"));
|
else list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".noEffects.desc"));
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,13 @@ package ellpeck.actuallyadditions.items;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -87,11 +83,11 @@ public class ItemDrillUpgrade extends Item implements INameableItem{
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
ItemUtil.addInformation(this, list, this.type == UpgradeType.PLACER ? 3 : 1, "");
|
ItemUtil.addInformation(this, list, this.type == UpgradeType.PLACER ? 3 : 1, "");
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".itemDrillUpgrade.desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemDrillUpgrade.desc"));
|
||||||
if(this.type == UpgradeType.PLACER){
|
if(this.type == UpgradeType.PLACER){
|
||||||
int slot = getSlotToPlaceFrom(stack);
|
int slot = getSlotToPlaceFrom(stack);
|
||||||
if(slot >= 0){
|
if(slot >= 0){
|
||||||
list.add(StatCollector.translateToLocal("info."+ModUtil.MOD_ID_LOWER+".gui.slot")+": "+(slot+1));
|
list.add(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.slot")+": "+(slot+1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,13 @@ package ellpeck.actuallyadditions.items;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.*;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -95,9 +91,9 @@ public class ItemFoods extends ItemFood implements INameableItem{
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
if(stack.getItemDamage() < allFoods.length){
|
if(stack.getItemDamage() < allFoods.length){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+allFoods[stack.getItemDamage()].getName()+".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+allFoods[stack.getItemDamage()].getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+allFoods[stack.getItemDamage()].healAmount);
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+allFoods[stack.getItemDamage()].healAmount);
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+allFoods[stack.getItemDamage()].saturation);
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+allFoods[stack.getItemDamage()].saturation);
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.items;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheJams;
|
import ellpeck.actuallyadditions.items.metalists.TheJams;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
@ -18,7 +15,6 @@ import net.minecraft.item.ItemFood;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -100,12 +96,12 @@ public class ItemJams extends ItemFood implements INameableItem{
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
if(stack.getItemDamage() < allJams.length){
|
if(stack.getItemDamage() < allJams.length){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.1"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.1"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+allJams[stack.getItemDamage()].getName()+".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+allJams[stack.getItemDamage()].getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.2"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.2"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.3"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.3"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+allJams[stack.getItemDamage()].healAmount);
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+allJams[stack.getItemDamage()].healAmount);
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+allJams[stack.getItemDamage()].saturation);
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+allJams[stack.getItemDamage()].saturation);
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,13 @@ package ellpeck.actuallyadditions.items;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -48,8 +44,8 @@ public class ItemKnife extends Item implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -112,9 +111,9 @@ public class ItemLeafBlower extends Item implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc." + 1));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc."+1));
|
||||||
list.add(StringUtil.ITALIC + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".itemLeafBlower.desc.2"));
|
list.add(StringUtil.ITALIC + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemLeafBlower.desc.2"));
|
||||||
list.add(StringUtil.ITALIC + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".itemLeafBlower.desc.3"));
|
list.add(StringUtil.ITALIC + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemLeafBlower.desc.3"));
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityPhantomPlacer;
|
import ellpeck.actuallyadditions.tile.TileEntityPhantomPlacer;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityPhantomface;
|
import ellpeck.actuallyadditions.tile.TileEntityPhantomface;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.WorldPos;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -18,7 +15,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.DimensionManager;
|
import net.minecraftforge.common.DimensionManager;
|
||||||
|
|
||||||
|
@ -41,7 +37,7 @@ public class ItemPhantomConnector extends Item implements INameableItem{
|
||||||
if(this.checkHasConnection(stack, player, tile)){
|
if(this.checkHasConnection(stack, player, tile)){
|
||||||
((TileEntityPhantomface)tile).boundPosition = this.getStoredPosition(stack);
|
((TileEntityPhantomface)tile).boundPosition = this.getStoredPosition(stack);
|
||||||
this.clearStorage(stack);
|
this.clearStorage(stack);
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connected.desc")));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connected.desc")));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -52,7 +48,7 @@ public class ItemPhantomConnector extends Item implements INameableItem{
|
||||||
((TileEntityPhantomPlacer)tile).boundPosition = this.getStoredPosition(stack);
|
((TileEntityPhantomPlacer)tile).boundPosition = this.getStoredPosition(stack);
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
this.clearStorage(stack);
|
this.clearStorage(stack);
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connected.desc")));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connected.desc")));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -60,7 +56,7 @@ public class ItemPhantomConnector extends Item implements INameableItem{
|
||||||
}
|
}
|
||||||
//Storing Connections
|
//Storing Connections
|
||||||
this.storeConnection(stack, x, y, z, world);
|
this.storeConnection(stack, x, y, z, world);
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".phantom.stored.desc")));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.stored.desc")));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +72,7 @@ public class ItemPhantomConnector extends Item implements INameableItem{
|
||||||
if(tile instanceof TileEntityPhantomface){
|
if(tile instanceof TileEntityPhantomface){
|
||||||
((TileEntityPhantomface)tile).boundPosition = null;
|
((TileEntityPhantomface)tile).boundPosition = null;
|
||||||
}
|
}
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".phantom.unbound.desc")));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.unbound.desc")));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,14 +126,14 @@ public class ItemPhantomConnector extends Item implements INameableItem{
|
||||||
if(coords != null){
|
if(coords != null){
|
||||||
World world = coords.getWorld();
|
World world = coords.getWorld();
|
||||||
if(world != null){
|
if(world != null){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.boundTo.desc")+":");
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.boundTo.desc")+":");
|
||||||
Item item = coords.getItemBlock();
|
Item item = coords.getItemBlock();
|
||||||
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(coords.getBlock(), 1, coords.getMetadata()));
|
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(coords.getBlock(), 1, coords.getMetadata()));
|
||||||
list.add(name);
|
list.add(name);
|
||||||
list.add("X: "+coords.getX());
|
list.add("X: "+coords.getX());
|
||||||
list.add("Y: "+coords.getY());
|
list.add("Y: "+coords.getY());
|
||||||
list.add("Z: "+coords.getZ());
|
list.add("Z: "+coords.getZ());
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.inWorld.desc")+" "+world.provider.dimensionId);
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.inWorld.desc")+" "+world.provider.dimensionId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import ellpeck.actuallyadditions.items.metalists.ThePotionRings;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.INameableItem;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
@ -15,7 +16,6 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -112,9 +112,9 @@ public class ItemPotionRing extends Item implements INameableItem{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack stack){
|
public String getItemStackDisplayName(ItemStack stack){
|
||||||
String standardName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");
|
String standardName = StringUtil.localize(this.getUnlocalizedName()+".name");
|
||||||
if(stack.getItemDamage() < allRings.length){
|
if(stack.getItemDamage() < allRings.length){
|
||||||
String effect = StatCollector.translateToLocal(allRings[stack.getItemDamage()].getName());
|
String effect = StringUtil.localize(allRings[stack.getItemDamage()].getName());
|
||||||
return standardName+" "+effect;
|
return standardName+" "+effect;
|
||||||
}
|
}
|
||||||
return standardName;
|
return standardName;
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
@ -36,7 +35,7 @@ public class ItemResonantRice extends Item implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
ItemUtil.addInformation(this, list, 1, "");
|
ItemUtil.addInformation(this, list, 1, "");
|
||||||
if(KeyUtil.isShiftPressed() && OreDictionary.getOres("nuggetEnderium", false).isEmpty()) list.add(StringUtil.RED + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".itemResonantRice.uncraftable.desc"));
|
if(KeyUtil.isShiftPressed() && OreDictionary.getOres("nuggetEnderium", false).isEmpty()) list.add(StringUtil.RED + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemResonantRice.uncraftable.desc"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,10 +4,7 @@ import com.google.common.collect.Sets;
|
||||||
import cpw.mods.fml.common.eventhandler.Event;
|
import cpw.mods.fml.common.eventhandler.Event;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
@ -17,7 +14,6 @@ import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemTool;
|
import net.minecraft.item.ItemTool;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
||||||
|
@ -59,9 +55,9 @@ public class ItemAllToolAA extends ItemTool implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".paxel.desc.1"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".paxel.desc.1"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".paxel.desc.2"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".paxel.desc.2"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,13 @@ package ellpeck.actuallyadditions.items.tools;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemAxe;
|
import net.minecraft.item.ItemAxe;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -35,8 +31,8 @@ public class ItemAxeAA extends ItemAxe implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,13 @@ package ellpeck.actuallyadditions.items.tools;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemHoe;
|
import net.minecraft.item.ItemHoe;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -37,8 +33,8 @@ public class ItemHoeAA extends ItemHoe implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,13 @@ package ellpeck.actuallyadditions.items.tools;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemPickaxe;
|
import net.minecraft.item.ItemPickaxe;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -20,7 +16,6 @@ import java.util.List;
|
||||||
public class ItemPickaxeAA extends ItemPickaxe implements INameableItem{
|
public class ItemPickaxeAA extends ItemPickaxe implements INameableItem{
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private String oredictName;
|
|
||||||
private EnumRarity rarity;
|
private EnumRarity rarity;
|
||||||
private String repairItem;
|
private String repairItem;
|
||||||
|
|
||||||
|
@ -29,7 +24,6 @@ public class ItemPickaxeAA extends ItemPickaxe implements INameableItem{
|
||||||
this.name = unlocalizedName;
|
this.name = unlocalizedName;
|
||||||
this.rarity = rarity;
|
this.rarity = rarity;
|
||||||
this.repairItem = repairItem;
|
this.repairItem = repairItem;
|
||||||
this.oredictName = name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -37,8 +31,8 @@ public class ItemPickaxeAA extends ItemPickaxe implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,13 @@ package ellpeck.actuallyadditions.items.tools;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemSpade;
|
import net.minecraft.item.ItemSpade;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -37,8 +33,8 @@ public class ItemShovelAA extends ItemSpade implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,13 @@ package ellpeck.actuallyadditions.items.tools;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.INameableItem;
|
import ellpeck.actuallyadditions.util.*;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemSword;
|
import net.minecraft.item.ItemSword;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -37,8 +33,8 @@ public class ItemSwordAA extends ItemSword implements INameableItem{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc"));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.StringUtil;
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -87,7 +86,7 @@ public class CoffeeMachineRecipeHandler extends TemplateRecipeHandler{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRecipeName(){
|
public String getRecipeName(){
|
||||||
return StatCollector.translateToLocal("container.nei." + NAME + ".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -141,13 +140,13 @@ public class CoffeeMachineRecipeHandler extends TemplateRecipeHandler{
|
||||||
|
|
||||||
CachedCoffee cache = (CachedCoffee)this.arecipes.get(recipe);
|
CachedCoffee cache = (CachedCoffee)this.arecipes.get(recipe);
|
||||||
if(cache.extraText != null){
|
if(cache.extraText != null){
|
||||||
GuiDraw.drawString(StatCollector.translateToLocal("container.nei." + ModUtil.MOD_ID_LOWER + ".coffee.special") + ":", 2, 4, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
GuiDraw.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.special") + ":", 2, 4, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
||||||
GuiDraw.drawString(cache.extraText, 2, 16, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
GuiDraw.drawString(cache.extraText, 2, 16, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
||||||
}
|
}
|
||||||
GuiDraw.drawString(StatCollector.translateToLocal("container.nei." + ModUtil.MOD_ID_LOWER + ".coffee.shift"), 1, 75, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
GuiDraw.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.shift"), 1, 75, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
||||||
|
|
||||||
if(cache.maxAmp > 0){
|
if(cache.maxAmp > 0){
|
||||||
GuiDraw.drawString(StatCollector.translateToLocal("container.nei." + ModUtil.MOD_ID_LOWER + ".coffee.maxAmount") + ": " + cache.maxAmp, 2, 28, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
GuiDraw.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.maxAmount") + ": " + cache.maxAmp, 2, 28, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||||
import ellpeck.actuallyadditions.items.InitItems;
|
import ellpeck.actuallyadditions.items.InitItems;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -60,7 +60,7 @@ public class CompostRecipeHandler extends TemplateRecipeHandler{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRecipeName(){
|
public String getRecipeName(){
|
||||||
return StatCollector.translateToLocal("container.nei." + NAME + ".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,7 +11,6 @@ import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.StringUtil;
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -89,7 +88,7 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRecipeName(){
|
public String getRecipeName(){
|
||||||
return StatCollector.translateToLocal("container.nei."+this.getName()+".name");
|
return StringUtil.localize("container.nei."+this.getName()+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,7 +10,6 @@ import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.StringUtil;
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -61,7 +60,7 @@ public class HairyBallRecipeHandler extends TemplateRecipeHandler{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRecipeName(){
|
public String getRecipeName(){
|
||||||
return StatCollector.translateToLocal("container.nei." + NAME + ".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,7 +10,6 @@ import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.StringUtil;
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -65,7 +64,7 @@ public class TreasureChestRecipeHandler extends TemplateRecipeHandler{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRecipeName(){
|
public String getRecipeName(){
|
||||||
return StatCollector.translateToLocal("container.nei." + NAME + ".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -120,7 +119,7 @@ public class TreasureChestRecipeHandler extends TemplateRecipeHandler{
|
||||||
public void drawExtras(int rec){
|
public void drawExtras(int rec){
|
||||||
CachedTreasure recipe = (CachedTreasure)this.arecipes.get(rec);
|
CachedTreasure recipe = (CachedTreasure)this.arecipes.get(rec);
|
||||||
if(recipe.result != null){
|
if(recipe.result != null){
|
||||||
GuiDraw.drawString(recipe.minAmount+"-"+recipe.maxAmount+" "+StatCollector.translateToLocal("container.nei."+ModUtil.MOD_ID_LOWER+".treasureChest.info")+" "+recipe.chance+"%", 65+10, 45, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
GuiDraw.drawString(recipe.minAmount+"-"+recipe.maxAmount+" "+StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".treasureChest.info")+" "+recipe.chance+"%", 65+10, 45, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,12 @@ package ellpeck.actuallyadditions.update;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.Util;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.util.IChatComponent;
|
import net.minecraft.util.IChatComponent;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
|
|
||||||
public class UpdateChecker{
|
public class UpdateChecker{
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ public class UpdateChecker{
|
||||||
if(Minecraft.getSystemTime() % 200 == 0 && !notified && doneChecking && Minecraft.getMinecraft().thePlayer != null){
|
if(Minecraft.getSystemTime() % 200 == 0 && !notified && doneChecking && Minecraft.getMinecraft().thePlayer != null){
|
||||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||||
if(checkFailed){
|
if(checkFailed){
|
||||||
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".update.failed.desc")));
|
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed.desc")));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(updateVersion > clientVersion){
|
if(updateVersion > clientVersion){
|
||||||
|
@ -43,10 +43,10 @@ public class UpdateChecker{
|
||||||
String notice3 = "info."+ModUtil.MOD_ID_LOWER+".update.changelog.desc";
|
String notice3 = "info."+ModUtil.MOD_ID_LOWER+".update.changelog.desc";
|
||||||
String notice4 = "info."+ModUtil.MOD_ID_LOWER+".update.download.desc";
|
String notice4 = "info."+ModUtil.MOD_ID_LOWER+".update.download.desc";
|
||||||
player.addChatComponentMessage(new ChatComponentText(""));
|
player.addChatComponentMessage(new ChatComponentText(""));
|
||||||
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal(notice1)));
|
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize(notice1)));
|
||||||
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocalFormatted(notice2, ModUtil.VERSION, updateVersionS)));
|
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted(notice2, ModUtil.VERSION, updateVersionS)));
|
||||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocalFormatted(notice3, changelog)));
|
player.addChatComponentMessage(new ChatComponentText(StringUtil.localizeFormatted(notice3, changelog)));
|
||||||
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocalFormatted(notice4, DOWNLOAD_LINK)));
|
player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted(notice4, DOWNLOAD_LINK)));
|
||||||
player.addChatComponentMessage(new ChatComponentText(""));
|
player.addChatComponentMessage(new ChatComponentText(""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package ellpeck.actuallyadditions.util;
|
||||||
|
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
|
|
||||||
public class AssetUtil{
|
public class AssetUtil{
|
||||||
|
|
||||||
|
@ -13,7 +12,7 @@ public class AssetUtil{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayNameString(FontRenderer font, int xSize, int yPositionOfMachineText, String machineName){
|
public static void displayNameString(FontRenderer font, int xSize, int yPositionOfMachineText, String machineName){
|
||||||
String localMachineName = StatCollector.translateToLocal(machineName + ".name");
|
String localMachineName = StringUtil.localize(machineName+".name");
|
||||||
font.drawString(localMachineName, xSize/2 - font.getStringWidth(localMachineName)/2, yPositionOfMachineText, StringUtil.DECIMAL_COLOR_WHITE);
|
font.drawString(localMachineName, xSize/2 - font.getStringWidth(localMachineName)/2, yPositionOfMachineText, StringUtil.DECIMAL_COLOR_WHITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,7 +18,7 @@ public class BlockUtil{
|
||||||
public static void addInformation(Block block, List list, int lines, String extraName){
|
public static void addInformation(Block block, List list, int lines, String extraName){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
for(int i = 0; i < lines; i++){
|
for(int i = 0; i < lines; i++){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)block).getName() + extraName + ".desc" + (lines > 1 ? "." +(i+1) : "")));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+((INameableItem)block).getName()+extraName+".desc"+(lines > 1 ? "."+(i+1) : "")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
else list.add(ItemUtil.shiftForInfo());
|
||||||
|
@ -28,14 +27,14 @@ public class BlockUtil{
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void addPowerUsageInfo(List list, int usage){
|
public static void addPowerUsageInfo(List list, int usage){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".uses.desc") + " " + usage + " RF/t");
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " + usage + " RF/t");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void addPowerProductionInfo(List list, int produce){
|
public static void addPowerProductionInfo(List list, int produce){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".produces.desc") + " " + produce + " RF/t");
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".produces.desc") + " " + produce + " RF/t");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package ellpeck.actuallyadditions.util;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -13,7 +12,7 @@ public class ItemUtil{
|
||||||
public static void addInformation(Item item, List list, int lines, String extraName){
|
public static void addInformation(Item item, List list, int lines, String extraName){
|
||||||
if(KeyUtil.isShiftPressed()){
|
if(KeyUtil.isShiftPressed()){
|
||||||
for(int i = 0; i < lines; i++){
|
for(int i = 0; i < lines; i++){
|
||||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)item).getName() + extraName + ".desc" + (lines > 1 ? "." +(i+1) : "")));
|
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+((INameableItem)item).getName()+extraName+".desc"+(lines > 1 ? "."+(i+1) : "")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else list.add(shiftForInfo());
|
else list.add(shiftForInfo());
|
||||||
|
@ -47,6 +46,6 @@ public class ItemUtil{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String shiftForInfo(){
|
public static String shiftForInfo(){
|
||||||
return StringUtil.GREEN + StringUtil.ITALIC + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".shiftForInfo.desc");
|
return StringUtil.GREEN + StringUtil.ITALIC + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".shiftForInfo.desc");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package ellpeck.actuallyadditions.util;
|
package ellpeck.actuallyadditions.util;
|
||||||
|
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
public class StringUtil{
|
public class StringUtil{
|
||||||
|
|
||||||
public static final String BLACK = (char)167 + "0";
|
public static final String BLACK = (char)167 + "0";
|
||||||
|
@ -27,4 +29,17 @@ public class StringUtil{
|
||||||
public static final int DECIMAL_COLOR_WHITE = 16777215;
|
public static final int DECIMAL_COLOR_WHITE = 16777215;
|
||||||
public static final int DECIMAL_COLOR_GRAY_TEXT = 4210752;
|
public static final int DECIMAL_COLOR_GRAY_TEXT = 4210752;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Localizes a given String via StatCollector
|
||||||
|
*/
|
||||||
|
public static String localize(String text){
|
||||||
|
return StatCollector.translateToLocal(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Localizes a given formatted String with the given Replacements
|
||||||
|
*/
|
||||||
|
public static String localizeFormatted(String text, Object ... replace){
|
||||||
|
return StatCollector.translateToLocalFormatted(text, replace);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue