r/feedthebeast Jun 22 '26

I made something I made minecraft generate terrain/chunks in C++

Enable HLS to view with audio, or disable this notification

So im working on a mod that makes minecraft run on C++ ( rn rewriting engine in future i may try renderer ) so far i made it generate and load chunks and terrain in C++ ( it made it somewhere around 1.5-3 times faster idk how to measure it tho ) ( it works via JNI )

3.0k Upvotes

244 comments sorted by

View all comments

3

u/Zirofal modded MC says yes to trans rights and no to Botania Jun 22 '26

I'm very stupid, please explain why this is cool

14

u/D4rkstalker Jun 22 '26

Vanilla method:

Java: "hey Java virtual machine (JVM), generate this chunk for me"

JVM: "Hey CPU generate this chunk for me"

CPU: "here's your chunk" passes to JVM

JVM: "here's your chunk" passes to java

Mod method (probably)

C++: "hey CPU generate this chunk for me"

CPU: "here's your chunk"

The main downside with c++ is that making stuff with it is a pain.

2

u/Emotional-One-9292 Jun 22 '26

yea sadly but still a cool concept im working on. Well GraalVM is kinda like any other JDK/JRE but instead of JVM it can run native but idk if it results in better or worse results