From b264f29f88447265cfe4c2ed685f419e307aa242 Mon Sep 17 00:00:00 2001 From: Kris Avi Date: Thu, 13 Sep 2012 06:32:20 +0300 Subject: [PATCH 1/2] Builders language file fix --- common/buildcraft/BuildCraftBuilders.java | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index aec05d7a..4acba576 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -240,28 +240,28 @@ public class BuildCraftBuilders { LanguageRegistry.addName(blueprintItem, "Blueprint"); markerBlock = new BlockMarker(Integer.parseInt(markerId.value)); - GameRegistry.registerBlock(markerBlock.setBlockName("markerBlock")); - LanguageRegistry.addName(markerBlock, "Land Mark"); + CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock")); + CoreProxy.proxy.addName(markerBlock, "Land Mark"); pathMarkerBlock = new BlockPathMarker(Integer.parseInt(pathMarkerId.value)); - GameRegistry.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock")); - LanguageRegistry.addName(pathMarkerBlock, "Path Mark"); + CoreProxy.proxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock")); + CoreProxy.proxy.addName(pathMarkerBlock, "Path Mark"); fillerBlock = new BlockFiller(Integer.parseInt(fillerId.value)); - GameRegistry.registerBlock(fillerBlock.setBlockName("fillerBlock")); - LanguageRegistry.addName(fillerBlock, "Filler"); + CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock")); + CoreProxy.proxy.addName(fillerBlock, "Filler"); builderBlock = new BlockBuilder(Integer.parseInt(builderId.value)); - GameRegistry.registerBlock(builderBlock.setBlockName("builderBlock")); - LanguageRegistry.addName(builderBlock, "Builder"); + CoreProxy.proxy.registerBlock(builderBlock.setBlockName("builderBlock")); + CoreProxy.proxy.addName(builderBlock, "Builder"); architectBlock = new BlockArchitect(Integer.parseInt(architectId.value)); - GameRegistry.registerBlock(architectBlock.setBlockName("architectBlock")); - LanguageRegistry.addName(architectBlock, "Architect Table"); + CoreProxy.proxy.registerBlock(architectBlock.setBlockName("architectBlock")); + CoreProxy.proxy.addName(architectBlock, "Architect Table"); libraryBlock = new BlockBlueprintLibrary(Integer.parseInt(libraryId.value)); - GameRegistry.registerBlock(libraryBlock.setBlockName("libraryBlock")); - LanguageRegistry.addName(libraryBlock, "Blueprint Library"); + CoreProxy.proxy.registerBlock(libraryBlock.setBlockName("libraryBlock")); + CoreProxy.proxy.addName(libraryBlock, "Blueprint Library"); GameRegistry.registerTileEntity(TileMarker.class, "Marker"); GameRegistry.registerTileEntity(TileFiller.class, "Filler"); From 92fb7e8afe8367a2a5945c916d303c6dccab4dd2 Mon Sep 17 00:00:00 2001 From: Kris Avi Date: Thu, 13 Sep 2012 10:49:26 +0300 Subject: [PATCH 2/2] Translatable areas Translatable Template table gui title, gates gui title, still and moving oil (in NEI) (and added Oils to en_US.properties) --- .../lang/buildcraft/en_US.properties | 4 +++- common/buildcraft/BuildCraftEnergy.java | 8 ++++---- common/buildcraft/builders/gui/GuiTemplate.java | 3 ++- common/buildcraft/transport/GateVanilla.java | 16 ++++++++-------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/buildcraft_resources/lang/buildcraft/en_US.properties b/buildcraft_resources/lang/buildcraft/en_US.properties index 3eaa91e0..83fe3fd0 100644 --- a/buildcraft_resources/lang/buildcraft/en_US.properties +++ b/buildcraft_resources/lang/buildcraft/en_US.properties @@ -87,4 +87,6 @@ tile.blockHopper=Hopper tile.pumpBlock=Pump tile.engineWood=Redstone Engine tile.engineStone=Stirling Engine -tile.engineIron=Combustion Engine \ No newline at end of file +tile.engineIron=Combustion Engine +tile.oilStill=Oil +tile.oilMoving=Oil \ No newline at end of file diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 32eba7b9..3f94e84f 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -120,12 +120,12 @@ public class BuildCraftEnergy { LanguageRegistry.addName(new ItemStack(engineBlock, 1, 2), "Combustion Engine"); oilStill = (new BlockOilStill(oilStillId.getInt(DefaultProps.OIL_STILL_ID), Material.water)).setBlockName("oil"); - LanguageRegistry.addName(oilStill.setBlockName("oilStill"), "Oil"); - GameRegistry.registerBlock(oilStill); + CoreProxy.proxy.addName(oilStill.setBlockName("oilStill"), "Oil"); + CoreProxy.proxy.registerBlock(oilStill); oilMoving = (new BlockOilFlowing(oilMovingId.getInt(DefaultProps.OIL_MOVING_ID), Material.water)).setBlockName("oil"); - LanguageRegistry.addName(oilMoving.setBlockName("oilMoving"), "Oil"); - GameRegistry.registerBlock(oilMoving); + CoreProxy.proxy.addName(oilMoving.setBlockName("oilMoving"), "Oil"); + CoreProxy.proxy.registerBlock(oilMoving); // Oil and fuel if (oilMoving.blockID + 1 != oilStill.blockID) diff --git a/common/buildcraft/builders/gui/GuiTemplate.java b/common/buildcraft/builders/gui/GuiTemplate.java index de71c4b9..ac78bba8 100644 --- a/common/buildcraft/builders/gui/GuiTemplate.java +++ b/common/buildcraft/builders/gui/GuiTemplate.java @@ -42,7 +42,8 @@ public class GuiTemplate extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer() { - fontRenderer.drawString(template.getInvName(), getCenteredOffset(template.getInvName()), 6, 0x404040); + String title = StringUtil.localize("tile.architectBlock"); + fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 152, 0x404040); if (editMode && ((new Date()).getTime() / 100) % 8 >= 4) diff --git a/common/buildcraft/transport/GateVanilla.java b/common/buildcraft/transport/GateVanilla.java index 9eca7dbd..72bedf80 100644 --- a/common/buildcraft/transport/GateVanilla.java +++ b/common/buildcraft/transport/GateVanilla.java @@ -11,6 +11,7 @@ import buildcraft.core.DefaultProps; import buildcraft.core.GuiIds; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; +import buildcraft.core.utils.StringUtil; import buildcraft.transport.triggers.ActionEnergyPulser; import net.minecraft.src.EntityPlayer; @@ -80,22 +81,21 @@ public class GateVanilla extends Gate { @Override public String getName() { - switch (kind) { case Single: - return "Gate"; + return StringUtil.localize("item.pipeGate.0"); case AND_2: - return "Iron AND Gate"; + return StringUtil.localize("item.pipeGate.1"); case AND_3: - return "Golden AND Gate"; + return StringUtil.localize("item.pipeGate.3"); case AND_4: - return "Diamond AND Gate"; + return StringUtil.localize("item.pipeGate.5"); case OR_2: - return "Iron OR Gate"; + return StringUtil.localize("item.pipeGate.2"); case OR_3: - return "Golden OR Gate"; + return StringUtil.localize("item.pipeGate.4"); case OR_4: - return "Diamond OR Gate"; + return StringUtil.localize("item.pipeGate.6"); default: return ""; }