2013-01-28 21:52:28 +01:00
|
|
|
package com.pahimar.ee3.inventory;
|
|
|
|
|
|
|
|
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
|
|
|
|
2013-05-20 06:19:26 +02:00
|
|
|
import com.pahimar.ee3.core.util.NBTHelper;
|
2013-03-08 19:40:59 +01:00
|
|
|
import com.pahimar.ee3.lib.Strings;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Equivalent-Exchange-3
|
|
|
|
*
|
|
|
|
* ContainerPortableTransmutation
|
|
|
|
*
|
|
|
|
* @author pahimar
|
|
|
|
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
|
|
|
*
|
|
|
|
*/
|
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
|
|
|
}
|