2013-12-27 16:59:59 -06:00
|
|
|
package appeng.util.inv;
|
|
|
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
2014-05-03 19:21:33 -05:00
|
|
|
import appeng.api.storage.data.IAEItemStack;
|
|
|
|
import appeng.util.item.AEItemStack;
|
2013-12-27 16:59:59 -06:00
|
|
|
|
|
|
|
public class ItemSlot
|
|
|
|
{
|
|
|
|
|
|
|
|
public int slot;
|
2014-05-03 19:21:33 -05:00
|
|
|
|
|
|
|
// one or the other..
|
|
|
|
private IAEItemStack aeitemstack;
|
|
|
|
private ItemStack itemStack;
|
|
|
|
|
2014-08-11 22:56:33 -05:00
|
|
|
public boolean isExtractable;
|
|
|
|
|
2014-05-03 19:21:33 -05:00
|
|
|
public void setItemStack(ItemStack is)
|
|
|
|
{
|
|
|
|
aeitemstack = null;
|
|
|
|
itemStack = is;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAEItemStack(IAEItemStack is)
|
|
|
|
{
|
|
|
|
aeitemstack = is;
|
|
|
|
itemStack = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack getItemStack()
|
|
|
|
{
|
|
|
|
return itemStack == null ? (aeitemstack == null ? null : (itemStack = aeitemstack.getItemStack())) : itemStack;
|
|
|
|
}
|
|
|
|
|
|
|
|
public IAEItemStack getAEItemStack()
|
|
|
|
{
|
|
|
|
return aeitemstack == null ? (itemStack == null ? null : (aeitemstack = AEItemStack.create( itemStack ))) : aeitemstack;
|
|
|
|
}
|
2013-12-27 16:59:59 -06:00
|
|
|
|
|
|
|
}
|