New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mcbanners

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcbanners

Exports the types for Minecraft banners and utilities for rendering them

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

mcbanners

Exports the types for Minecraft banners and utilities for rendering them

Usage

Rendering

import {
  Banner,
  DyeColor,
  Pattern,
  renderBannerTexture,
  renderBannerFace,
} from "mcbanners";

const banner = new Banner(DyeColor.WHITE)
  .add(Pattern.GLOBE, DyeColor.BLUE)
  .add(Pattern.CURLY_BORDER, DyeColor.BLACK)
  .add(Pattern.BRICKS, DyeColor.LIGHT_BLUE)
  .add(Pattern.GRADIENT_UP, DyeColor.GREEN)
  .add(Pattern.GRADIENT, DyeColor.LIME)
  .add(Pattern.CREEPER, DyeColor.BLACK);

const textureBuf = await renderBannerTexture(banner);
const faceBuf = await renderBannerFace(banner, 5);

await fs.writeFile("./texture.png", textureBuf);
await fs.writeFile("./face.png", faceBuf);

Storing

const str = banner.toString(); // "L:cs-R:bo-L:hh-L:ms-P:cre-BL:cbo-L"
const b = Banner.fromString(str); // b == banner

Keywords

minecraft

FAQs

Package last updated on 15 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts