From 754857dbb60f738a5c730341e61fe61d6309f413 Mon Sep 17 00:00:00 2001 From: robin4002 Date: Sun, 16 Feb 2014 00:48:23 +0100 Subject: [PATCH] Move to assets lang system --- .../assets/buildcraft/Thumbs.db | Bin 0 -> 8704 bytes .../buildcraft/lang/en_US.lang} | 174 +++++++++--------- common/buildcraft/BuildCraftBuilders.java | 6 - common/buildcraft/BuildCraftCore.java | 4 - common/buildcraft/BuildCraftEnergy.java | 7 +- common/buildcraft/BuildCraftFactory.java | 10 - common/buildcraft/BuildCraftSilicon.java | 1 - common/buildcraft/BuildCraftTransport.java | 1 - .../builders/gui/GuiBlueprintLibrary.java | 2 +- .../buildcraft/builders/gui/GuiBuilder.java | 2 +- common/buildcraft/builders/gui/GuiFiller.java | 2 +- .../buildcraft/builders/gui/GuiTemplate.java | 2 +- .../core/CreativeTabBuildCraft.java | 16 +- .../buildcraft/core/ItemBlockBuildCraft.java | 5 - common/buildcraft/core/ItemBuildCraft.java | 5 - common/buildcraft/core/fluids/BCFluid.java | 24 --- common/buildcraft/core/proxy/CoreProxy.java | 11 -- .../core/proxy/CoreProxyClient.java | 16 -- .../buildcraft/core/utils/Localization.java | 140 -------------- common/buildcraft/core/utils/StringUtils.java | 18 +- .../energy/ItemBucketBuildcraft.java | 5 - .../energy/gui/GuiCombustionEngine.java | 2 +- .../buildcraft/energy/gui/GuiStoneEngine.java | 2 +- .../factory/gui/GuiAutoCrafting.java | 2 +- .../buildcraft/factory/gui/GuiRefinery.java | 2 +- .../silicon/TileAdvancedCraftingTable.java | 2 +- .../buildcraft/silicon/TileAssemblyTable.java | 2 +- .../silicon/TileIntegrationTable.java | 2 +- .../silicon/gui/GuiAssemblyTable.java | 2 +- .../transport/PipeToolTipManager.java | 16 +- .../buildcraft/transport/gates/ItemGate.java | 15 +- .../transport/gui/GuiFilteredBuffer.java | 2 +- 32 files changed, 139 insertions(+), 361 deletions(-) create mode 100644 buildcraft_resources/assets/buildcraft/Thumbs.db rename buildcraft_resources/{lang/buildcraft/en_US.properties => assets/buildcraft/lang/en_US.lang} (55%) delete mode 100644 common/buildcraft/core/fluids/BCFluid.java delete mode 100644 common/buildcraft/core/utils/Localization.java diff --git a/buildcraft_resources/assets/buildcraft/Thumbs.db b/buildcraft_resources/assets/buildcraft/Thumbs.db new file mode 100644 index 0000000000000000000000000000000000000000..91387200fbbf35fca000327c7a1866a978ac492f GIT binary patch literal 8704 zcmeHMcT`i|mcM{>6hjX!C?HCeqI3|ICLcr)L_~;EK0t(kbfk#_(gg&hTR>_+N(jA3 z2Qf+~0U-%RdgwtQnK*CWH{W`*-dbSPLq@|Q*cpsN3p|3wivruzCTf4}fc=&6bP zm2*Zan5bZ;f`tlJD%hwvNyRBD*s1ud&0j44RsL^`fEfU%UfzHRpbNND?~j21YG(g& z;Q{FXSo44E4S&ZxOo~rBTM|w4=lwzfxCC4VV1PWeR0b3PN9tVxxCp2MN>p8ysyzVg zsD1vPNCLDpe~$a#>-XpO6V%Ey@1I-#IsLyo{y#U`f3^N+#{aYJzx4lq5#XavCps#+ z{$o8*M0ulPTLQ!X>n!_M%m2j){Js2BCMdJO=^J{6dH@a0e{Ad&EN~5=r#o@t1RXuK zpr@y2U}R%rqzXGLD>EC2or43!4gzuV2=a1r@pFSfd}sLhg@hmw2q*7Zv9rQrg2E8t zUq3=aHDzRAJjKLxN|+18CH&tON*e%T0;FgFI-0WpEr^B=L__HWAk^1UdaAd7I83e6 z(w(4s$;8aUO6`C=O+78>=xC|_QwdO?22-B{CqVQZXXJGlI87fgp7rEXc$)NG_!|q4m=aEW^B1*$ zXZDW~3;!Q6`-9kj^1=XYbTriD(SZPMVBfIGg>c@fsXBBuaZSLrtA@u8%$A%sZ>8F9 z)~c*R5Ju{oZnj2mC`srXXQ@NEHmC1)oyhfR5Rsg(Z|e?TsfI`XWVH?cIJG?ELfD^i zb31ynTcXz5G0hGg@=-su+EuFKsj7z~QD1yhwgVSi5ka4cRtYV8dH5&6*qzm28x40W zpLN&5N$cZ7nC;@LJBF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NaqA=wg`ee89MOg#{|HRSM`{D-%{ z1~HzCX8BD-(eSZ&@@yFM!HX{p`XQ}1_5}tZhRrOfOvlu=Uo!=f_(4}|+-TVC%xTQh z-bX#=GolgZPCw}7N*0V5SIHln5oB2lSKs*wGzNEEp)Apep#a5MC%Y4!O1{HnUWadO zHq|d$oEV&&H|NZK?+Z`>XO?*+^$V1Rlt8jx!EhRT!o_0Y(h4D)rbg}_v*nBf*;2}d zwo?p?f*dTS3 zvOLzgLh7FAHKlYW2d9WIHf&Dx#I>hA5}H!iI^1yZDwlMA*|_U!!JSFg8rU=ge)Fj= zWv4SE3CD+)Hpf|oaE{>casSYZ%CG8A9_e-J1Zd08e#-0bz21e@sew8&crvRzL5soTVJ@wMA~o62rO@he(|nXi`i z#O5ZgQ{qBPg(UsIiRuVGEQ)Qj;G+%G$l41dSr?PY+a0J(@%i}dT4e?Cjojzp`>#ZP zXKPBknSEh)v8W4p|w&!Q`QEpL1Z14k_Kn4TS@jtvI^6$MP^Q z(>q4&%+MT!$qT!ZtAeriNu;;9Ec9uAbBwc_t7}oaw3oF;X@vS6`Kwp@BfFWwKlzD= zFc$wILYH5N5OR2(;HoHHIWyHGi9w%z)eYh6fIqq)%09od%RLOPTlFV3RYl4^^ihUI zciQ-$Qb#}Y@;|kVXQC?_E2RbNR%K7LbtRVD}&h7eb)t;Fn=(M+a&Sp%Ep|B@W0M~OQwLzy9TO^=fTD(42 z_o_R?{A8RS^L!XKH`uk`CzO@ch(lyy2McCMtNn!kZ`D)(#YEP?+ zmtZE}jMX_+F1QCQeri3joC_KAK|rmOyJx@Hp@y6C#R;ev{T8ot!>NgWp1y zKKW}KHZ?a7??y{ontZ(D_!4^~-&m~bA_chfJgC6eK`>?8w|qTDlIX8?N9{(c_!|>< N_f^W|Kk$dezX7Tc%bNfI literal 0 HcmV?d00001 diff --git a/buildcraft_resources/lang/buildcraft/en_US.properties b/buildcraft_resources/assets/buildcraft/lang/en_US.lang similarity index 55% rename from buildcraft_resources/lang/buildcraft/en_US.properties rename to buildcraft_resources/assets/buildcraft/lang/en_US.lang index 2f2cadc9..7d90109a 100644 --- a/buildcraft_resources/lang/buildcraft/en_US.properties +++ b/buildcraft_resources/assets/buildcraft/lang/en_US.lang @@ -104,100 +104,100 @@ gui.pipes.emzuli.title=Extraction Presets gui.pipes.emzuli.paint=Paint Items %s gui.pipes.emzuli.nopaint=Don't Paint Items -item.bucketFuel=Fuel Bucket -item.bucketOil=Oil Bucket -item.woodenGearItem=Wood Gear -item.stoneGearItem=Stone Gear -item.ironGearItem=Iron Gear -item.goldGearItem=Gold Gear -item.diamondGearItem=Diamond Gear -item.templateItem=Template -item.wrenchItem=Wrench -item.pipeWaterproof=Pipe Sealant -item.redPipeWire=Red Pipe Wire -item.bluePipeWire=Blue Pipe Wire -item.greenPipeWire=Green Pipe Wire -item.yellowPipeWire=Yellow Pipe Wire -item.redstone_red_chipset=Redstone Chipset -item.redstone_iron_chipset=Iron Chipset -item.redstone_gold_chipset=Golden Chipset -item.redstone_diamond_chipset=Diamond Chipset -item.redstone_pulsating_chipset=Pulsating Chipset -item.redstone_quartz_chipset=Quartz Chipset -item.redstone_comp_chipset=Redstone Comp Chipset -item.blueprintItem=Blueprint -item.PipeItemsWood=Wooden Transport Pipe -item.PipeItemsCobblestone=Cobblestone Transport Pipe -item.PipeItemsStone=Stone Transport Pipe -item.PipeItemsQuartz=Quartz Transport Pipe -item.PipeItemsIron=Iron Transport Pipe -item.PipeItemsGold=Golden Transport Pipe -item.PipeItemsDiamond=Diamond Transport Pipe -item.PipeItemsObsidian=Obsidian Transport Pipe -item.PipeItemsEmerald=Emerald Transport Pipe -item.PipeItemsLapis=Lazuli Transport Pipe -item.PipeItemsDaizuli=Daizuli Transport Pipe -item.PipeItemsEmzuli=Emzuli Transport Pipe -item.PipeFluidsWood=Wooden Fluid Pipe -item.PipeFluidsCobblestone=Cobblestone Fluid Pipe -item.PipeFluidsStone=Stone Fluid Pipe -item.PipeFluidsIron=Iron Fluid Pipe -item.PipeFluidsGold=Golden Fluid Pipe -item.PipeFluidsEmerald=Emerald Fluid Pipe -item.PipePowerWood=Wooden Kinesis Pipe -item.PipePowerCobblestone=Cobblestone Kinesis Pipe -item.PipePowerStone=Stone Kinesis Pipe -item.PipePowerQuartz=Quartz Kinesis Pipe -item.PipePowerIron=Iron Kinesis Pipe -item.PipePowerGold=Golden Kinesis Pipe -item.PipePowerDiamond=Diamond Kinesis Pipe -item.PipeItemsStripes=Stripes Transport Pipe -item.PipeStructureCobblestone=Cobblestone Structure Pipe -item.PipeItemsVoid=Void Transport Pipe -item.PipeFluidsVoid=Void Fluid Pipe -item.PipeItemsSandstone=Sandstone Transport Pipe -item.PipeFluidsSandstone=Sandstone Fluid Pipe -item.Facade=Facade -item.PipePlug=Pipe Plug +item.bucketFuel.name=Fuel Bucket +item.bucketOil.name=Oil Bucket +item.woodenGearItem.name=Wood Gear +item.stoneGearItem.name=Stone Gear +item.ironGearItem.name=Iron Gear +item.goldGearItem.name=Gold Gear +item.diamondGearItem.name=Diamond Gear +item.templateItem.name=Template +item.wrenchItem.name=Wrench +item.pipeWaterproof.name=Pipe Sealant +item.redPipeWire.name=Red Pipe Wire +item.bluePipeWire.name=Blue Pipe Wire +item.greenPipeWire.name=Green Pipe Wire +item.yellowPipeWire.name=Yellow Pipe Wire +item.redstone_red_chipset.name=Redstone Chipset +item.redstone_iron_chipset.name=Iron Chipset +item.redstone_gold_chipset.name=Golden Chipset +item.redstone_diamond_chipset.name=Diamond Chipset +item.redstone_pulsating_chipset.name=Pulsating Chipset +item.redstone_quartz_chipset.name=Quartz Chipset +item.redstone_comp_chipset.name=Redstone Comp Chipset +item.blueprintItem.name=Blueprint +item.PipeItemsWood.name=Wooden Transport Pipe +item.PipeItemsCobblestone.name=Cobblestone Transport Pipe +item.PipeItemsStone.name=Stone Transport Pipe +item.PipeItemsQuartz.name=Quartz Transport Pipe +item.PipeItemsIron.name=Iron Transport Pipe +item.PipeItemsGold.name=Golden Transport Pipe +item.PipeItemsDiamond.name=Diamond Transport Pipe +item.PipeItemsObsidian.name=Obsidian Transport Pipe +item.PipeItemsEmerald.name=Emerald Transport Pipe +item.PipeItemsLapis.name=Lazuli Transport Pipe +item.PipeItemsDaizuli.name=Daizuli Transport Pipe +item.PipeItemsEmzuli.name=Emzuli Transport Pipe +item.PipeFluidsWood.name=Wooden Fluid Pipe +item.PipeFluidsCobblestone.name=Cobblestone Fluid Pipe +item.PipeFluidsStone.name=Stone Fluid Pipe +item.PipeFluidsIron.name=Iron Fluid Pipe +item.PipeFluidsGold.name=Golden Fluid Pipe +item.PipeFluidsEmerald.name=Emerald Fluid Pipe +item.PipePowerWood.name=Wooden Kinesis Pipe +item.PipePowerCobblestone.name=Cobblestone Kinesis Pipe +item.PipePowerStone.name=Stone Kinesis Pipe +item.PipePowerQuartz.name=Quartz Kinesis Pipe +item.PipePowerIron.name=Iron Kinesis Pipe +item.PipePowerGold.name=Golden Kinesis Pipe +item.PipePowerDiamond.name=Diamond Kinesis Pipe +item.PipeItemsStripes.name=Stripes Transport Pipe +item.PipeStructureCobblestone.name=Cobblestone Structure Pipe +item.PipeItemsVoid.name=Void Transport Pipe +item.PipeFluidsVoid.name=Void Fluid Pipe +item.PipeItemsSandstone.name=Sandstone Transport Pipe +item.PipeFluidsSandstone.name=Sandstone Fluid Pipe +item.Facade.name=Facade +item.PipePlug.name=Pipe Plug -tab.machines=Buildcraft Machines -tab.facades=Buildcraft Facades +itemGroup.buildcraft.machines=Buildcraft Machines +itemGroup.buildcraft.facades=Buildcraft Facades -tile.architectBlock=Architect Table -tile.assemblyTableBlock=Assembly Table -tile.assemblyWorkbenchBlock=Advanced Crafting Table -tile.autoWorkbenchBlock=Auto Workbench -tile.blockFuel=Fuel -tile.blockHopper=Chute -tile.blockOil=Oil -tile.builderBlock=Builder -tile.engineIron=Combustion Engine -tile.engineStone=Stirling Engine -tile.engineWood=Redstone Engine -tile.fillerBlock=Filler -tile.filteredBufferBlock=Filtered Buffer -tile.floodGateBlock=Flood Gate -tile.frameBlock=Frame -tile.integrationTableBlock=Integration Table -tile.laserBlock=Laser -tile.libraryBlock=Blueprint Library -tile.machineBlock=Quarry -tile.markerBlock=Land Mark -tile.miningWellBlock=Mining Well -tile.pathMarkerBlock=Path Marker -tile.plainPipeBlock=Mining Pipe -tile.pumpBlock=Pump -tile.refineryBlock=Refinery -tile.spring.oil=Oil Spring -tile.spring.water=Water Spring -tile.tankBlock=Tank +tile.architectBlock.name=Architect Table +tile.assemblyTableBlock.name=Assembly Table +tile.assemblyWorkbenchBlock.name=Advanced Crafting Table +tile.autoWorkbenchBlock.name=Auto Workbench +tile.blockFuel.name=Fuel +tile.blockHopper.name=Chute +tile.blockOil.name=Oil +tile.builderBlock.name=Builder +tile.engineIron.name=Combustion Engine +tile.engineStone.name=Stirling Engine +tile.engineWood.name=Redstone Engine +tile.fillerBlock.name=Filler +tile.filteredBufferBlock.name=Filtered Buffer +tile.floodGateBlock.name=Flood Gate +tile.frameBlock.name=Frame +tile.integrationTableBlock.name=Integration Table +tile.laserBlock.name=Laser +tile.libraryBlock.name=Blueprint Library +tile.machineBlock.name=Quarry +tile.markerBlock.name=Land Mark +tile.miningWellBlock.name=Mining Well +tile.pathMarkerBlock.name=Path Marker +tile.plainPipeBlock.name=Mining Pipe +tile.pumpBlock.name=Pump +tile.refineryBlock.name=Refinery +tile.spring.oil.name=Oil Spring +tile.spring.water.name=Water Spring +tile.tankBlock.name=Tank -tip.gate.wires=Compatible Wires: +tip.gate.wires=§9§oCompatible Wires: tip.gate.wires.redstone=Red tip.gate.wires.iron=Red, Blue tip.gate.wires.gold=Red, Blue, Yellow tip.gate.wires.diamond=Red, Blue, Yellow, Green -tip.gate.expansions=Installed Expansions: +tip.gate.expansions=§9§oInstalled Expansions: tip.PipeFluidsCobblestone=Basic pipe, 10 mB/t\nWon't connect to Stone tip.PipeFluidsEmerald=Extraction pipe, 40 mB/t diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 28a59bd8..834e3800 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -251,27 +251,21 @@ public class BuildCraftBuilders extends BuildCraftMod { markerBlock = new BlockMarker(); CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock")); - CoreProxy.proxy.addName(markerBlock, "Land Mark"); pathMarkerBlock = new BlockPathMarker(); CoreProxy.proxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock")); - CoreProxy.proxy.addName(pathMarkerBlock, "Path Mark"); fillerBlock = new BlockFiller(); CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock")); - CoreProxy.proxy.addName(fillerBlock, "Filler"); builderBlock = new BlockBuilder(); CoreProxy.proxy.registerBlock(builderBlock.setBlockName("builderBlock")); - CoreProxy.proxy.addName(builderBlock, "Builder"); architectBlock = new BlockArchitect(); CoreProxy.proxy.registerBlock(architectBlock.setBlockName("architectBlock")); - CoreProxy.proxy.addName(architectBlock, "Architect Table"); libraryBlock = new BlockBlueprintLibrary(); CoreProxy.proxy.registerBlock(libraryBlock.setBlockName("libraryBlock")); - CoreProxy.proxy.addName(libraryBlock, "Blueprint Library"); GameRegistry.registerTileEntity(TileMarker.class, "Marker"); GameRegistry.registerTileEntity(TileFiller.class, "Filler"); diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 345005de..63518453 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -74,7 +74,6 @@ import buildcraft.core.triggers.TriggerInventory; import buildcraft.core.triggers.TriggerInventoryLevel; import buildcraft.core.triggers.TriggerMachine; import buildcraft.core.utils.BCLog; -import buildcraft.core.utils.Localization; import buildcraft.core.recipes.AssemblyRecipeManager; import buildcraft.core.recipes.IntegrationRecipeManager; import buildcraft.core.triggers.TriggerRedstoneInput; @@ -294,9 +293,6 @@ public class BuildCraftCore extends BuildCraftMod { CoreProxy.proxy.initializeRendering(); CoreProxy.proxy.initializeEntityRendering(); - - Localization.addLocalization("/lang/buildcraft/", DefaultProps.DEFAULT_LANGUAGE); - } @EventHandler diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index ecdf8141..cc954313 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -17,7 +17,6 @@ import buildcraft.core.BlockSpring; import buildcraft.core.DefaultProps; import buildcraft.core.InterModComms; import buildcraft.core.Version; -import buildcraft.core.fluids.BCFluid; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.triggers.BCTrigger; import buildcraft.energy.BlockBuildcraftFluid; @@ -136,19 +135,18 @@ public class BuildCraftEnergy extends BuildCraftMod { // Oil and fuel - buildcraftFluidOil = new BCFluid("oil").setDensity(800).setViscosity(1500); + buildcraftFluidOil = new Fluid("oil").setDensity(800).setViscosity(1500); FluidRegistry.registerFluid(buildcraftFluidOil); fluidOil = FluidRegistry.getFluid("oil"); - buildcraftFluidFuel = new BCFluid("fuel"); + buildcraftFluidFuel = new Fluid("fuel"); FluidRegistry.registerFluid(buildcraftFluidFuel); fluidFuel = FluidRegistry.getFluid("fuel"); if (fluidOil.getBlock() == null) { blockOil = new BlockBuildcraftFluid(fluidOil, Material.water).setFlammable(canOilBurn).setFlammability(0); blockOil.setBlockName("blockOil"); - CoreProxy.proxy.addName(blockOil, "Oil"); CoreProxy.proxy.registerBlock(blockOil); fluidOil.setBlock(blockOil); } else { @@ -164,7 +162,6 @@ public class BuildCraftEnergy extends BuildCraftMod { if (fluidFuel.getBlock() == null) { blockFuel = new BlockBuildcraftFluid(fluidFuel, Material.water).setFlammable(true).setFlammability(5).setParticleColor(0.7F, 0.7F, 0.0F); blockFuel.setBlockName("blockFuel"); - CoreProxy.proxy.addName(blockFuel, "Fuel"); CoreProxy.proxy.registerBlock(blockFuel); fluidFuel.setBlock(blockFuel); } else { diff --git a/common/buildcraft/BuildCraftFactory.java b/common/buildcraft/BuildCraftFactory.java index 881dbf74..0069bcda 100644 --- a/common/buildcraft/BuildCraftFactory.java +++ b/common/buildcraft/BuildCraftFactory.java @@ -184,43 +184,33 @@ public class BuildCraftFactory extends BuildCraftMod { miningWellBlock = new BlockMiningWell(); CoreProxy.proxy.registerBlock(miningWellBlock.setBlockName("miningWellBlock")); - CoreProxy.proxy.addName(miningWellBlock, "Mining Well"); plainPipeBlock = new BlockPlainPipe(); CoreProxy.proxy.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock")); - CoreProxy.proxy.addName(plainPipeBlock, "Mining Pipe"); autoWorkbenchBlock = new BlockAutoWorkbench(); CoreProxy.proxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock")); - CoreProxy.proxy.addName(autoWorkbenchBlock, "Automatic Crafting Table"); frameBlock = new BlockFrame(); CoreProxy.proxy.registerBlock(frameBlock.setBlockName("frameBlock")); - CoreProxy.proxy.addName(frameBlock, "Frame"); quarryBlock = new BlockQuarry(); CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock")); - CoreProxy.proxy.addName(quarryBlock, "Quarry"); tankBlock = new BlockTank(); CoreProxy.proxy.registerBlock(tankBlock.setBlockName("tankBlock")); - CoreProxy.proxy.addName(tankBlock, "Tank"); pumpBlock = new BlockPump(); CoreProxy.proxy.registerBlock(pumpBlock.setBlockName("pumpBlock")); - CoreProxy.proxy.addName(pumpBlock, "Pump"); floodGateBlock = new BlockFloodGate(); CoreProxy.proxy.registerBlock(floodGateBlock.setBlockName("floodGateBlock")); - CoreProxy.proxy.addName(floodGateBlock, "Flood Gate"); refineryBlock = new BlockRefinery(); CoreProxy.proxy.registerBlock(refineryBlock.setBlockName("refineryBlock")); - CoreProxy.proxy.addName(refineryBlock, "Refinery"); hopperBlock = new BlockHopper(); CoreProxy.proxy.registerBlock(hopperBlock.setBlockName("blockHopper")); - CoreProxy.proxy.addName(hopperBlock, "Hopper"); FactoryProxy.proxy.initializeEntityRenders(); diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index 3221f627..590973be 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -71,7 +71,6 @@ public class BuildCraftSilicon extends BuildCraftMod { BuildCraftCore.mainConfiguration.save(); laserBlock = new BlockLaser(); - CoreProxy.proxy.addName(laserBlock.setBlockName("laserBlock"), "Laser"); CoreProxy.proxy.registerBlock(laserBlock); assemblyTableBlock = new BlockLaserTable(); diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index a9cd1f38..cf72d17d 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -332,7 +332,6 @@ public class BuildCraftTransport extends BuildCraftMod { filteredBufferBlock = new BlockFilteredBuffer(); CoreProxy.proxy.registerBlock(filteredBufferBlock.setBlockName("filteredBufferBlock")); - CoreProxy.proxy.addName(filteredBufferBlock, "Filtered Buffer"); for (PipeContents kind : PipeContents.values()) { triggerPipe[kind.ordinal()] = new TriggerPipeContents(kind); diff --git a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java index 4eede86c..e89316eb 100644 --- a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java @@ -79,7 +79,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { protected void drawGuiContainerForegroundLayer(int par1, int par2) { // fontRenderer.drawString(library.owner + "'s Library", 6, 6, // 0x404040); - String title = StringUtils.localize("tile.libraryBlock"); + String title = StringUtils.localize("tile.libraryBlock.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); int c = 0; diff --git a/common/buildcraft/builders/gui/GuiBuilder.java b/common/buildcraft/builders/gui/GuiBuilder.java index 8bc8c4ad..25c865cc 100644 --- a/common/buildcraft/builders/gui/GuiBuilder.java +++ b/common/buildcraft/builders/gui/GuiBuilder.java @@ -45,7 +45,7 @@ public class GuiBuilder extends GuiAdvancedInterface { protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); - String title = StringUtils.localize("tile.builderBlock"); + String title = StringUtils.localize("tile.builderBlock.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 12, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.building.resources"), 8, 60, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); diff --git a/common/buildcraft/builders/gui/GuiFiller.java b/common/buildcraft/builders/gui/GuiFiller.java index 9752ecac..ce13b5fa 100644 --- a/common/buildcraft/builders/gui/GuiFiller.java +++ b/common/buildcraft/builders/gui/GuiFiller.java @@ -61,7 +61,7 @@ public class GuiFiller extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - String title = StringUtils.localize("tile.fillerBlock"); + String title = StringUtils.localize("tile.fillerBlock.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.filling.resources"), 8, 74, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, 142, 0x404040); diff --git a/common/buildcraft/builders/gui/GuiTemplate.java b/common/buildcraft/builders/gui/GuiTemplate.java index c5cfa09c..aefaa773 100644 --- a/common/buildcraft/builders/gui/GuiTemplate.java +++ b/common/buildcraft/builders/gui/GuiTemplate.java @@ -43,7 +43,7 @@ public class GuiTemplate extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - String title = StringUtils.localize("tile.architectBlock"); + String title = StringUtils.localize("tile.architectBlock.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 152, 0x404040); diff --git a/common/buildcraft/core/CreativeTabBuildCraft.java b/common/buildcraft/core/CreativeTabBuildCraft.java index 6b49b115..69cc9304 100644 --- a/common/buildcraft/core/CreativeTabBuildCraft.java +++ b/common/buildcraft/core/CreativeTabBuildCraft.java @@ -1,16 +1,13 @@ package buildcraft.core; -import buildcraft.BuildCraftCore; -import buildcraft.core.utils.Localization; -import buildcraft.transport.ItemFacade; - import java.util.Locale; -import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import buildcraft.BuildCraftCore; +import buildcraft.transport.ItemFacade; public enum CreativeTabBuildCraft { @@ -30,10 +27,6 @@ public enum CreativeTabBuildCraft { return "buildcraft." + name().toLowerCase(Locale.ENGLISH); } - private String translate() { - return Localization.get("tab." + name().toLowerCase(Locale.ENGLISH)); - } - private ItemStack getItem() { switch (this) { case FACADES: @@ -55,11 +48,6 @@ public enum CreativeTabBuildCraft { return getItem(); } - @Override - public String getTranslatedTabLabel() { - return translate(); - } - @Override public Item getTabIconItem() { return getItem().getItem(); diff --git a/common/buildcraft/core/ItemBlockBuildCraft.java b/common/buildcraft/core/ItemBlockBuildCraft.java index f30bc0fe..75fa986a 100644 --- a/common/buildcraft/core/ItemBlockBuildCraft.java +++ b/common/buildcraft/core/ItemBlockBuildCraft.java @@ -23,9 +23,4 @@ public class ItemBlockBuildCraft extends ItemBlock { public int getMetadata(int i) { return i; } - - @Override - public String getItemStackDisplayName(ItemStack itemstack) { - return StringUtils.localize(getUnlocalizedName(itemstack)); - } } diff --git a/common/buildcraft/core/ItemBuildCraft.java b/common/buildcraft/core/ItemBuildCraft.java index d3d6998f..94b1b0d5 100644 --- a/common/buildcraft/core/ItemBuildCraft.java +++ b/common/buildcraft/core/ItemBuildCraft.java @@ -27,11 +27,6 @@ public class ItemBuildCraft extends Item { setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); } - @Override - public String getItemStackDisplayName(ItemStack itemstack) { - return StringUtils.localize(getUnlocalizedName(itemstack)); - } - @Override public Item setUnlocalizedName(String par1Str) { iconName = par1Str; diff --git a/common/buildcraft/core/fluids/BCFluid.java b/common/buildcraft/core/fluids/BCFluid.java deleted file mode 100644 index 4d3983ec..00000000 --- a/common/buildcraft/core/fluids/BCFluid.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ -package buildcraft.core.fluids; - -import buildcraft.core.utils.StringUtils; -import net.minecraftforge.fluids.Fluid; - -public class BCFluid extends Fluid { - - public BCFluid(String name) { - super(name); - } - - @Override - public String getLocalizedName() { - return StringUtils.localize("fluid." + fluidName); - } -} diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index a6856327..4d58a0d0 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -65,10 +65,6 @@ public class CoreProxy { return null; } - public String getCurrentLanguage() { - return null; - } - /* ENTITY HANDLING */ public void removeEntity(Entity entity) { entity.worldObj.removeEntity(entity); @@ -79,13 +75,6 @@ public class CoreProxy { public void feedSubBlocks(Block block, CreativeTabs tab, List itemList) { } - /* LOCALIZATION */ - public void addName(Object obj, String s) { - } - - public void addLocalization(String s1, String string) { - } - public String getItemDisplayName(ItemStack newStack) { return ""; } diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index 61e050c5..de07ad5f 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -81,22 +81,6 @@ public class CoreProxyClient extends CoreProxy { block.getSubBlocks(Item.getItemFromBlock(block), tab, itemList); } - /* LOCALIZATION */ - @Override - public String getCurrentLanguage() { - return Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode(); - } - - @Override - public void addName(Object obj, String s) { - LanguageRegistry.addName(obj, s); - } - - @Override - public void addLocalization(String s1, String string) { - LanguageRegistry.instance().addStringLocalization(s1, string); - } - @Override public String getItemDisplayName(ItemStack stack) { if (stack.getItem() == null) diff --git a/common/buildcraft/core/utils/Localization.java b/common/buildcraft/core/utils/Localization.java deleted file mode 100644 index f7d21ad8..00000000 --- a/common/buildcraft/core/utils/Localization.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ -package buildcraft.core.utils; - -import buildcraft.core.proxy.CoreProxy; -import java.io.IOException; -import java.io.InputStream; -import java.util.LinkedList; -import java.util.Properties; - -/** - * Simple mod localization class. - */ -public class Localization { - - private static class modInfo { - - final String modName, defaultLanguage; - - public modInfo(String modName, String defaultLanguage) { - this.modName = modName; - this.defaultLanguage = defaultLanguage; - } - } - - private static String loadedLanguage = getCurrentLanguage(); - private static Properties defaultMappings = new Properties(); - private static Properties mappings = new Properties(); - private static LinkedList mods = new LinkedList(); - - /** - * Adds localization from a given directory. The files must have the same name as the corresponding language file in minecraft and a ".properties" file - * extention e.g "en_US.properties" - * - * @param path - * The path to the localization files - * @param defaultLanguage - * The default localization to be used when there is no localization for the selected language or if a string is missing (e.g. "en_US") - */ - public static void addLocalization(String path, String defaultLanguage) { - mods.add(new modInfo(path, defaultLanguage)); - load(path, defaultLanguage); - } - - /** - * Get a string for the given key, in the currently active translation. - * - * @param key - * @return - */ - public static synchronized String get(String key) { - if (getCurrentLanguage() == null) { - return key; - } - if (!getCurrentLanguage().equals(loadedLanguage)) { - defaultMappings.clear(); - mappings.clear(); - for (modInfo mInfo : mods) { - load(mInfo.modName, mInfo.defaultLanguage); - } - loadedLanguage = getCurrentLanguage(); - } - - return mappings.getProperty(key, defaultMappings.getProperty(key, key)); - } - - public static synchronized boolean hasKey(String key) { - if (getCurrentLanguage() == null) { - return false; - } - if (!getCurrentLanguage().equals(loadedLanguage)) { - defaultMappings.clear(); - mappings.clear(); - for (modInfo mInfo : mods) { - load(mInfo.modName, mInfo.defaultLanguage); - } - loadedLanguage = getCurrentLanguage(); - } - - return mappings.getProperty(key, defaultMappings.getProperty(key)) != null; - } - - private static void load(String path, String default_language) { - InputStream langStream = null; - Properties modMappings = new Properties(); - - try { - // Load the default language mappings - langStream = Localization.class.getResourceAsStream(path + default_language + ".properties"); - modMappings.load(langStream); - defaultMappings.putAll(modMappings); - langStream.close(); - - // Try to load the current language mappings. - // If the file doesn't exist use the default mappings. - langStream = Localization.class.getResourceAsStream(path + getCurrentLanguage() + ".properties"); - if (langStream != null) { - modMappings.clear(); - modMappings.load(langStream); - } - - // If the selected language inherits mappings from another language - // we use those first and then we overwrite the common ones with - // those in the selected language - if (modMappings.containsKey("language.parent")) { - langStream = Localization.class.getResourceAsStream(path + modMappings.get("language.parent") + ".properties"); - - if (langStream != null) { - Properties parentModMappings = new Properties(); - - parentModMappings.load(langStream); - mappings.putAll(parentModMappings); - } - } - - mappings.putAll(modMappings); - - } catch (Exception e) { - e.printStackTrace(); - } finally { - try { - if (langStream != null) { - langStream.close(); - } - } catch (IOException ex) { - ex.printStackTrace(); - } - } - } - - private static String getCurrentLanguage() { - return CoreProxy.proxy.getCurrentLanguage(); - } -} diff --git a/common/buildcraft/core/utils/StringUtils.java b/common/buildcraft/core/utils/StringUtils.java index dde2fcbd..bdd6aca2 100644 --- a/common/buildcraft/core/utils/StringUtils.java +++ b/common/buildcraft/core/utils/StringUtils.java @@ -8,9 +8,19 @@ */ package buildcraft.core.utils; +import com.google.common.base.Splitter; + +import net.minecraft.util.StatCollector; + public class StringUtils { - public static String localize(String key) { - return Localization.get(key); - } -} + public static final Splitter newLineSplitter = Splitter.on("\\n"); + + public static String localize(String key) { + return StatCollector.translateToLocal(key); + } + + public static boolean canLocalize(String key) { + return StatCollector.canTranslate(key); + } +} \ No newline at end of file diff --git a/common/buildcraft/energy/ItemBucketBuildcraft.java b/common/buildcraft/energy/ItemBucketBuildcraft.java index 6b41b9ea..219852f2 100644 --- a/common/buildcraft/energy/ItemBucketBuildcraft.java +++ b/common/buildcraft/energy/ItemBucketBuildcraft.java @@ -29,11 +29,6 @@ public class ItemBucketBuildcraft extends ItemBucket { setContainerItem(Items.bucket); } - @Override - public String getItemStackDisplayName(ItemStack itemstack) { - return StringUtils.localize(getUnlocalizedName(itemstack)); - } - @Override public Item setUnlocalizedName(String par1Str) { iconName = par1Str; diff --git a/common/buildcraft/energy/gui/GuiCombustionEngine.java b/common/buildcraft/energy/gui/GuiCombustionEngine.java index 6357bc53..d0f33d49 100644 --- a/common/buildcraft/energy/gui/GuiCombustionEngine.java +++ b/common/buildcraft/energy/gui/GuiCombustionEngine.java @@ -35,7 +35,7 @@ public class GuiCombustionEngine extends GuiEngine { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); - String title = StringUtils.localize("tile.engineIron"); + String title = StringUtils.localize("tile.engineIron.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); } diff --git a/common/buildcraft/energy/gui/GuiStoneEngine.java b/common/buildcraft/energy/gui/GuiStoneEngine.java index 7a2e72d0..f790395e 100644 --- a/common/buildcraft/energy/gui/GuiStoneEngine.java +++ b/common/buildcraft/energy/gui/GuiStoneEngine.java @@ -29,7 +29,7 @@ public class GuiStoneEngine extends GuiEngine { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); - String title = StringUtils.localize("tile.engineStone"); + String title = StringUtils.localize("tile.engineStone.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); } diff --git a/common/buildcraft/factory/gui/GuiAutoCrafting.java b/common/buildcraft/factory/gui/GuiAutoCrafting.java index ae6b8c96..38ace692 100644 --- a/common/buildcraft/factory/gui/GuiAutoCrafting.java +++ b/common/buildcraft/factory/gui/GuiAutoCrafting.java @@ -37,7 +37,7 @@ public class GuiAutoCrafting extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - String title = StringUtils.localize("tile.autoWorkbenchBlock"); + String title = StringUtils.localize("tile.autoWorkbenchBlock.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); } diff --git a/common/buildcraft/factory/gui/GuiRefinery.java b/common/buildcraft/factory/gui/GuiRefinery.java index 04047aaa..0ed5e829 100644 --- a/common/buildcraft/factory/gui/GuiRefinery.java +++ b/common/buildcraft/factory/gui/GuiRefinery.java @@ -43,7 +43,7 @@ public class GuiRefinery extends GuiAdvancedInterface { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - String title = StringUtils.localize("tile.refineryBlock"); + String title = StringUtils.localize("tile.refineryBlock.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRendererObj.drawString("->", 63, 59, 0x404040); fontRendererObj.drawString("<-", 106, 59, 0x404040); diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index 2f56f12c..275cbc66 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -218,7 +218,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn @Override public String getInventoryName() { - return StringUtils.localize("tile.assemblyWorkbenchBlock"); + return StringUtils.localize("tile.assemblyWorkbenchBlock.name"); } @Override diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index 85c5716c..94469f35 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -130,7 +130,7 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I @Override public String getInventoryName() { - return StringUtils.localize("tile.assemblyTableBlock"); + return StringUtils.localize("tile.assemblyTableBlock.name"); } @Override diff --git a/common/buildcraft/silicon/TileIntegrationTable.java b/common/buildcraft/silicon/TileIntegrationTable.java index c9cdb4f7..95719560 100644 --- a/common/buildcraft/silicon/TileIntegrationTable.java +++ b/common/buildcraft/silicon/TileIntegrationTable.java @@ -164,7 +164,7 @@ public class TileIntegrationTable extends TileLaserTableBase implements ISidedIn @Override public String getInventoryName() { - return StringUtils.localize("tile.integrationTableBlock"); + return StringUtils.localize("tile.integrationTableBlock.name"); } @Override diff --git a/common/buildcraft/silicon/gui/GuiAssemblyTable.java b/common/buildcraft/silicon/gui/GuiAssemblyTable.java index 8490e301..6ad31d32 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyTable.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyTable.java @@ -138,7 +138,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); - String title = StringUtils.localize("tile.assemblyTableBlock"); + String title = StringUtils.localize("tile.assemblyTableBlock.name"); fontRendererObj.drawString(title, getCenteredOffset(title), 15, 0x404040); fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); drawForegroundSelection(par1, par2); diff --git a/common/buildcraft/transport/PipeToolTipManager.java b/common/buildcraft/transport/PipeToolTipManager.java index 2ec6e3e1..79259c21 100644 --- a/common/buildcraft/transport/PipeToolTipManager.java +++ b/common/buildcraft/transport/PipeToolTipManager.java @@ -8,15 +8,19 @@ */ package buildcraft.transport; -import buildcraft.core.utils.Localization; +import buildcraft.core.utils.StringUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; +import com.google.common.base.Splitter; +import com.google.common.collect.Iterables; + @SideOnly(Side.CLIENT) public class PipeToolTipManager { @@ -35,13 +39,13 @@ public class PipeToolTipManager { public static List getToolTip(Class pipe) { List tips = new ArrayList(); String tipTag = "tip." + pipe.getSimpleName(); - if (Localization.hasKey(tipTag)) { - String localized = Localization.get(tipTag); - if (localized != null) { - String[] lines = localized.split("\\n"); + if (StringUtils.canLocalize(tipTag)) { + String localized = StringUtils.localize(tipTag); + if (localized != null) { + String[] lines = (String[])Iterables.toArray(StringUtils.newLineSplitter.split(localized), String.class); tips.addAll(Arrays.asList(lines)); } - } + } String tip = toolTips.get(pipe); if (tip != null) tips.add(tip); diff --git a/common/buildcraft/transport/gates/ItemGate.java b/common/buildcraft/transport/gates/ItemGate.java index ccec07d8..b64b8aae 100644 --- a/common/buildcraft/transport/gates/ItemGate.java +++ b/common/buildcraft/transport/gates/ItemGate.java @@ -16,7 +16,7 @@ import buildcraft.api.gates.IAction; import buildcraft.api.gates.ITrigger; import buildcraft.core.ItemBuildCraft; import buildcraft.core.inventory.InvUtils; -import buildcraft.core.utils.Localization; +import buildcraft.core.utils.StringUtils; import buildcraft.core.utils.Utils; import buildcraft.transport.Gate; import buildcraft.transport.gates.GateDefinition.GateLogic; @@ -39,6 +39,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; public class ItemGate extends ItemBuildCraft { @@ -174,6 +175,12 @@ public class ItemGate extends ItemBuildCraft { public String getUnlocalizedName(ItemStack stack) { return GateDefinition.getLocalizedName(getMaterial(stack), getLogic(stack)); } + + @Override + public String getItemStackDisplayName(ItemStack stack) + { + return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack))).trim(); + } @SuppressWarnings({"unchecked", "rawtypes"}) @Override @@ -216,12 +223,12 @@ public class ItemGate extends ItemBuildCraft { public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) { super.addInformation(stack, player, list, adv); - list.add("§9§o" + Localization.get("tip.gate.wires")); - list.add(Localization.get("tip.gate.wires." + getMaterial(stack).getTag())); + list.add(StringUtils.localize("tip.gate.wires")); + list.add(StringUtils.localize("tip.gate.wires." + getMaterial(stack).getTag())); Set expansions = getInstalledExpansions(stack); if (!expansions.isEmpty()) { - list.add("§9§o" + Localization.get("tip.gate.expansions")); + list.add(StringUtils.localize("tip.gate.expansions")); for (IGateExpansion expansion : expansions) { list.add(expansion.getDisplayName()); diff --git a/common/buildcraft/transport/gui/GuiFilteredBuffer.java b/common/buildcraft/transport/gui/GuiFilteredBuffer.java index a5ec8f3c..2ad8807f 100644 --- a/common/buildcraft/transport/gui/GuiFilteredBuffer.java +++ b/common/buildcraft/transport/gui/GuiFilteredBuffer.java @@ -53,7 +53,7 @@ public class GuiFilteredBuffer extends GuiContainer { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - String title = StringUtils.localize("tile.filteredBufferBlock"); + String title = StringUtils.localize("tile.filteredBufferBlock.name"); int xPos = (xSize - fontRendererObj.getStringWidth(title)) / 2; fontRendererObj.drawString(title, xPos, 10, 0x404040); }