this post was submitted on 24 Jul 2026
25 points (90.3% liked)

Programming

27880 readers
439 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] TehPers@beehaw.org 5 points 4 days ago

A byte can hold one of 256 values (0โ€“255), and luckily there are way more than 256 blocks in Minecraft, so I can hand every single byte its own block.

This was not always the case. It is now since they moved (many years ago) to their new ID format, but at one point there were less than 256 blocks, and items would start at ID 256 (Iron Shovel). Not super relevant today of course, but just a fun bit of history.

Anyway, two other things come to mind:

  1. You could encode files directly into NBT data for an item or entity. You might need to split files across multiple tags though. It'd be funny to see armor stands representing files on disk, for example.
  2. You don't need to map bytes 1:1 to blocks. It's possible to have a palette of more than 256 blocks, and encode the data in a different base, like say base 300 or so, to make the encoded data more (spatially) compact.

Cool project. It's a fun idea.