2013-01-28 21:52:28 +01:00
|
|
|
package com.pahimar.ee3.inventory;
|
|
|
|
|
2013-01-30 04:15:59 +01:00
|
|
|
import com.pahimar.ee3.core.helper.NBTHelper;
|
|
|
|
import com.pahimar.ee3.lib.Strings;
|
|
|
|
|
2013-01-28 21:52:28 +01:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2013-01-30 04:15:59 +01:00
|
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
2013-01-28 21:52:28 +01:00
|
|
|
import net.minecraft.inventory.Container;
|
2013-01-30 04:15:59 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
2013-01-28 21:52:28 +01:00
|
|
|
|
|
|
|
public class ContainerPortableTransmutation extends Container {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canInteractWith(EntityPlayer var1) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-01-30 04:15:59 +01:00
|
|
|
@Override
|
|
|
|
public void onCraftGuiClosed(EntityPlayer player) {
|
|
|
|
|
|
|
|
super.onCraftGuiClosed(player);
|
|
|
|
|
|
|
|
if (!player.worldObj.isRemote) {
|
|
|
|
InventoryPlayer invPlayer = player.inventory;
|
|
|
|
for (ItemStack itemStack : invPlayer.mainInventory) {
|
|
|
|
if (itemStack != null) {
|
|
|
|
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN)) {
|
|
|
|
NBTHelper.removeTag(itemStack, Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-01-28 21:52:28 +01:00
|
|
|
}
|