Creates a new action. The Inventory must be a container, see Inventory.isContainer. The slot can be -999 for outside of the gui