From 3f29f38449fd1dc123618070912f5cbce703c956 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Thu, 13 Mar 2014 21:14:50 +0800 Subject: [PATCH] Resolved #433 - Added more localizations --- .../archaic/engineering/TileEngineeringTable.java | 1 - .../java/resonantinduction/archaic/filter/TileFilter.java | 1 - .../main/java/resonantinduction/electrical/Electrical.java | 6 +++--- .../electrical/battery/ItemBlockBattery.java | 3 ++- .../resonantinduction/electrical/wire/PartAdvancedWire.java | 1 - .../mechanical/logistic/rail/PartRailing.java | 1 - .../resonantinduction/core/prefab/imprint/ItemImprint.java | 5 +++-- .../core/prefab/imprint/TileFilterable.java | 1 - .../core/prefab/part/PartColorableMaterial.java | 2 -- .../resonantinduction/core/resource/ResourceGenerator.java | 4 ++-- .../core/resource/fluid/ItemOreResourceBucket.java | 1 - src/main/resources/assets/resonantinduction/languages | 2 +- 12 files changed, 11 insertions(+), 17 deletions(-) diff --git a/archaic/src/main/java/resonantinduction/archaic/engineering/TileEngineeringTable.java b/archaic/src/main/java/resonantinduction/archaic/engineering/TileEngineeringTable.java index 82739e01..aef0d4f1 100644 --- a/archaic/src/main/java/resonantinduction/archaic/engineering/TileEngineeringTable.java +++ b/archaic/src/main/java/resonantinduction/archaic/engineering/TileEngineeringTable.java @@ -24,7 +24,6 @@ import org.apache.commons.lang3.ArrayUtils; import org.lwjgl.opengl.GL11; import resonantinduction.core.ResonantInduction; -import resonantinduction.core.Settings; import resonantinduction.core.prefab.imprint.ItemImprint; import resonantinduction.core.render.RenderItemOverlayTile; import universalelectricity.api.vector.Vector2; diff --git a/archaic/src/main/java/resonantinduction/archaic/filter/TileFilter.java b/archaic/src/main/java/resonantinduction/archaic/filter/TileFilter.java index fdc97349..ab11e015 100644 --- a/archaic/src/main/java/resonantinduction/archaic/filter/TileFilter.java +++ b/archaic/src/main/java/resonantinduction/archaic/filter/TileFilter.java @@ -1,6 +1,5 @@ package resonantinduction.archaic.filter; -import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; diff --git a/electrical/src/main/java/resonantinduction/electrical/Electrical.java b/electrical/src/main/java/resonantinduction/electrical/Electrical.java index ba1cc748..74365db1 100644 --- a/electrical/src/main/java/resonantinduction/electrical/Electrical.java +++ b/electrical/src/main/java/resonantinduction/electrical/Electrical.java @@ -16,7 +16,6 @@ import resonantinduction.electrical.battery.BlockBattery; import resonantinduction.electrical.battery.ItemBlockBattery; import resonantinduction.electrical.battery.TileBattery; import resonantinduction.electrical.charger.ItemCharger; -import resonantinduction.electrical.encoder.ItemDisk; import resonantinduction.electrical.generator.BlockMotor; import resonantinduction.electrical.generator.TileMotor; import resonantinduction.electrical.generator.solar.BlockSolarPanel; @@ -115,7 +114,7 @@ public class Electrical // blockArmbot = contentRegistry.createTile(BlockArmbot.lass, TileEncoder.clclass, // TileArmbot.class); // blockEncoder = contentRegistry.createTile(BlockEncoder.cass); - itemDisk = contentRegistry.createItem(ItemDisk.class); + // itemDisk = contentRegistry.createItem(ItemDisk.class); itemInsulation = contentRegistry.createItem("insulation", ItemResourcePart.class); // Generator @@ -165,7 +164,8 @@ public class Electrical /** Multimeter */ GameRegistry.addRecipe(new ShapedOreRecipe(itemMultimeter, "WWW", "ICI", 'W', "wire", 'C', UniversalRecipe.BATTERY.get(), 'I', UniversalRecipe.PRIMARY_METAL.get())); - GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, "PPP", "RRR", "WWW", 'W', "wire", 'P', Item.paper, 'R', Item.redstone)); + // GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, "PPP", "RRR", "WWW", 'W', "wire", + // 'P', Item.paper, 'R', Item.redstone)); /** Battery */ ItemStack tierOneBattery = ItemBlockBattery.setTier(new ItemStack(blockBattery, 1, 0), (byte) 0); diff --git a/electrical/src/main/java/resonantinduction/electrical/battery/ItemBlockBattery.java b/electrical/src/main/java/resonantinduction/electrical/battery/ItemBlockBattery.java index 757e6f13..9b5f120d 100644 --- a/electrical/src/main/java/resonantinduction/electrical/battery/ItemBlockBattery.java +++ b/electrical/src/main/java/resonantinduction/electrical/battery/ItemBlockBattery.java @@ -33,7 +33,8 @@ public class ItemBlockBattery extends ItemBlock implements IEnergyItem, IVoltage @Override public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4) { - list.add("Tier: " + (getTier(itemStack) + 1)); + list.add(LanguageUtility.getLocal("tooltip.tier") + ": " + (getTier(itemStack) + 1)); + String color = ""; long joules = this.getEnergy(itemStack); diff --git a/electrical/src/main/java/resonantinduction/electrical/wire/PartAdvancedWire.java b/electrical/src/main/java/resonantinduction/electrical/wire/PartAdvancedWire.java index 3d87cada..b2a4bda3 100644 --- a/electrical/src/main/java/resonantinduction/electrical/wire/PartAdvancedWire.java +++ b/electrical/src/main/java/resonantinduction/electrical/wire/PartAdvancedWire.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import net.minecraft.block.Block; import net.minecraft.block.BlockColored; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; diff --git a/mechanical/src/main/java/resonantinduction/mechanical/logistic/rail/PartRailing.java b/mechanical/src/main/java/resonantinduction/mechanical/logistic/rail/PartRailing.java index cf311fc5..2088fd44 100644 --- a/mechanical/src/main/java/resonantinduction/mechanical/logistic/rail/PartRailing.java +++ b/mechanical/src/main/java/resonantinduction/mechanical/logistic/rail/PartRailing.java @@ -1,6 +1,5 @@ package resonantinduction.mechanical.logistic.rail; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; diff --git a/src/main/java/resonantinduction/core/prefab/imprint/ItemImprint.java b/src/main/java/resonantinduction/core/prefab/imprint/ItemImprint.java index 631460d5..66c7ea41 100644 --- a/src/main/java/resonantinduction/core/prefab/imprint/ItemImprint.java +++ b/src/main/java/resonantinduction/core/prefab/imprint/ItemImprint.java @@ -5,7 +5,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import calclavia.lib.utility.nbt.NBTUtility; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; @@ -18,6 +17,8 @@ import net.minecraft.nbt.NBTTagList; import resonantinduction.core.Reference; import resonantinduction.core.Settings; import resonantinduction.core.TabRI; +import calclavia.lib.utility.LanguageUtility; +import calclavia.lib.utility.nbt.NBTUtility; public class ItemImprint extends Item { @@ -63,7 +64,7 @@ public class ItemImprint extends Item } else { - list.add("No filters"); + list.add(LanguageUtility.getLocal("tooltip.noImprint")); } } diff --git a/src/main/java/resonantinduction/core/prefab/imprint/TileFilterable.java b/src/main/java/resonantinduction/core/prefab/imprint/TileFilterable.java index e06871c3..d633c345 100644 --- a/src/main/java/resonantinduction/core/prefab/imprint/TileFilterable.java +++ b/src/main/java/resonantinduction/core/prefab/imprint/TileFilterable.java @@ -7,7 +7,6 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; import resonantinduction.api.IFilterable; import universalelectricity.api.vector.Vector3; diff --git a/src/main/java/resonantinduction/core/prefab/part/PartColorableMaterial.java b/src/main/java/resonantinduction/core/prefab/part/PartColorableMaterial.java index 65423044..58de9500 100644 --- a/src/main/java/resonantinduction/core/prefab/part/PartColorableMaterial.java +++ b/src/main/java/resonantinduction/core/prefab/part/PartColorableMaterial.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import net.minecraft.block.Block; import net.minecraft.block.BlockColored; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -13,7 +12,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.MovingObjectPosition; import resonantinduction.core.MultipartUtility; -import resonantinduction.electrical.Electrical; import codechicken.lib.data.MCDataInput; import codechicken.lib.data.MCDataOutput; diff --git a/src/main/java/resonantinduction/core/resource/ResourceGenerator.java b/src/main/java/resonantinduction/core/resource/ResourceGenerator.java index 012e683a..5a8096bf 100644 --- a/src/main/java/resonantinduction/core/resource/ResourceGenerator.java +++ b/src/main/java/resonantinduction/core/resource/ResourceGenerator.java @@ -153,7 +153,7 @@ public class ResourceGenerator implements IVirtualObject fluidMolten.setViscosity(5000); fluidMolten.setTemperature(273 + 1538); FluidRegistry.registerFluid(fluidMolten); - LanguageRegistry.instance().addStringLocalization(fluidMolten.getUnlocalizedName(), "Molten " + localizedName); + LanguageRegistry.instance().addStringLocalization(fluidMolten.getUnlocalizedName(), LanguageUtility.getLocal("tooltip.molten") + " " + localizedName); BlockFluidMaterial blockFluidMaterial = new BlockFluidMaterial(fluidMolten); GameRegistry.registerBlock(blockFluidMaterial, "molten" + nameCaps); ResonantInduction.blockMoltenFluid.put(getID(materialName), blockFluidMaterial); @@ -163,7 +163,7 @@ public class ResourceGenerator implements IVirtualObject FluidColored fluidMixture = new FluidColored(materialNameToMixture(materialName)); FluidRegistry.registerFluid(fluidMixture); BlockFluidMixture blockFluidMixture = new BlockFluidMixture(fluidMixture); - LanguageRegistry.instance().addStringLocalization(fluidMixture.getUnlocalizedName(), localizedName + " Mixture"); + LanguageRegistry.instance().addStringLocalization(fluidMixture.getUnlocalizedName(), localizedName + " " + LanguageUtility.getLocal("tooltip.mixture")); GameRegistry.registerBlock(blockFluidMixture, "mixture" + nameCaps); ResonantInduction.blockMixtureFluids.put(getID(materialName), blockFluidMixture); FluidContainerRegistry.registerFluidContainer(fluidMixture, ResonantInduction.itemBucketMixture.getStackFromMaterial(materialName)); diff --git a/src/main/java/resonantinduction/core/resource/fluid/ItemOreResourceBucket.java b/src/main/java/resonantinduction/core/resource/fluid/ItemOreResourceBucket.java index edc7b873..5c3f2bee 100644 --- a/src/main/java/resonantinduction/core/resource/fluid/ItemOreResourceBucket.java +++ b/src/main/java/resonantinduction/core/resource/fluid/ItemOreResourceBucket.java @@ -14,7 +14,6 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.Event; import net.minecraftforge.event.entity.player.FillBucketEvent; import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.oredict.OreDictionary; import resonantinduction.core.Reference; import resonantinduction.core.TabRI; import resonantinduction.core.resource.ItemOreResource; diff --git a/src/main/resources/assets/resonantinduction/languages b/src/main/resources/assets/resonantinduction/languages index def05c69..09738c5f 160000 --- a/src/main/resources/assets/resonantinduction/languages +++ b/src/main/resources/assets/resonantinduction/languages @@ -1 +1 @@ -Subproject commit def05c696b12c72fd9e0d34d2e201ca695ef1ad9 +Subproject commit 09738c5f87ec83d559c33492a440b0a666657663