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.0a0.tar.gz
(42.9 kB
view hashes)
Built Distribution
Close
Hashes for minebannerlib-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc0da38ed9b784157246c20aaee3f7975b61ab1cf5d9b4056352fe9f32667bc6 |
|
MD5 | aca42881468499b522151d5a4e2aa741 |
|
BLAKE2b-256 | 10c286387a3eb6a08f303905ae0eaca6d980b2892011daea42493d886a7a4466 |