diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineKeyForge.java b/src/main/java/com/hbm/inventory/container/ContainerMachineKeyForge.java index e95d67023..8c35c1d43 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineKeyForge.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineKeyForge.java @@ -17,21 +17,21 @@ public class ContainerMachineKeyForge extends Container { diFurnace = tedf; - this.addSlotToContainer(new Slot(tedf, 0, 44, 35)); - this.addSlotToContainer(new Slot(tedf, 1, 80, 35)); - this.addSlotToContainer(new Slot(tedf, 2, 116, 35)); + this.addSlotToContainer(new Slot(tedf, 0, 44, 36)); + this.addSlotToContainer(new Slot(tedf, 1, 80, 36)); + this.addSlotToContainer(new Slot(tedf, 2, 116, 36)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18)); } } for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162)); } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineSatLinker.java b/src/main/java/com/hbm/inventory/container/ContainerMachineSatLinker.java index 449ee965e..273cacbe8 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineSatLinker.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineSatLinker.java @@ -17,21 +17,21 @@ public class ContainerMachineSatLinker extends Container { diFurnace = tedf; - this.addSlotToContainer(new Slot(tedf, 0, 44, 35)); - this.addSlotToContainer(new Slot(tedf, 1, 80, 35)); - this.addSlotToContainer(new Slot(tedf, 2, 116, 35)); + this.addSlotToContainer(new Slot(tedf, 0, 44, 36)); + this.addSlotToContainer(new Slot(tedf, 1, 80, 36)); + this.addSlotToContainer(new Slot(tedf, 2, 116, 36)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18)); } } for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162)); } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerSatDock.java b/src/main/java/com/hbm/inventory/container/ContainerSatDock.java index 02f02db56..3cee8e12e 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerSatDock.java +++ b/src/main/java/com/hbm/inventory/container/ContainerSatDock.java @@ -18,23 +18,23 @@ public class ContainerSatDock extends Container { tileSatelliteDock = tesd; //Storage - this.addSlotToContainer(new SlotTakeOnly(tesd, 0, 62, 17)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 1, 80, 17)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 2, 98, 17)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 3, 116, 17)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 4, 134, 17)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 5, 62, 35)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 6, 80, 35)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 7, 98, 35)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 8, 116, 35)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 9, 134, 35)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 10, 62, 53)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 11, 80, 53)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 12, 98, 53)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 13, 116, 53)); - this.addSlotToContainer(new SlotTakeOnly(tesd, 14, 134, 53)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 0, 71, 18)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 1, 71 + 18, 18)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 2, 71 + 18 * 2, 18)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 3, 71 + 18 * 3, 18)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 4, 71 + 18 * 4, 18)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 5, 71, 36)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 6, 71 + 18, 36)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 7, 71 + 18 * 2, 36)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 8, 71 + 18 * 3, 36)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 9, 71 + 18 * 4, 36)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 10, 71, 54)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 11, 71 + 18, 54)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 12, 71 + 18 * 2, 54)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 13, 71 + 18 * 3, 54)); + this.addSlotToContainer(new SlotTakeOnly(tesd, 14, 71 + 18 * 4, 54)); //Chip - this.addSlotToContainer(new Slot(tesd, 15, 26, 35) { + this.addSlotToContainer(new Slot(tesd, 15, 26, 36) { @Override public boolean isItemValid(ItemStack stack) { return stack.getItem() instanceof ItemSatChip; @@ -43,12 +43,12 @@ public class ContainerSatDock extends Container { for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18)); } } for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162)); } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerSoyuzCapsule.java b/src/main/java/com/hbm/inventory/container/ContainerSoyuzCapsule.java index 390391847..4ccf28730 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerSoyuzCapsule.java +++ b/src/main/java/com/hbm/inventory/container/ContainerSoyuzCapsule.java @@ -19,23 +19,23 @@ public class ContainerSoyuzCapsule extends Container { { for(int j = 0; j < 6; j++) { - this.addSlotToContainer(new Slot(tedf, j + i * 6, 8 + j * 18 + 18 * 2, 17 + i * 18)); + this.addSlotToContainer(new Slot(tedf, j + i * 6, 26 + j * 18 + 18 * 2, 18 + i * 18)); } } - this.addSlotToContainer(new Slot(tedf, 18, 8, 35)); + this.addSlotToContainer(new Slot(tedf, 18, 17, 36)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18)); } } for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162)); } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerSoyuzLauncher.java b/src/main/java/com/hbm/inventory/container/ContainerSoyuzLauncher.java index 6c13565d7..6fa787caa 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerSoyuzLauncher.java +++ b/src/main/java/com/hbm/inventory/container/ContainerSoyuzLauncher.java @@ -17,29 +17,29 @@ public class ContainerSoyuzLauncher extends Container { nukeBoy = tedf; //Soyuz - this.addSlotToContainer(new Slot(tedf, 0, 62, 18)); + this.addSlotToContainer(new Slot(tedf, 0, 98, 80)); //Designator - this.addSlotToContainer(new Slot(tedf, 1, 62, 36)); + this.addSlotToContainer(new Slot(tedf, 1, 80, 80)); //Satellite - this.addSlotToContainer(new Slot(tedf, 2, 116, 18)); + this.addSlotToContainer(new Slot(tedf, 2, 98, 26)); //Landing module - this.addSlotToContainer(new Slot(tedf, 3, 116, 36)); + this.addSlotToContainer(new Slot(tedf, 3, 80, 26)); //Kerosene IN - this.addSlotToContainer(new Slot(tedf, 4, 8, 90)); + this.addSlotToContainer(new Slot(tedf, 4, 152, 98)); //Kerosene OUT - this.addSlotToContainer(new Slot(tedf, 5, 8, 108)); - //Peroxide IN - this.addSlotToContainer(new Slot(tedf, 6, 26, 90)); - //Peroxide OUT - this.addSlotToContainer(new Slot(tedf, 7, 26, 108)); + this.addSlotToContainer(new Slot(tedf, 5, 152, 116)); + //Oxyden IN + this.addSlotToContainer(new Slot(tedf, 6, 170, 98)); + //Oxyden OUT + this.addSlotToContainer(new Slot(tedf, 7, 170, 116)); //Battery - this.addSlotToContainer(new Slot(tedf, 8, 44, 108)); + this.addSlotToContainer(new Slot(tedf, 8, 134, 98)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 6; j++) { - this.addSlotToContainer(new Slot(tedf, j + i * 6 + 9, 62 + j * 18, 72 + i * 18)); + this.addSlotToContainer(new Slot(tedf, j + i * 6 + 9, 44 - i * 18, 26 + j * 18)); } } @@ -47,13 +47,13 @@ public class ContainerSoyuzLauncher extends Container { { for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56)); + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 17 + j * 18, 162 + i * 18)); } } for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56)); + this.addSlotToContainer(new Slot(invPlayer, i, 17 + i * 18, 220)); } } @@ -68,8 +68,8 @@ public class ContainerSoyuzLauncher extends Container { ItemStack var5 = var4.getStack(); var3 = var5.copy(); - if (par2 <= 27) { - if (!this.mergeItemStack(var5, 9, this.inventorySlots.size(), true)) + if (par2 < 27) { + if (!this.mergeItemStack(var5, 27, this.inventorySlots.size(), true)) { return null; } diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineKeyForge.java b/src/main/java/com/hbm/inventory/gui/GUIMachineKeyForge.java index 54cafc0d0..dfa6794a7 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineKeyForge.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineKeyForge.java @@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.inventory.container.ContainerMachineKeyForge; import com.hbm.lib.RefStrings; import com.hbm.tileentity.machine.TileEntityMachineKeyForge; +import com.hbm.util.i18n.I18nUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.I18n; @@ -13,7 +14,7 @@ import net.minecraft.util.ResourceLocation; public class GUIMachineKeyForge extends GuiInfoContainer { - private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_keyforge.png"); + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_keyforge.png"); private TileEntityMachineKeyForge siren; public GUIMachineKeyForge(InventoryPlayer invPlayer, TileEntityMachineKeyForge tedf) { @@ -21,26 +22,25 @@ public class GUIMachineKeyForge extends GuiInfoContainer { siren = tedf; this.xSize = 176; - this.ySize = 166; + this.ySize = 186; } @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - String[] text = new String[] { "The first slot will copy the key/lock's", - "pin configuration and paste it to the second slot." }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text); + String[] keyText = I18nUtil.resolveKeyArray("desc.gui.keyforge.key"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28, 16, 16, guiLeft - 8, guiTop + 36 + 16, keyText); - String[] text1 = new String[] { "The third slot will randomize the", - "key/lock's pin configuration."}; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1); + String[] randomText = I18nUtil.resolveKeyArray("desc.gui.keyforge.random"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, randomText); } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.siren.hasCustomInventoryName() ? this.siren.getInventoryName() : I18n.format(this.siren.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xffffff); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } @@ -50,7 +50,7 @@ public class GUIMachineKeyForge extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); - this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3); + this.drawInfoPanel(guiLeft + 12, guiTop + 28, 16, 16, 2); + this.drawInfoPanel(guiLeft + 12, guiTop + 28 + 16, 16, 16, 3); } } diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineSatLinker.java b/src/main/java/com/hbm/inventory/gui/GUIMachineSatLinker.java index 9bd5eeb50..c6783fa0a 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineSatLinker.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineSatLinker.java @@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.inventory.container.ContainerMachineSatLinker; import com.hbm.lib.RefStrings; import com.hbm.tileentity.machine.TileEntityMachineSatLinker; +import com.hbm.util.i18n.I18nUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.I18n; @@ -13,7 +14,7 @@ import net.minecraft.util.ResourceLocation; public class GUIMachineSatLinker extends GuiInfoContainer { - private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_linker.png"); + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_sat_linker.png"); private TileEntityMachineSatLinker siren; public GUIMachineSatLinker(InventoryPlayer invPlayer, TileEntityMachineSatLinker tedf) { @@ -21,25 +22,24 @@ public class GUIMachineSatLinker extends GuiInfoContainer { siren = tedf; this.xSize = 176; - this.ySize = 166; + this.ySize = 186; } @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - String[] text = new String[] { "The first slot will copy the satellite/chip's", - "frequency and paste it to the second slot." }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text); + String[] chipText = I18nUtil.resolveKeyArray("desc.gui.satlinker.chip"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28, 16, 16, guiLeft - 8, guiTop + 36 + 16, chipText); - String[] text1 = new String[] { "The third slot will randomize the", - "satellite/chip's frequency."}; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1); + String[] randomText = I18nUtil.resolveKeyArray("desc.gui.satlinker.random"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, randomText); } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.siren.hasCustomInventoryName() ? this.siren.getInventoryName() : I18n.format(this.siren.getInventoryName()); + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } @@ -50,7 +50,7 @@ public class GUIMachineSatLinker extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); - this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3); + this.drawInfoPanel(guiLeft + 12, guiTop + 28, 16, 16, 2); + this.drawInfoPanel(guiLeft + 12, guiTop + 28 + 16, 16, 16, 3); } } diff --git a/src/main/java/com/hbm/inventory/gui/GUISatDock.java b/src/main/java/com/hbm/inventory/gui/GUISatDock.java index 369530b2f..08d66d82a 100644 --- a/src/main/java/com/hbm/inventory/gui/GUISatDock.java +++ b/src/main/java/com/hbm/inventory/gui/GUISatDock.java @@ -3,6 +3,8 @@ package com.hbm.inventory.gui; import com.hbm.inventory.container.ContainerSatDock; import com.hbm.lib.RefStrings; import com.hbm.tileentity.machine.TileEntityMachineSatDock; +import com.hbm.util.i18n.I18nUtil; + import net.minecraft.client.Minecraft; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; @@ -11,7 +13,7 @@ import org.lwjgl.opengl.GL11; public class GUISatDock extends GuiInfoContainer { - public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_dock.png"); + public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_sat_dock.png"); private final TileEntityMachineSatDock tileSatelliteDock; public GUISatDock(InventoryPlayer invPlayer, TileEntityMachineSatDock tesd) { @@ -19,24 +21,22 @@ public class GUISatDock extends GuiInfoContainer { tileSatelliteDock = tesd; this.xSize = 176; - this.ySize = 168; + this.ySize = 186; } @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - String[] text = new String[] { "Requires linked miner sat chip.", - "Cargo ship will land periodically to", - "deliver resources." }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text); + String[] text = I18nUtil.resolveKeyArray("desc.gui.satdock.desc"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 7, guiTop + 36, 16, 16, guiLeft - 7, guiTop + 36 + 16, text); } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.tileSatelliteDock.hasCustomInventoryName() ? this.tileSatelliteDock.getInventoryName() : I18n.format(this.tileSatelliteDock.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0x404040); + this.fontRendererObj.drawString(name, 115 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0x404040); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 0x404040); } @@ -46,6 +46,6 @@ public class GUISatDock extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); + this.drawInfoPanel(guiLeft - 7, guiTop + 36, 16, 16, 2); } } diff --git a/src/main/java/com/hbm/inventory/gui/GUISoyuzCapsule.java b/src/main/java/com/hbm/inventory/gui/GUISoyuzCapsule.java index 055aeabd5..b1a83afe0 100644 --- a/src/main/java/com/hbm/inventory/gui/GUISoyuzCapsule.java +++ b/src/main/java/com/hbm/inventory/gui/GUISoyuzCapsule.java @@ -14,7 +14,7 @@ import net.minecraft.util.ResourceLocation; public class GUISoyuzCapsule extends GuiContainer { - private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_soyuz_capsule.png"); + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_soyuz_capsule.png"); private TileEntitySoyuzCapsule diFurnace; public GUISoyuzCapsule(InventoryPlayer invPlayer, TileEntitySoyuzCapsule tedf) { @@ -22,14 +22,14 @@ public class GUISoyuzCapsule extends GuiContainer { diFurnace = tedf; this.xSize = 176; - this.ySize = 168; + this.ySize = 186; } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(name, 115 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0x7daf71); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } diff --git a/src/main/java/com/hbm/inventory/gui/GUISoyuzLauncher.java b/src/main/java/com/hbm/inventory/gui/GUISoyuzLauncher.java index a1fdb30cc..aace50777 100644 --- a/src/main/java/com/hbm/inventory/gui/GUISoyuzLauncher.java +++ b/src/main/java/com/hbm/inventory/gui/GUISoyuzLauncher.java @@ -7,6 +7,7 @@ import com.hbm.lib.RefStrings; import com.hbm.packet.PacketDispatcher; import com.hbm.packet.toserver.AuxButtonPacket; import com.hbm.tileentity.machine.TileEntitySoyuzLauncher; +import com.hbm.util.i18n.I18nUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; @@ -16,49 +17,50 @@ import net.minecraft.util.ResourceLocation; public class GUISoyuzLauncher extends GuiInfoContainer { - private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_soyuz.png"); + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_soyuz.png"); private TileEntitySoyuzLauncher launcher; public GUISoyuzLauncher(InventoryPlayer invPlayer, TileEntitySoyuzLauncher tedf) { super(new ContainerSoyuzLauncher(invPlayer, tedf)); launcher = tedf; - this.xSize = 176; - this.ySize = 222; + this.xSize = 194; + this.ySize = 244; } @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 36, 16, 52); - launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 36, 16, 52); - this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 49, guiTop + 72, 6, 34, launcher.power, launcher.maxPower); + launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 44, 16, 52); + launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 170, guiTop + 44, 16, 52); + this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 44, 16, 52, launcher.power, launcher.maxPower); + + String[] descText = I18nUtil.resolveKeyArray("desc.gui.soyuz.desc"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 53, 16, 16, guiLeft - 8, guiTop + 53 + 16, descText); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 43, guiTop + 17, 18, 18, mouseX, mouseY, new String[]{"The Soyuz goes here"} ); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 43, guiTop + 35, 18, 18, mouseX, mouseY, new String[]{"Designator only for CARGO MODE"} ); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 17, 18, 18, mouseX, mouseY, new String[]{"The payload for SATELLITE MODE"} ); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 35, 18, 18, mouseX, mouseY, new String[]{"The orbital module for special payloads"} ); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 88, guiTop + 17, 18, 18, mouseX, mouseY, new String[]{"SATELLITE MODE"} ); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 88, guiTop + 35, 18, 18, mouseX, mouseY, new String[]{"CARGO MODE"} ); + String[] cargoText = I18nUtil.resolveKeyArray("desc.gui.soyuz.cargo"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 79, guiTop + 52, 18, 18, mouseX, mouseY, cargoText ); + String[] satelliteText = I18nUtil.resolveKeyArray("desc.gui.soyuz.satellite"); + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 97, guiTop + 52, 18, 18, mouseX, mouseY, satelliteText ); } protected void mouseClicked(int x, int y, int i) { super.mouseClicked(x, y, i); - if(guiLeft + 88 <= x && guiLeft + 88 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) { + if(guiLeft + 97 <= x && guiLeft + 97 + 18 > x && guiTop + 52 < y && guiTop + 52 + 18 >= y) { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(launcher.xCoord, launcher.yCoord, launcher.zCoord, 0, 0)); } - if(guiLeft + 88 <= x && guiLeft + 88 + 18 > x && guiTop + 35 < y && guiTop + 35 + 18 >= y) { + if(guiLeft + 79 <= x && guiLeft + 79 + 18 > x && guiTop + 52 < y && guiTop + 52 + 18 >= y) { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(launcher.xCoord, launcher.yCoord, launcher.zCoord, 1, 0)); } - if(guiLeft + 151 <= x && guiLeft + 151 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) { + if(guiLeft + 88 <= x && guiLeft + 88 + 18 > x && guiTop + 97 < y && guiTop + 97 + 18 >= y) { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(launcher.xCoord, launcher.yCoord, launcher.zCoord, 0, 1)); @@ -69,8 +71,8 @@ public class GUISoyuzLauncher extends GuiInfoContainer { protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.launcher.hasCustomInventoryName() ? this.launcher.getInventoryName() : I18n.format(this.launcher.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); - this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 0xffffff); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 17, this.ySize - 96 + 2, 4210752); String secs = "" + launcher.countdown / 20; String cents = "" + (launcher.countdown % 20) * 5; @@ -79,9 +81,9 @@ public class GUISoyuzLauncher extends GuiInfoContainer { if(cents.length() == 1) cents += "0"; - float scale = 0.5F; + float scale = 1; GL11.glScalef(scale, scale, 1); - this.fontRendererObj.drawString(secs + ":" + cents, (int)(153.5F / scale), (int)(37.5F / scale), 0xff0000); + this.fontRendererObj.drawString(secs + ":" + cents, (int)(85 / scale), (int)(121 / scale), 0xff0000); GL11.glScalef(1/scale, 1/scale, 1); } @@ -91,47 +93,49 @@ public class GUISoyuzLauncher extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - int i = (int)launcher.getPowerScaled(34); - drawTexturedModalRect(guiLeft + 49, guiTop + 106 - i, 194, 52 - i, 6, i); + int i = (int)launcher.getPowerScaled(52); + drawTexturedModalRect(guiLeft + 134, guiTop + 96 - i, 194, 52 - i, 16, i); - drawTexturedModalRect(guiLeft + 61, guiTop + 17, 176 + (launcher.hasRocket() ? 18 : 0), 0, 18, 18); + drawTexturedModalRect(guiLeft + 97, guiTop + 79, 210 + (launcher.hasRocket() ? 18 : 0), 8, 18, 18); int j = launcher.designator(); if(j > 0) - drawTexturedModalRect(guiLeft + 61, guiTop + 35, 176 + (j - 1) * 18, 0, 18, 18); + drawTexturedModalRect(guiLeft + 79, guiTop + 79, 210 + (j - 1) * 18, 8, 18, 18); int k = launcher.mode; - drawTexturedModalRect(guiLeft + 88, guiTop + 17 + k * 18, 176, 18 + k * 18, 18, 18); + drawTexturedModalRect(guiLeft + 97 - k * 18, guiTop + 52, 228 - k * 18, 26, 18, 18); int l = launcher.orbital(); if(l > 0) - drawTexturedModalRect(guiLeft + 115, guiTop + 35, 176 + (l - 1) * 18, 0, 18, 18); + drawTexturedModalRect(guiLeft + 79, guiTop + 25, 210 + (l - 1) * 18, 8, 18, 18); int m = launcher.satellite(); if(m > 0) - drawTexturedModalRect(guiLeft + 115, guiTop + 17, 176 + (m - 1) * 18, 0, 18, 18); + drawTexturedModalRect(guiLeft + 97, guiTop + 25, 210 + (m - 1) * 18, 8, 18, 18); if(launcher.starting) - drawTexturedModalRect(guiLeft + 151, guiTop + 17, 176, 54, 18, 18); + drawTexturedModalRect(guiLeft + 88, guiTop + 97, 210, 44, 18, 18); if(launcher.hasFuel()) - drawTexturedModalRect(guiLeft + 13, guiTop + 23, 212, 0, 6, 8); + drawTexturedModalRect(guiLeft + 157, guiTop + 31, 210, 0, 6, 8); else - drawTexturedModalRect(guiLeft + 13, guiTop + 23, 218, 0, 6, 8); + drawTexturedModalRect(guiLeft + 157, guiTop + 31, 216, 0, 6, 8); if(launcher.hasOxy()) - drawTexturedModalRect(guiLeft + 31, guiTop + 23, 212, 0, 6, 8); + drawTexturedModalRect(guiLeft + 175, guiTop + 31, 210, 0, 6, 8); else - drawTexturedModalRect(guiLeft + 31, guiTop + 23, 218, 0, 6, 8); + drawTexturedModalRect(guiLeft + 175, guiTop + 31, 216, 0, 6, 8); if(launcher.hasPower()) - drawTexturedModalRect(guiLeft + 49, guiTop + 59, 212, 0, 6, 8); + drawTexturedModalRect(guiLeft + 139, guiTop + 31, 210, 0, 6, 8); else - drawTexturedModalRect(guiLeft + 49, guiTop + 59, 218, 0, 6, 8); + drawTexturedModalRect(guiLeft + 139, guiTop + 31, 216, 0, 6, 8); - launcher.tanks[0].renderTank(guiLeft + 8, guiTop + 88, this.zLevel, 16, 52); - launcher.tanks[1].renderTank(guiLeft + 26, guiTop + 88, this.zLevel, 16, 52); + launcher.tanks[0].renderTank(guiLeft + 152, guiTop + 96, this.zLevel, 16, 52); + launcher.tanks[1].renderTank(guiLeft + 170, guiTop + 96, this.zLevel, 16, 52); + + this.drawInfoPanel(guiLeft - 16, guiTop + 53, 16, 16, 2); } } diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 866312802..a3548454f 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -953,6 +953,8 @@ desc.gui.assembler.warning=§cError:§r This machine requires an assembly templa desc.gui.chemplant.warning=§cError:§r This machine requires an chemistry template! desc.gui.gasCent.enrichment=§2Enrichment§r$Uranium enrichment requires cascades.$Two-centrifuge cascades will give$uranium fuel, four-centrifuge cascades$will give total separation. desc.gui.gasCent.output=§6Fluid Transfer§r$Fluid can be transferred to another centrifuge$via the output port for further processing. +desc.gui.keyforge.key=The first slot will copy the key/lock's$pin configuration and paste it to the second slot. +desc.gui.keyforge.random=The third slot will randomize the$key/lock's pin configuration. desc.gui.nukeBoy.desc=§1Requires:§r$ * Neutron Shielding$ * U235 Projectile$ * Subcritical U235 Target$ * Propellant$ * Bomb Igniter desc.gui.nukeGadget.desc=§1Requires:§r$ * 4 Arrays of First-Generation$ High-Explosive Lenses$ * Heavy Plutonium Core$ * Wiring desc.gui.nukeMan.desc=§1Requires:§r$ * 4 Arrays of First-Generation$ High-Explosive Lenses$ * Plutonium Core$ * Bomb Firing Unit @@ -974,6 +976,12 @@ desc.gui.rtg.heat=§eCurrent heat level: %s desc.gui.rtg.pellets=Accepted Pellets: desc.gui.rtg.pelletHeat=%s (%s heat) desc.gui.rtg.pelletPower=%s (%s HE/tick) +desc.gui.satdock.desc=Requires linked miner sat chip.$Cargo ship will land periodically to$deliver resources. +desc.gui.satlinker.chip=The first slot will copy the satellite/chip's$frequency and paste it to the second slot. +desc.gui.satlinker.random=The third slot will randomize the$satellite/chip's frequency. +desc.gui.soyuz.cargo=CARGO MODE +desc.gui.soyuz.desc=Designator only for CARGO MODE$The payload for SATELLITE MODE +desc.gui.soyuz.satellite=SATELLITE MODE desc.gui.template=§9Templates§r$Templates can be made by$using the Machine Template Folder. desc.gui.turbinegas.automode=§2Automatic turbine throttling mode§r$By clicking the "AUTO" button, the turbine$will automatically adjust the throttle position$based on the power required from the network$and the fuel level in the internal tank desc.gui.turbinegas.fuels=§6Accepted fuels:§r diff --git a/src/main/resources/assets/hbm/textures/gui/gui_dock.png b/src/main/resources/assets/hbm/textures/gui/gui_dock.png deleted file mode 100644 index 7596be55e..000000000 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_dock.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/gui/gui_keyforge.png b/src/main/resources/assets/hbm/textures/gui/gui_keyforge.png deleted file mode 100644 index ec1f6ccb6..000000000 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_keyforge.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/gui/gui_linker.png b/src/main/resources/assets/hbm/textures/gui/gui_linker.png deleted file mode 100644 index 5ccf50936..000000000 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_linker.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/gui/gui_soyuz.png b/src/main/resources/assets/hbm/textures/gui/gui_soyuz.png deleted file mode 100644 index 2ae2fbdfe..000000000 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_soyuz.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/gui/gui_soyuz_capsule.png b/src/main/resources/assets/hbm/textures/gui/gui_soyuz_capsule.png deleted file mode 100644 index d5d1c4cfc..000000000 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_soyuz_capsule.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/gui/machine/gui_keyforge.png b/src/main/resources/assets/hbm/textures/gui/machine/gui_keyforge.png new file mode 100644 index 000000000..bc3a58a63 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/machine/gui_keyforge.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/machine/gui_sat_linker.png b/src/main/resources/assets/hbm/textures/gui/machine/gui_sat_linker.png new file mode 100644 index 000000000..a1262001b Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/machine/gui_sat_linker.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/machine/gui_soyuz.png b/src/main/resources/assets/hbm/textures/gui/machine/gui_soyuz.png new file mode 100644 index 000000000..c7f830400 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/machine/gui_soyuz.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/storage/gui_sat_dock.png b/src/main/resources/assets/hbm/textures/gui/storage/gui_sat_dock.png new file mode 100644 index 000000000..c0609a312 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/storage/gui_sat_dock.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/storage/gui_soyuz_capsule.png b/src/main/resources/assets/hbm/textures/gui/storage/gui_soyuz_capsule.png new file mode 100644 index 000000000..88de9f7c5 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/storage/gui_soyuz_capsule.png differ diff --git a/src/main/resources/assets/hbm/textures/items/sat_chip.png b/src/main/resources/assets/hbm/textures/items/sat_chip.png index ff0a9aa21..79f9fbc4a 100644 Binary files a/src/main/resources/assets/hbm/textures/items/sat_chip.png and b/src/main/resources/assets/hbm/textures/items/sat_chip.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/autosaw.png b/src/main/resources/assets/hbm/textures/models/machines/autosaw.png index 61a97f9bf..3c364ceae 100644 Binary files a/src/main/resources/assets/hbm/textures/models/machines/autosaw.png and b/src/main/resources/assets/hbm/textures/models/machines/autosaw.png differ