equivalent-exchange-3/common/com/pahimar/ee3/inventory/ContainerPortableTransmutation.java
pahimar 16f8c09e32 Bump Forge version for the build script, break out the NBTHelpers to
their own helper.nbt package (because the classes are getting messy),
and starting work on cleaning up said classes
2013-10-29 15:49:16 -04:00

45 lines
1.3 KiB
Java

package com.pahimar.ee3.inventory;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import com.pahimar.ee3.core.helper.nbt.GeneralNBTHelper;
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)
*
*/
public class ContainerPortableTransmutation extends Container {
@Override
public boolean canInteractWith(EntityPlayer var1) {
// TODO Auto-generated method stub
return false;
}
@Override
public void onContainerClosed(EntityPlayer player) {
super.onContainerClosed(player);
if (!player.worldObj.isRemote) {
InventoryPlayer invPlayer = player.inventory;
for (ItemStack itemStack : invPlayer.mainInventory) {
if (itemStack != null) {
if (GeneralNBTHelper.hasTag(itemStack, Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN)) {
GeneralNBTHelper.removeTag(itemStack, Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN);
}
}
}
}
}
}