sentence: based on the terms of the agreement , the eastern half of the sultanate of mataram in central java was given to pakubuwono iii with surakarta as its capital , while the western half was given to prince mangkubumi with its capital in yogyakarta .