| .. | ||
| data | ||
| scripts | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
@blockmatic/generator
Collection of Node.JS scripts to generate data for blockmatic. See below to see how to use these scripts (they are also in order of use). A bit of knowledge of blockmatic is needed to put the files into the correct locations.
Before running any of these scripts you need to have a blocks directory with Minecraft textures in them. See below on how to do that.
- Create a
blocksdirectory in the same folder where this README file is - Open a Minecraft client jar in a zip extraction program (such as 7zip, WinRAR, Xarchiver, etc.)
- Go to
assets/minecraft/textures/blocks - Copy all textures into the
blocksdirectory
filter.js
Deletes every unneeded texture in the
blocksdirectory
- Run
node scripts/filter.js - Every unneeded texture has been deleted
fix.js
Rotates glazed_terracotta textures and resizes image files bigger than 16x16 (these files are usually for animations such as fire)
- Run
node scripts/fix.js - Every file has been fixed accordingly
data.js
Important
Outdated
Generates average colors, versions, names, ids, properties for blocks (NEEDS MANUAL EDITING AFTER!)
- Change the version in
scripts/data.js - Run
node scripts/data.js - In the
datadirectory there should be a JSON file generated - Put that JSON file into
src/data
spritesheet.js
Generates a spritesheet for Pixi.JS to use
- Run
node scripts/spritesheet.js - In the
datadirectory there should be two files generated -spritesheet.jsonandspritesheet.png - Put
spritesheet.pnginto thepublicfolder - Put
spritesheet.jsonintosrc/data
deleteBlocks.sh
(MacOS and Linux only) Deletes every file in the
blocksfolder
You probably don't need to run this script.
$ chmod +x ./scripts/deleteBlocks.sh
$ ./scripts/deleteBlocks.sh