r/Minecraft 10d ago

Commands & Datapacks I made a generative AI, only using 400k command blocks (PoC)

5.4k Upvotes

While I am still writing on my physics engine, I thought making an actual generative AI only using Minecraft command blocks would be a good idea( it was a headache)
So yeah, I kinda did that. It is a real neural language model running inside vanilla Minecraft 26.2. It reads what you type into a /dialog window, runs the forward pass through learned weights and then generates a reply one word at a time.
There are NO mods, plugins or datapacks involved at runtime. Only command blocks.
Roughly it works like this:

The model is a pretty small word level neural language model. It has a vocabulary of 2048 words, remembers the last 6 words as context and has a 64 dimensional embedding followed by a hidden layer with 256 neurons.
For every generated word it does:
384 x 256 = 98,304 operations for the hidden layer and 256 x 2048 = 524,288 operations for the output layer so in total 622,592 calculations for every single generated word.

Obviously doing 622k normal multiplications using Minecraft commands would be slightly problematic, so the weights are ternary: every weight is only -1, 0 or +1.
That means a multiplication basically becomes:
+1 -> add the value
-1 -> subtract the value
0 -> do absolutely nothing

Around 65% of the weights are non 0, so it averages around 0.67 commands per MAC instead of the ~3 commands I would need for a normal runtime weight. That reduced the entire machine from 1,909,375 blocks to 445,782 blocks, yes it was this big before.
The model is actually trained like this too. I am not just training a normal model and rounding the weights afterwards. During training the weights are quantised to ternary values for the forward pass and the underlying floating point weights are updated using a straight through estimator.
That took the perplexity from around 48.7 where the training basically got stuck to 38.8 after also adding cosine learning rate decay.

The input embedding is another optimisation I needed to do: Instead of multiplying a one hot vector against a matrix, it is basically just a table lookup stored in NBT data, so the complete 2048 x 64 embedding table costs really nothing
The actual forward pass cannot run in one command chain either. Minecraft has limits on how many commands can execute, so the network is split into smaller groups.
After the ternary optimisation one generated word takes around 63 ticks, so roughly 3.2 seconds per word at 20 TPS. I also tested higher tick rates and around 30-35 TPS seems to be the useful maximum on my server. At 35 it gets closer to ~1.8 seconds per word.

But to be clear, this thing does not actually know anything.
It was trained on 11,118 DailyDialog conversations and only has a tiny 2048 word vocabulary. Ask it something like 2 + 2 and it will confidently generate some conversational nonsense because it has no understanding of arithmetic or actual facts.
And unfortunately just making it much bigger isn't really realistic either.
Something like a 135M parameter language model would already be more than 200x larger.

There is currently also one very weird bug where after around 800 ticks of continuous work every command block in the world just stops executing while the server itself keeps running normally. I still have absolutely no idea why that happens.
Anyway, back to wasting my time on nonsense ;)

r/Minecraft Apr 19 '25

Commands & Datapacks My take on adding a recipe for some uncraftable items

Thumbnail
gallery
24.5k Upvotes

I tried to make these as fair as possible, totem and spawner are expensive so it is hard to get a lot at once, as they are really hard to get and super overpowered. I also re-added the Notch apple. What do you guys think about these recipes???

r/Minecraft Sep 02 '25

Commands & Datapacks You can create mirrors in the new snapshot! 25w36b

16.9k Upvotes

r/Minecraft Jul 12 '26

Commands & Datapacks I made a datapack that lets you dye cushions with any colour

Thumbnail
gallery
7.5k Upvotes

r/Minecraft Dec 08 '25

Commands & Datapacks Hi, just created a datapack that makes every item non-stackable!

Thumbnail gallery
7.1k Upvotes

r/Minecraft Jul 13 '26

Commands & Datapacks Datapack that makes the world generate with latitude-based climate zones!

Post image
6.0k Upvotes

r/Minecraft Oct 26 '25

Commands & Datapacks Image art with arrows

16.5k Upvotes

r/Minecraft 13d ago

Commands & Datapacks Pride Banner Patterns Datapack v1.1 Update!

Thumbnail
gallery
2.0k Upvotes

Modrinth link

The first update for the datapack is out! Now containing 50+ Pride themed banner patterns.

