Lib for create minecraft banner image
Project description
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
import MineBannerLib
mbl = CreateBanner
nbts = '{BlockEntityTag:{Patterns:[{Color:14,Pattern:"cre"},{Color:4,Pattern:"sku"}]}}'
color_base = 15
name = 'test'
def main():
mbl.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
import MineBannerLib
from CreateBanner import Layer
banner = CreateBanner
parts = [Layer('mc', 2), Layer('hh', 1)]
color_base = 15
name = 'test'
def main():
banner.create_banner(name, parts, color_base)
if __name__ == '__main__':
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
minebannerlib-0.1.0a4.tar.gz
(42.3 kB
view hashes)
Built Distribution
Close
Hashes for minebannerlib-0.1.0a4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b68ef559ba1866d3beeb2ee7c8064e4ac4b860d60b476803eef7681dc5ed9db |
|
MD5 | a557b31f4541fd20b39c1d719b3a1a78 |
|
BLAKE2b-256 | 89fdaba9efa2ad67517cdc4f509bd71ee84eaa2f2cbdcef2f350f027f511e0cd |