Fix Research Station GUI/Container for BigBadChris' new epic texture
This commit is contained in:
parent
5cb00bf3d4
commit
d656bc6dcd
|
@ -1,14 +1,12 @@
|
|||
package com.pahimar.ee3.client.gui.inventory;
|
||||
|
||||
import com.pahimar.ee3.inventory.ContainerResearchStation;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import com.pahimar.ee3.tileentity.TileEntityResearchStation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -19,18 +17,11 @@ public class GuiResearchStation extends GuiContainer
|
|||
public GuiResearchStation(InventoryPlayer inventoryPlayer, TileEntityResearchStation tileEntityResearchStation)
|
||||
{
|
||||
super(new ContainerResearchStation(inventoryPlayer, tileEntityResearchStation));
|
||||
ySize = 176;
|
||||
xSize = 256;
|
||||
ySize = 234;
|
||||
this.tileEntityResearchStation = tileEntityResearchStation;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
String containerName = StatCollector.translateToLocal(tileEntityResearchStation.getInventoryName());
|
||||
fontRendererObj.drawString(containerName, xSize / 2 - fontRendererObj.getStringWidth(containerName) / 2, 6, 4210752);
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal(Names.Containers.VANILLA_INVENTORY), 8, ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float opacity, int x, int y)
|
||||
{
|
||||
|
@ -42,7 +33,7 @@ public class GuiResearchStation extends GuiContainer
|
|||
int yStart = (height - ySize) / 2;
|
||||
this.drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);
|
||||
|
||||
int scaleAdjustment = this.tileEntityResearchStation.getLearnProgressScaled(57);
|
||||
this.drawTexturedModalRect(xStart + 60, yStart + 41, 176, 0, scaleAdjustment, 16);
|
||||
int scaleAdjustment = this.tileEntityResearchStation.getLearnProgressScaled(42);
|
||||
this.drawTexturedModalRect(xStart + 107, yStart + 87, 0, 236, scaleAdjustment, 16);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class ContainerResearchStation extends ContainerEE
|
|||
{
|
||||
this.tileEntityResearchStation = tileEntityResearchStation;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileEntityResearchStation, TileEntityResearchStation.ITEM_SLOT_INVENTORY_INDEX, 35, 41)
|
||||
this.addSlotToContainer(new Slot(tileEntityResearchStation, TileEntityResearchStation.ITEM_SLOT_INVENTORY_INDEX, 79, 83)
|
||||
{
|
||||
@Override
|
||||
public int getSlotStackLimit()
|
||||
|
@ -27,7 +27,7 @@ public class ContainerResearchStation extends ContainerEE
|
|||
return 1;
|
||||
}
|
||||
});
|
||||
this.addSlotToContainer(new Slot(tileEntityResearchStation, TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX, 125, 41)
|
||||
this.addSlotToContainer(new Slot(tileEntityResearchStation, TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX, 161, 83)
|
||||
{
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack itemStack)
|
||||
|
@ -46,14 +46,14 @@ public class ContainerResearchStation extends ContainerEE
|
|||
{
|
||||
for (int inventoryColumnIndex = 0; inventoryColumnIndex < PLAYER_INVENTORY_COLUMNS; ++inventoryColumnIndex)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryPlayer, inventoryColumnIndex + inventoryRowIndex * 9 + 9, 8 + inventoryColumnIndex * 18, 94 + inventoryRowIndex * 18));
|
||||
this.addSlotToContainer(new Slot(inventoryPlayer, inventoryColumnIndex + inventoryRowIndex * 9 + 9, 50 + inventoryColumnIndex * 18, 152 + inventoryRowIndex * 18));
|
||||
}
|
||||
}
|
||||
|
||||
// Add the player's action bar slots to the container
|
||||
for (int actionBarSlotIndex = 0; actionBarSlotIndex < PLAYER_INVENTORY_COLUMNS; ++actionBarSlotIndex)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryPlayer, actionBarSlotIndex, 8 + actionBarSlotIndex * 18, 152));
|
||||
this.addSlotToContainer(new Slot(inventoryPlayer, actionBarSlotIndex, 50 + actionBarSlotIndex * 18, 210));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue