2013-08-23 16:59:50 +02:00
|
|
|
package com.pahimar.ee3.client.gui.inventory;
|
|
|
|
|
|
|
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
|
|
import net.minecraft.inventory.Container;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2013-09-07 04:47:12 +02:00
|
|
|
|
2013-08-23 16:59:50 +02:00
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
2013-10-29 20:49:16 +01:00
|
|
|
import com.pahimar.ee3.core.helper.nbt.GeneralNBTHelper;
|
2013-08-23 16:59:50 +02:00
|
|
|
import com.pahimar.ee3.lib.Strings;
|
|
|
|
import com.pahimar.ee3.lib.Textures;
|
|
|
|
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Equivalent-Exchange-3
|
|
|
|
*
|
|
|
|
* GuiPortableTransmutation
|
|
|
|
*
|
|
|
|
* @author pahimar
|
|
|
|
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public class GuiPortableTransmutation extends GuiContainer {
|
|
|
|
|
|
|
|
public GuiPortableTransmutation(Container par1Container) {
|
|
|
|
|
|
|
|
super(par1Container);
|
|
|
|
// TODO Auto-generated constructor stub
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
|
|
|
|
|
|
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
2013-09-04 03:33:10 +02:00
|
|
|
this.mc.getTextureManager().bindTexture(Textures.GUI_PORTABLE_TRANSMUTATION);
|
2013-08-23 16:59:50 +02:00
|
|
|
int var5 = (width - xSize) / 2;
|
|
|
|
int var6 = (height - ySize) / 2;
|
|
|
|
this.drawTexturedModalRect(var5, var6, 0, 0, xSize, ySize);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onGuiClosed() {
|
|
|
|
|
|
|
|
super.onGuiClosed();
|
|
|
|
|
|
|
|
if (mc.thePlayer != null) {
|
|
|
|
for (ItemStack itemStack : mc.thePlayer.inventory.mainInventory) {
|
|
|
|
if (itemStack != null) {
|
2013-10-29 20:49:16 +01:00
|
|
|
if (GeneralNBTHelper.hasTag(itemStack, Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN)) {
|
|
|
|
GeneralNBTHelper.removeTag(itemStack, Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN);
|
2013-08-23 16:59:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|