Started on Grinder will finish when I get back
This commit is contained in:
parent
7c1e72076b
commit
1238f2d5a6
3 changed files with 64 additions and 6 deletions
|
@ -1,13 +1,52 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import techreborn.client.SlotOutput;
|
||||
import techreborn.tiles.TileGrinder;
|
||||
import techreborn.tiles.TileMatterFabricator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
public class ContainerGrinder extends TechRebornContainer{
|
||||
|
||||
EntityPlayer player;
|
||||
|
||||
public ContainerGrinder(TileGrinder tileEntity, EntityPlayer player)
|
||||
TileGrinder tile;
|
||||
|
||||
public int tickTime;
|
||||
|
||||
public ContainerGrinder(TileGrinder tileGrinder,
|
||||
EntityPlayer player)
|
||||
{
|
||||
// TODO Auto-generated constructor stub
|
||||
tile = tileGrinder;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 33, 17));
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 1, 33, 35));
|
||||
|
||||
|
||||
// outputs
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 2, 51, 17));
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 3, 51, 17));
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 4, 51, 35));
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 5, 51, 53));
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||
+ 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,16 +5,24 @@ import techreborn.client.container.ContainerGrinder;
|
|||
import techreborn.tiles.TileAlloySmelter;
|
||||
import techreborn.tiles.TileGrinder;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GuiGrinder extends GuiContainer{
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/industrial_grinder.png");
|
||||
|
||||
TileGrinder tilegrinder;
|
||||
TileGrinder grinder;
|
||||
|
||||
public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder)
|
||||
{
|
||||
super(new ContainerGrinder(tilegrinder, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
grinder = tilegrinder;
|
||||
|
||||
}
|
||||
|
||||
|
@ -22,8 +30,19 @@ public class GuiGrinder extends GuiContainer{
|
|||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
this.fontRendererObj.drawString("Industrial Grinder", 60, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public class TileGrinder extends TileMachineBase implements IWrenchable{
|
|||
|
||||
public int tickTime;
|
||||
public BasicSink energy;
|
||||
public Inventory inventory = new Inventory(5, "TileGrinder", 64);
|
||||
public Inventory inventory = new Inventory(6, "TileGrinder", 64);
|
||||
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue