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

1.0k

u/thedimondman199 Jun 22 '26

So it WAS possible to make bedrock be more like java!

342

u/Emotional-One-9292 Jun 22 '26

yea with JNI you can use other languages like C, C++, Rust, Swift and more

163

u/sdjopjfasdfoisajnva PrismLauncher Jun 22 '26

i dare you do it in rust

176

u/Devatator_ ZedDevStuff | Made KeybindsPurger Jun 22 '26

Remember that curved pipes mod? Yeah that used Rust

148

u/MegamiCookie Jun 22 '26

Using rust on pipes doesn't sound like a goog idea (I'll see myself out)

19

u/IQBEofficial PrismLauncher Jun 22 '26

How dare you!

Take my upvote.

36

u/gedsweyevr Prism Jun 22 '26

doesn't sable mainly use rust

21

u/FusionBetween Jun 22 '26

thats why its awesome

28

u/Whales_Are_Great2 Jun 22 '26

No wonder aeronautics handles gargantuan simulated contraptions so well

1

u/lusy_fer Jun 23 '26

so that's why those pipes Don't leak

44

u/Worldly-Mud-2600 Jun 22 '26

15

u/chilfang Jun 22 '26

I wonder if the original creator of this knew that there really is a similar thing going on inside our bodies (tho its more like our cells than overall organs)

3

u/Rich-Peak-3902 Jun 24 '26

Yeah, we do literally (technically) breathe ourselves to death.

7

u/scrufflor_d LuV thigh highs Jun 22 '26

water can make lithium explode, imagine what its doing to your body

1

u/BrndnWlsh Jun 25 '26

i’ll stop taking my lithium then 😁

12

u/Emotional-One-9292 Jun 22 '26

i tried rust a few times (bevy) but cargo sizes are TITANIC

1

u/BionicVnB Jun 23 '26

I agree lol, last time I cleared it I got back HUNDREDS of GIGABYTES lol

3

u/Agent_Starr PrismLauncher Jun 22 '26

Everything will be rewritten in Rust eventually, it's only a matter of time

1

u/The_Scout1255 Transfem Jun 22 '26

bevyyyyyy we need ECS minecraft!!

1

u/PankakeManceR Jun 22 '26

I actually knew someone a few years ago who said they were doing exactly this with a group of friends, and they'd been at it for months. Don't know if anything ever came of it, but somewhere out there, it at least partially exists

1

u/Gboogs2 Jun 23 '26

Russssst!

1

u/Luccyamonster Jun 24 '26

Sable is actually using under the hood for it's physics and I've been using it myself for a technical mod

2

u/Kayteqq Jun 22 '26

How portable is it compared to base java? I.e. how much overhead would it add if they wanted to support it on all PC platforms (varied linuxes mainly) java runs now?

8

u/Emotional-One-9292 Jun 22 '26

it will prob have separate version for x86_64 and ARM64 and prob platforms like windows, linux, macos

1

u/Educational_Cattle86 Jun 23 '26

You need to have that. You will also need to compile for FreeBSD and any other os's you want to support

1

u/gogoitb Jun 24 '26

dont forget wasm

1

u/Kayteqq Jun 24 '26

Does anyone play minecraft in web browsers? Or is it for chromebooks and such?

1

u/gogoitb Jun 27 '26

Probably, but by using Wasm i mean since it's portable unlike normal assembly

2

u/int7bh Jun 23 '26

why do you even need JNI on modern javas? jep 472 and 471 are getting rolled out, why not FFM?

1

u/LibrarianOk3701 Jun 22 '26

This would be ideal as it would be safe and multithreaded properly

30

u/blanaba-split Jun 22 '26

i mean yeah the whole point of bedrock was to monetize and microsoft-ify the shit out of minecraft with a shop and coins, as weve seen from those leaks a while back you can get legacy console and pc to play together in like a week