Skip to content

Class: BannerPatterns ​

Defined in: packages/minerender/src/assets/BannerPatterns.ts:31

Loads banner-pattern registry entries and resolves their banner or shield textures.

Constructors ​

Constructor ​

ts
new BannerPatterns(): BannerPatterns;

Returns ​

BannerPatterns

Methods ​

getColor() ​

ts
static getColor(color): number;

Defined in: packages/minerender/src/assets/BannerPatterns.ts:55

Parameters ​

ParameterType
colorunknown

Returns ​

number

Deprecated ​

Uses the fixed 1.21.11 palette. Use getColors for versioned colors.


getColors() ​

ts
static getColors(root?): Promise<Record<
  | "gray"
  | "red"
  | "green"
  | "blue"
  | "white"
  | "orange"
  | "magenta"
  | "light_blue"
  | "yellow"
  | "lime"
  | "pink"
  | "light_gray"
  | "cyan"
  | "purple"
  | "brown"
| "black", number>>;

Defined in: packages/minerender/src/assets/BannerPatterns.ts:49

Loads the selected version's texture dye colors as packed sRGB values.

Parameters ​

ParameterType
root?string

Returns ​

Promise<Record< | "gray" | "red" | "green" | "blue" | "white" | "orange" | "magenta" | "light_blue" | "yellow" | "lime" | "pink" | "light_gray" | "cyan" | "purple" | "brown" | "black", number>>


getLayers() ​

ts
static getLayers(
   value, 
   target, 
   root?
): Promise<BannerPatternDraw[]>;

Defined in: packages/minerender/src/assets/BannerPatterns.ts:61

Resolves the first 16 layers of a banner_patterns component, preserving their order.

Parameters ​

ParameterType
valueunknown
target"banner" | "shield"
root?string

Returns ​

Promise<BannerPatternDraw[]>


getList() ​

ts
static getList(namespace?, root?): Promise<string[]>;

Defined in: packages/minerender/src/assets/BannerPatterns.ts:34

Lists namespaced pattern IDs from the selected namespace's data directory.

Parameters ​

ParameterTypeDefault value
namespacestring"minecraft"
root?stringundefined

Returns ​

Promise<string[]>