Python library for drawing banners.
Draws a banner image from the received nbts. The flag will be saved to the buildbanner root folder.
pip install minebannerlib
or
python -m pip install minebannerlib
To do this, call the create_banner()
function, to which you need to pass the NBTS, name of the flag and the base color
from MineBannerLib import *
nbts = '{BlockEntityTag:{Patterns:[{Color:14,Pattern:"cre"},{Color:4,Pattern:"sku"}]}}'
color_base = 15
name = 'test'
def main():
create_banner(name, nbts, color_base)
if __name__ == '__main__':
main()
You must pass the second argument to create_banner()
a list containing elements of type Layer
, as in the example below
from MineBannerLib import *
parts = [Layer('mc', 2), Layer('hh', 1)]
color_base = 15
name = 'test'
def main():
create_banner(name, parts, color_base)
if __name__ == '__main__':
main()