maruohon / litematica

A modern client-side schematic mod for Minecraft
GNU Lesser General Public License v3.0
689 stars 191 forks source link

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

Open Computermann8086 opened 11 months ago

Computermann8086 commented 11 months ago

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.

maruohon commented 11 months ago

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.

Pietagorh commented 11 months ago

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