public static IInventory getInventory(IInventory inv, ForgeDirection side) {
if (inv == null)
return null;
if (inv instanceof ISpecialInventory)
inv = new SpecialInventoryMapper((ISpecialInventory) inv, side);
else if (inv instanceof ISidedInventory)
inv = new SidedInventoryMapper((ISidedInventory) inv, side);
return inv;
}