2016-06-07 23:17:06 +02:00
|
|
|
/*
|
|
|
|
* This file ("GuiFilter.java") is part of the Actually Additions mod for Minecraft.
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
|
|
|
* http://ellpeck.de/actaddlicense
|
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
|
|
|
* © 2015-2016 Ellpeck
|
|
|
|
*/
|
|
|
|
|
|
|
|
package de.ellpeck.actuallyadditions.mod.inventory.gui;
|
|
|
|
|
|
|
|
import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
2016-07-11 17:28:36 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
2016-06-07 23:17:06 +02:00
|
|
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
|
|
import net.minecraft.client.renderer.GlStateManager;
|
|
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public class GuiFilter extends GuiContainer{
|
|
|
|
|
|
|
|
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiFilter");
|
|
|
|
|
|
|
|
public GuiFilter(InventoryPlayer inventory){
|
|
|
|
super(new ContainerFilter(inventory));
|
|
|
|
this.xSize = 176;
|
|
|
|
this.ySize = 90+86;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void drawGuiContainerForegroundLayer(int x, int y){
|
2016-07-11 17:28:36 +02:00
|
|
|
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".filter.name"));
|
2016-06-07 23:17:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void drawGuiContainerBackgroundLayer(float f, int x, int y){
|
|
|
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
|
|
|
|
|
|
|
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
|
|
|
this.drawTexturedModalRect(this.guiLeft, this.guiTop+90, 0, 0, 176, 86);
|
|
|
|
|
|
|
|
this.mc.getTextureManager().bindTexture(RES_LOC);
|
|
|
|
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 90);
|
|
|
|
}
|
|
|
|
}
|