diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineRTG.java b/src/main/java/com/hbm/inventory/container/ContainerMachineRTG.java index 07e1f070e..d14121ce0 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineRTG.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineRTG.java @@ -13,60 +13,60 @@ public class ContainerMachineRTG extends Container { private TileEntityMachineRTG testNuke; private int heat; - + public ContainerMachineRTG(InventoryPlayer invPlayer, TileEntityMachineRTG tedf) { heat = 0; - + testNuke = tedf; - - this.addSlotToContainer(new Slot(tedf, 0, 26, 17)); - this.addSlotToContainer(new Slot(tedf, 1, 44, 17)); - this.addSlotToContainer(new Slot(tedf, 2, 62, 17)); - this.addSlotToContainer(new Slot(tedf, 3, 80, 17)); - this.addSlotToContainer(new Slot(tedf, 4, 98, 17)); - this.addSlotToContainer(new Slot(tedf, 5, 26, 35)); - this.addSlotToContainer(new Slot(tedf, 6, 44, 35)); - this.addSlotToContainer(new Slot(tedf, 7, 62, 35)); - this.addSlotToContainer(new Slot(tedf, 8, 80, 35)); - this.addSlotToContainer(new Slot(tedf, 9, 98, 35)); - this.addSlotToContainer(new Slot(tedf, 10, 26, 53)); - this.addSlotToContainer(new Slot(tedf, 11, 44, 53)); - this.addSlotToContainer(new Slot(tedf, 12, 62, 53)); - this.addSlotToContainer(new Slot(tedf, 13, 80, 53)); - this.addSlotToContainer(new Slot(tedf, 14, 98, 53)); - + + this.addSlotToContainer(new Slot(tedf, 0, 16, 18)); + this.addSlotToContainer(new Slot(tedf, 1, 34, 18)); + this.addSlotToContainer(new Slot(tedf, 2, 52, 18)); + this.addSlotToContainer(new Slot(tedf, 3, 70, 18)); + this.addSlotToContainer(new Slot(tedf, 4, 88, 18)); + this.addSlotToContainer(new Slot(tedf, 5, 16, 36)); + this.addSlotToContainer(new Slot(tedf, 6, 34, 36)); + this.addSlotToContainer(new Slot(tedf, 7, 52, 36)); + this.addSlotToContainer(new Slot(tedf, 8, 70, 36)); + this.addSlotToContainer(new Slot(tedf, 9, 88, 36)); + this.addSlotToContainer(new Slot(tedf, 10, 16, 54)); + this.addSlotToContainer(new Slot(tedf, 11, 34, 54)); + this.addSlotToContainer(new Slot(tedf, 12, 52, 54)); + this.addSlotToContainer(new Slot(tedf, 13, 70, 54)); + this.addSlotToContainer(new Slot(tedf, 14, 88, 54)); + 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, 106 + 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, 164)); } } - + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.testNuke.heat); } - + @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) - { + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) + { ItemStack var3 = null; Slot var4 = (Slot) this.inventorySlots.get(par2); - + if (var4 != null && var4.getHasStack()) { ItemStack var5 = var4.getStack(); var3 = var5.copy(); - - if (par2 <= 14) { + + if (par2 <= 14) { if (!this.mergeItemStack(var5, 15, this.inventorySlots.size(), true)) { return null; @@ -74,9 +74,9 @@ public class ContainerMachineRTG extends Container { } else if (!this.mergeItemStack(var5, 0, 15, false)) { - return null; + return null; } - + if (var5.stackSize == 0) { var4.putStack((ItemStack) null); @@ -86,19 +86,19 @@ public class ContainerMachineRTG extends Container { var4.onSlotChanged(); } } - + return var3; - } + } @Override public boolean canInteractWith(EntityPlayer player) { return testNuke.isUseableByPlayer(player); } - + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); - + for(int i = 0; i < this.crafters.size(); i++) { ICrafting par1 = (ICrafting)this.crafters.get(i); @@ -111,7 +111,7 @@ public class ContainerMachineRTG extends Container { this.heat = this.testNuke.heat; } - + @Override public void updateProgressBar(int i, int j) { if(i == 0) diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineRTG.java b/src/main/java/com/hbm/inventory/gui/GUIMachineRTG.java index 2dc166fa4..22fa883f6 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineRTG.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineRTG.java @@ -19,61 +19,59 @@ public class GUIMachineRTG extends GuiInfoContainer { private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_rtg.png"); private TileEntityMachineRTG rtg; - + public GUIMachineRTG(InventoryPlayer invPlayer, TileEntityMachineRTG tedf) { super(new ContainerMachineRTG(invPlayer, tedf)); rtg = tedf; - + this.xSize = 176; - this.ySize = 166; + this.ySize = 188; } - + @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, rtg.power, rtg.powerMax); - + this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 146, guiTop + 9, 16, 51, rtg.power, rtg.powerMax); String[] heatText = I18nUtil.resolveKeyArray("desc.gui.rtg.heat", rtg.heat); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 134, guiTop + 17, 16, 52, mouseX, mouseY, heatText); - + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 124, guiTop + 9, 16, 51, mouseX, mouseY, heatText); + List pellets = ItemRTGPellet.pelletList; String[] pelletText = new String[pellets.size() + 1]; pelletText[0] = I18nUtil.resolveKey("desc.gui.rtg.pellets"); - + for(int i = 0; i < pellets.size(); i++) { ItemRTGPellet pellet = pellets.get(i); pelletText[i + 1] = I18nUtil.resolveKey("desc.gui.rtg.pelletPower", I18nUtil.resolveKey(pellet.getUnlocalizedName() + ".name"), pellet.getHeat() * 5); } - - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, pelletText); + + this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 12, guiTop + 25, 16, 16, guiLeft - 8, guiTop + 36 + 16, pelletText); } @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.rtg.hasCustomInventoryName() ? this.rtg.getInventoryName() : I18n.format(this.rtg.getInventoryName()); - - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + + this.fontRendererObj.drawString(name, 13 ,7, 10925486); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } - + @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - if(rtg.hasHeat()) - { - int i = rtg.getHeatScaled(52); - drawTexturedModalRect(guiLeft + 134, guiTop + 69 - i, 176, 52 - i, 16, i); + if (rtg.hasHeat()) { + int i = rtg.getHeatScaled(51); // was 50 + drawTexturedModalRect(guiLeft + 124, guiTop + 61 - i, 176, 10 + (51 - i), 16, i); } - if(rtg.hasPower()) - { - int i = (int)rtg.getPowerScaled(52); - drawTexturedModalRect(guiLeft + 152, guiTop + 69 - i, 192, 52 - i, 16, i); + + if (rtg.hasPower()) { + int i = (int) rtg.getPowerScaled(51); // was 50 + drawTexturedModalRect(guiLeft + 146, guiTop + 61 - i, 192, 10 + (51 - i), 16, i); } - - this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); + + this.drawInfoPanel(guiLeft - 12, guiTop + 25, 16, 16, 2); } } diff --git a/src/main/resources/assets/hbm/textures/gui/gui_rtg.png b/src/main/resources/assets/hbm/textures/gui/gui_rtg.png index 308cd12a6..ce99dbca6 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_rtg.png and b/src/main/resources/assets/hbm/textures/gui/gui_rtg.png differ