2013-12-27 23:59:59 +01:00
|
|
|
package appeng.util.inv;
|
|
|
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
2014-05-04 02:21:33 +02:00
|
|
|
import appeng.api.storage.data.IAEItemStack;
|
|
|
|
import appeng.util.item.AEItemStack;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
public class ItemSlot
|
|
|
|
{
|
|
|
|
|
|
|
|
public int slot;
|
2014-05-04 02:21:33 +02:00
|
|
|
|
|
|
|
// one or the other..
|
|
|
|
private IAEItemStack aeitemstack;
|
|
|
|
private ItemStack itemStack;
|
|
|
|
|
|
|
|
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 23:59:59 +01:00
|
|
|
|
|
|
|
}
|