Thanks to visit codestin.com
Credit goes to github.com

Skip to content
forked from vladdeSV/maestro

Converts a .nbs file to a .schem file. Specific to a type of 20Hz redstone music machine.

Notifications You must be signed in to change notification settings

Bentroen/maestro

 
 

Repository files navigation

.nbs to .schem converter

converts a single .nbs file into a WorldEdit schematic specifically used for a custom built Minecraft music machine which runs at 20gt per second

pre-everything

download this repository, then cd into it and install all dependencies:

bun install

convert a file

run with

bun run index.ts -v 'Turkish March.nbs' output.schem
  • index.ts is the main file
  • -v is for verbose output, which I use to just see what is going on
  • output.schem is an optional filename; if omitted, the output file will just be the input file name but with an .nbs extension

then move the output file into the WorldEdit schematics folder

configurable variables (and other things)

there are some custom variables that can be tweaked, but they are variables in code. they are found in source/schematic/constants.ts.

  • WALL_DISTANCE distance in blocks from center to each directional wall. should be >128 for full-scale builds, but currently a low value for debugging
  • VERTICAL_SPACING amount of spacing between each vertical row of chests
  • GLOBAL_Y_OFFSET global y-coordinate offset for all blocks, useful for adjusting entire schematic y-position

layouts

the code currently stores the layout of the chests in source/schematic/layout.ts. do not include trailing commas on any line.

the layout uses a format like this: every "wall" has 5 associated instruments: three main instruments, and two "halves" of percussion instruments; every instrument has 25 different available notes, 0-24.

an instrument+note position is noted like this: A05, C12, D24. the letters A, B, and C are used for the main instruments, and D and E are used for the percussions. the code expects 25 of A, B, and C each, but only that D+E add up to 25. in total, 100 entries per layout.

to change what instrument is supposed to be in what direciton, please modify the variable directionSectionToInstrument in source/schematic/constants.ts

About

Converts a .nbs file to a .schem file. Specific to a type of 20Hz redstone music machine.

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • TypeScript 88.5%
  • CSS 7.2%
  • HTML 4.3%