1.0.7 • Published 3 years ago

mcshading v1.0.7

Weekly downloads
73
License
MIT
Repository
-
Last release
3 years ago

mcshading

maven shading for datapacks and resource packs.

syncronously rewrites all references to one namespace to references to another in the contents of files and in their paths.

mcshading is pretty versitile, it can be run from the command line or from a javascript/typescript program and it can be used for more than just shading.

what mcshading does

here are some examples of how mcshading might change a datapack

# command: mcshading ./old ./new
# path:    ./old/functions/tick.mcfunction

advancement grant @a only old:very_old_advancement
kill @e[type=#old:very_old_type]

# path:    ./new/functions/tick.mcfunction

advancement grant @a only new:very_old_advancement
kill @e[type=#new:very_old_type]
# command: mcshading ./old ./new sub
# path:    ./old/functions/tick.mcfunction

advancement grant @a only old:very_old_advancement
kill @e[type=#old:very_old_type]

# path:    ./new/functions/sub/tick.mcfunction

advancement grant @a only new:sub/very_old_advancement
kill @e[type=#new:sub/very_old_type]

mcshading from the command line

install the module like this to use it in a global context

npm i -g mcshading

and then to use it as such

mcshading <source namespace> <destination namespace>

example:

mcshading datapack/data/foo other_datapack/data/bar bar_sub_folder/ foo_sub_folder/

(trailing slash is required!)

mcshading from javascript

install the module globally (recommended) or locally (no -g for locally)

npm i -g mcshading

and then use the module in one of two ways

const { shadeDatapack } = require('mcshading');
shadeDatapack('source', 'destination', 'more of the destination', 'more of the source');

// or

const mcshading = require('mcshading');
mcshading.shadeDatapack('source', 'destination', 'more of the destination', 'more of the source');

mcshading from typescript

install the module globally (recommended) or locally (no -g for locally)

npm i -g mcshading

and then use the module in one of two ways

import { shadeDatapack } from 'mcshading';
shadeDatapack('source', 'destination', 'more of the destination', 'more of the source');

// or

import * as mcshading from 'mcshading';
mcshading.shadeDatapack('source', 'destination', 'more of the destination', 'more of the source');
1.0.7

3 years ago

1.0.2

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago