What happened to Buddhism in Indonesia?

In writing this, I am restricting myself to describing the religious situation in Java. I also want to make note that the religious practice during medieval Indonesia is called Hindu-Buddhism. The term 'Buddhism' alone is very rarely mentioned in medieval Indonesian historiography without being accompanied by the preceding 'Hindu'.

There is a bit of a poem from a text composed by a Majapahit scribe which reads:

It is said that Buddha and Siva are different in form

They are indeed different but how do we know their difference in appearance

The teachings Buddha and Siva taught are different too

They are indeed different but they are in essence one, (but) there is no mixture of dharma

~ Kakawin Sutasoma, Mpu Tantular

Pure Buddhism and pure Hinduism are not the case of Majapahit’s religious tradition, as there is no pure Islam in Demak’s, Mataram’s, Yogyakarta’s and Surakarta’s religious traditions. The religions coming from the foreign lands met local traditions, doctrine and theology accommodate local cultures leading to a unique blending. The tradition of syncretism was definitely present not only in and after the period PangeranDipanagara wrote about, it also went even further back.

Here's another example of the blending of religious themes from the same poem:

Not long after that Kala becomes

Hyang Puspati due to its successful deep contemplation (topadhara)

King Ratnakanda becomes a guardian of Buddha in Jinalaya

He is no longer rakshasa (evil giant) in appearance, as a result of Bhatara Buddha’s blessing

So that he is so devoted to him and in the service of Bhatara Gotama.

The conversion of an enemy into a friend and disciple is also a common motif found in the later Javanese Islamic narratives. Centuries later, there exist a similar legend told about Sunan Bonang and Kalijaga, who are two of the nine Javanese saints credited for bringing Islam to the island.

Sunan Kalijaga is said to have been a famous leader of gang of robbers in a forest between Demak and Pati, Central Java. Sunan Bonang walked through the forest and met Sahid and his gang who had intention to take Sunan Bonang’s possession. But Raden Sahid failed to do so, as Bonang showed his miracle turning some fruits of palm tree into gold. Raden Sahid repented from his sinful deed and became an important Islamic leader and saint, venerated throughout Java to this day.

We as modern people tend to have this desire to categorize every single belief systems and brand them as exclusie to each other. Yet, there is a lot of evidence that the Javanese of olden times lacked this desire. An excerpt from another Majapahit-era text written to legitimize the contemporary ruler:

O my praise and worship from a humble man to the feet of the Protector of the universe Siva-Buddha Janma-Bhatara who is always tranquil in contemplation Sri Prawatanata, Protector of the poor, king of kings in the world Dewa-Bhatara, imaginary above imagination, but is present on earth

~Negara Kretagama, Mpu Prapanca

/r/AskHistorians Thread