Special Handlers are now properly wrapped in IMEMonitors for Storage Bus to function properly.

This commit is contained in:
AlgorithmX2
2014-05-03 19:21:33 -05:00
parent 21e40a5fb3
commit e1c6b18399
11 changed files with 234 additions and 22 deletions
+28 -1
View File
@@ -1,11 +1,38 @@
package appeng.util.inv;
import net.minecraft.item.ItemStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.util.item.AEItemStack;
public class ItemSlot
{
public int slot;
public ItemStack itemStack;
// 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;
}
}