litematica icon indicating copy to clipboard operation
litematica copied to clipboard

Automatically generate a schematic of redstone blocks from binary inpput in python

Open Computermann8086 opened this issue 2 years ago • 2 comments

I am building a restone computer and i was thinking of how would i automate the process of making programs and putting them into memory, and i thought that i could generate a schematic basen on a binary string input, and then that a python program would make 1s to a redstone block and 0s to air and put it into a litematica schematic.

Can anyone help me with this? I do not know how the mod reads the binary frome the .litematica files, and how to make this in python. Would like some information on the strucure of the .litematica files and some additional help.

Computermann8086 avatar Jul 13 '23 20:07 Computermann8086

See https://pypi.org/project/litemapy/ for a python library for handling Litematica's schematic format. Issue #53 explains the schematic (block) format if you need it (you shouldn't need to touch it directly if you use a library for handling the file format).

Basically the schematics are gzip-compressed NBT data, so you can look at them with any NBT editor like NBTExplorer.

maruohon avatar Jul 13 '23 20:07 maruohon

I'm pretty sure there's a litematica python lib Made by Sloimay I think?

Pietagorh avatar Jul 13 '23 20:07 Pietagorh