assemblyline/src/main/java/assemblyline/client/gui/GuiAutoCrafting.java
2023-02-10 17:51:10 +01:00

45 lines
1.6 KiB
Java

package assemblyline.client.gui;
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.inventory.Container;
import net.minecraft.inventory.ContainerWorkbench;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
@SideOnly(value = Side.CLIENT)
public class GuiAutoCrafting extends GuiContainer {
public GuiAutoCrafting(
InventoryPlayer par1InventoryPlayer, World par2World, int par3, int par4, int par5
) {
super((Container
) new ContainerWorkbench(par1InventoryPlayer, par2World, par3, par4, par5));
}
protected void drawGuiContainerForegroundLayer() {
this.fontRendererObj.drawString(
StatCollector.translateToLocal((String) "AutoCrafter"), 28, 6, 0x404040
);
this.fontRendererObj.drawString(
StatCollector.translateToLocal((String) "container.inventory"),
8,
this.ySize - 96 + 2,
0x404040
);
}
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
this.mc.renderEngine.getTexture(
new ResourceLocation("assemblyline", "textures/gui/gui_crafting.png")
);
GL11.glColor4f((float) 1.0f, (float) 1.0f, (float) 1.0f, (float) 1.0f);
int var5 = (this.width - this.xSize) / 2;
int var6 = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
}
}