minebannerlib

Lib for create minecraft banner image


Keywords
minecraft, banner, python, pil, minecraft-banner, pip, python-library
License
MIT
Install
pip install minebannerlib==0.1.0

Documentation

MineBannerLib

Python library for drawing banners.

How it works?

Draws a banner image from the received nbts. The flag will be saved to the buildbanner root folder.

Installation

pip install minebannerlib

or

python -m pip install minebannerlib

Create a banner

To do this, call the create_banner() function, to which you need to pass the NBTS, name of the flag and the base color

Example create banner from nbts

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 can create banner from list

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()