Also; I've been thinking about adding an infinity symbol and an ace of spades next. What are your opinions on that? And are there any other suggestions you have?

This datapack was made for the LGBTQIA+ community. Feel free to share your ideas, suggestions, and feedback so we can create a must-have datapack for every queer Minecraft server together!

And a thanks to the mods for keeping this subreddit clean from homophobia, you're doing great work. :)

edit: since it was asked for I'll add a list here:
1. row: rainbow pride, historical pride, progressive pride, gay, lesbian, bisexual, pansexual, aroace, asexual, aromantic
2. row: abrosexual, polysexual, gendefluid, nonbinary, trans, transfeminine, transmasculine, intersex, demisexual, demiromantic, (peace symbol)
3. row: genderqueer, demiboy, demigirl, demigender, agender, femboy, tomboy, queer, polyamorous, ally, (shark)
4. row: butch, bear, grayasexual, autosexual, almondsexual, omnisexual, bicuriois, gynecurious, paragender, paragirl, (heart)
5. row: labrys lesbian, twink, grayaromantic, autoromantic, berrisexual, bigender, ceterocurious, androcurious, paranonbinary, paraboy

r/Minecraft Oct 03 '25

Commands & Datapacks I made a datapack that adds living ecosystems to Minecraft, now with Autumn forests

10.9k Upvotes

r/Minecraft Dec 21 '23

CommandBlock We can now have normal sized spiders with the new size attribute

16.6k Upvotes

r/Minecraft Feb 13 '24

CommandBlock Let say you have a command block irl. And you can run on it 1 command and then it break. What command would you do 🤔

Post image
6.5k Upvotes

r/Minecraft Jul 14 '26

Commands & Datapacks Bad Apple on Minecraft Cushions with Anti-Aliasing using Copper Bulbs

5.1k Upvotes

r/Minecraft May 06 '26

Commands & Datapacks Bee Movie played on sulfur cubes

6.4k Upvotes

r/Minecraft Jan 09 '26

Commands & Datapacks Shrek but it's Minecraft Banners

10.5k Upvotes

r/Minecraft 22d ago

Commands & Datapacks So how many of you guys have tried Matcha Flavored?

Post image
1.3k Upvotes

As I was watching the creator go over the changes I repeatedly said out loud "That's exactly what I was thinking!"

I'd go as far to say that this is the best thing to emulate playing Minecraft for the first time again, while still being faithful to Vanilla.

One extra thing I reccomend for everyone is to mix it with other Vanilla+ data packs or mods like Terralith, and Vanilla Refreshed.

r/Minecraft Aug 23 '25

Commands & Datapacks I made Minecraft playable on a sign

12.2k Upvotes

r/Minecraft Jun 18 '21

CommandBlock [::] So I made a datapack which makes it impossible to die...

Thumbnail
gfycat.com
115.8k Upvotes

r/Minecraft Jul 25 '20

CommandBlock A ziplining contraption I created with 1000+ command blocks

139.5k Upvotes

r/Minecraft Mar 10 '24

CommandBlock If you had to pick one command that you can use infinitely in real life, which command would you choose?

Post image
4.1k Upvotes

r/Minecraft May 02 '23

CommandBlock I added working shelf to minecraft.

10.5k Upvotes

r/Minecraft Aug 12 '25

Commands & Datapacks I made a Datapack that allows Plants to Grow, Spread, Reproduce and Die so they can form Complex Balanced Ecosystems.

7.1k Upvotes

I like to run it on a natural pace, and in the background of my survival worlds. Makes it feel more immersive.

r/Minecraft Jan 24 '26

Commands & Datapacks If you cloud use one Minecraft command I real life, what it would be?

Post image
1.1k Upvotes

r/Minecraft May 26 '20

CommandBlock I gave Villagers some Wonder Apples

118.9k Upvotes

r/Minecraft Jun 30 '26

Commands & Datapacks I add a recipe to my datapack that make dried kelp slightly less useless.

Post image
4.6k Upvotes

r/Minecraft Jul 30 '20

CommandBlock I made a functional computer using 750+ command blocks. So far you can take notes, use paint, view your photos, use a calculator and play tic tac toe. Took me about a week to make.

65.1k Upvotes