Minecraft rewritten for better performance with platform interoperability in mind and so on. Essentially what could’ve or should’ve been a replacement to Minecraft if done right. It was not done right. Quite the opposite.
In a world with consoles. Java needs a JVM, and those aren’t typical with things like the Switch (2 soon), PS5, and Xbox Series (half the alphabet).
C++ is generally more performant than Java.
https://programming-language-benchmarks.vercel.app/java-vs-cpp
What’s that got to do with making things cross platform? Java programs only need to run in a Java runtime environment of which there’s one for basically everything. If you make something that runs in a JRE, it’ll be able to run on any device with a JRE that’s up to date for it.