Closes #402,#404,406
This commit is contained in:
parent
96464980c2
commit
8fba82312c
16 changed files with 149 additions and 163 deletions
|
@ -1,7 +1,5 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
@ -19,6 +17,8 @@ import techreborn.init.ModBlocks;
|
|||
import techreborn.proxies.ClientProxy;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GuiBlastFurnace extends GuiContainer
|
||||
{
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class GuiBlastFurnace extends GuiContainer
|
|||
TileBlastFurnace blastfurnace;
|
||||
|
||||
ContainerBlastFurnace containerBlastFurnace;
|
||||
|
||||
boolean hasMultiBlock;
|
||||
public GuiBlastFurnace(EntityPlayer player, TileBlastFurnace tileblastfurnace)
|
||||
{
|
||||
super(new ContainerBlastFurnace(tileblastfurnace, player));
|
||||
|
@ -41,6 +41,8 @@ public class GuiBlastFurnace extends GuiContainer
|
|||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
|
||||
hasMultiBlock = containerBlastFurnace.heat != 0;
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
GuiButton button = new GuiButton(212, k + 4, l + 6, 20, 20, "");
|
||||
|
@ -69,7 +71,7 @@ public class GuiBlastFurnace extends GuiContainer
|
|||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
if (containerBlastFurnace.heat == 0)
|
||||
if (hasMultiBlock)
|
||||
{
|
||||
GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
|
||||
this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
|
||||
|
|
|
@ -17,6 +17,7 @@ public class GuiIndustrialGrinder extends GuiContainer
|
|||
TileIndustrialGrinder grinder;
|
||||
ContainerIndustrialGrinder containerGrinder;
|
||||
|
||||
boolean hasMultiBlock;
|
||||
public GuiIndustrialGrinder(EntityPlayer player, TileIndustrialGrinder tilegrinder)
|
||||
{
|
||||
super(new ContainerIndustrialGrinder(tilegrinder, player));
|
||||
|
@ -25,7 +26,12 @@ public class GuiIndustrialGrinder extends GuiContainer
|
|||
grinder = tilegrinder;
|
||||
containerGrinder = (ContainerIndustrialGrinder) this.inventorySlots;
|
||||
}
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
hasMultiBlock = containerGrinder.connectionStatus != 1;
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
|
@ -36,7 +42,12 @@ public class GuiIndustrialGrinder extends GuiContainer
|
|||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
|
||||
if (hasMultiBlock)
|
||||
{
|
||||
// GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
|
||||
this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
|
||||
l + 52 + 12 - j, -1);
|
||||
}
|
||||
j = grinder.getProgressScaled(24);
|
||||
if (j > 0)
|
||||
{
|
||||
|
@ -49,12 +60,7 @@ public class GuiIndustrialGrinder extends GuiContainer
|
|||
this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
|
||||
if (containerGrinder.connectionStatus != 1)
|
||||
{
|
||||
// GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
|
||||
this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
|
||||
l + 52 + 12 - j, -1);
|
||||
}
|
||||
|
||||
|
||||
// TODO 1.8 nope
|
||||
// if (grinder.tank.getFluidAmount() != 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue