minerender 2.1.0-alpha.82 → 2.1.0-alpha.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -269,7 +269,7 @@ interface EntityModelFile extends MinecraftAsset {
269
269
  passes?: EntityModelPass[];
270
270
  }
271
271
  /** Vanilla render type of a draw; see the dataset README for the mode table. */
272
- type EntityRenderMode = "cutout" | "cutout_cull" | "cutout_z_offset" | "solid" | "translucent" | "translucent_emissive" | "eyes" | "energy_swirl" | "breeze_wind" | "water_mask";
272
+ type EntityRenderMode = "cutout" | "cutout_cull" | "cutout_z_offset" | "solid" | "translucent" | "translucent_emissive" | "eyes" | "energy_swirl" | "breeze_wind" | "water_mask" | "no_outline";
273
273
  /** An extra draw of a geometry layer, optionally enabled by an entity-state label. */
274
274
  interface EntityModelPass {
275
275
  /** Geometry layer of the same file; a pass on `main` draws that geometry again. */
@@ -501,6 +501,46 @@ declare class ImageLoader {
501
501
  static getWrapped(src: string): Promise<WrappedImage>;
502
502
  }
503
503
 
504
+ /** Vanilla dye colors used by banner and shield textures, as sRGB packed values. */
505
+ declare const DYE_COLORS: Readonly<{
506
+ readonly white: 16383998;
507
+ readonly orange: 16351261;
508
+ readonly magenta: 13061821;
509
+ readonly light_blue: 3847130;
510
+ readonly yellow: 16701501;
511
+ readonly lime: 8439583;
512
+ readonly pink: 15961002;
513
+ readonly gray: 4673362;
514
+ readonly light_gray: 10329495;
515
+ readonly cyan: 1481884;
516
+ readonly purple: 8991416;
517
+ readonly blue: 3949738;
518
+ readonly brown: 8606770;
519
+ readonly green: 6192150;
520
+ readonly red: 11546150;
521
+ readonly black: 1908001;
522
+ }>;
523
+ type DyeColor = keyof typeof DYE_COLORS;
524
+ /** A registry banner pattern or an inline value in a `banner_patterns` component. */
525
+ interface BannerPattern extends MinecraftAsset {
526
+ asset_id: string;
527
+ translation_key: string;
528
+ }
529
+ interface BannerPatternDraw {
530
+ texture: AssetKey;
531
+ color: number;
532
+ }
533
+ /** Loads banner-pattern registry entries and resolves their banner or shield textures. */
534
+ declare class BannerPatterns {
535
+ /** Lists namespaced pattern IDs from the selected namespace's data directory. */
536
+ static getList(namespace?: string, root?: string): Promise<string[]>;
537
+ /** Returns the named dye's sRGB value, rejecting unknown colors. */
538
+ static getColor(color: unknown): number;
539
+ /** Resolves the first 16 layers of a `banner_patterns` component, preserving their order. */
540
+ static getLayers(value: unknown, target: "banner" | "shield", root?: string): Promise<BannerPatternDraw[]>;
541
+ private static identifier;
542
+ }
543
+
504
544
  declare const ITEM_GENERATED = "item/generated";
505
545
  declare const BUILTIN_GENERATED = "builtin/generated";
506
546
  declare const BUILTIN_ENTITY = "builtin/entity";
@@ -524,7 +564,7 @@ interface ItemModel extends Model {
524
564
  gui_light?: GuiLight;
525
565
  special?: SpecialItemRenderer;
526
566
  tints?: ItemTintSource[];
527
- /** Stack-component snapshot with namespaced IDs, used to resolve this item's tint sources. */
567
+ /** Stack-component snapshot with namespaced IDs, used by tint sources and special renderers. */
528
568
  components?: Record<string, unknown>;
529
569
  /** Ordered composite children, each with its own textures, display pose, and tint sources. */
530
570
  parts?: ItemModel[];
@@ -549,6 +589,11 @@ type ItemTintSource = {
549
589
  };
550
590
  /** Supported item definitions that draw entity geometry instead of ordinary model elements. */
551
591
  type SpecialItemRenderer = {
592
+ type: "banner" | "minecraft:banner";
593
+ color: DyeColor;
594
+ } | {
595
+ type: "shield" | "minecraft:shield";
596
+ } | {
552
597
  type: "chest" | "minecraft:chest";
553
598
  texture: string;
554
599
  openness?: number;
@@ -1292,11 +1337,13 @@ interface SpecialItemPart {
1292
1337
  rotations: Record<string, TripleArray>;
1293
1338
  /** Absolute named-part positions in the entity model's coordinate system. */
1294
1339
  positions?: Record<string, TripleArray>;
1340
+ /** Colors for the entity model's named texture passes. */
1341
+ tints?: Record<string, number>;
1295
1342
  }
1296
- /** Loads the entity geometry used by chest, shulker-box, bed, and supported mob-head item previews. */
1343
+ /** Loads entity geometry and texture passes for supported special item previews. */
1297
1344
  declare class SpecialItems {
1298
1345
  /** Resolves the static entity parts drawn by a special item renderer, in model units. */
1299
- static getParts(special: SpecialItemRenderer, root?: string): Promise<SpecialItemPart[]>;
1346
+ static getParts(special: SpecialItemRenderer, root?: string, components?: Record<string, unknown>): Promise<SpecialItemPart[]>;
1300
1347
  /** An owned material with model-preview shading; its entity texture remains shared. */
1301
1348
  static createMaterial(source: MeshBasicMaterial, shade: boolean): MeshBasicMaterial;
1302
1349
  }
@@ -2328,6 +2375,7 @@ declare class Caching {
2328
2375
  static readonly entityAnimationCache: AsyncLoadingCache<CacheKey, EntityAnimationFile>;
2329
2376
  static readonly blockEntityIndexCache: AsyncLoadingCache<CacheKey, BlockEntityIndex>;
2330
2377
  static readonly fontCache: AsyncLoadingCache<CacheKey, BitmapFont>;
2378
+ static readonly bannerPatternCache: AsyncLoadingCache<CacheKey, BannerPattern>;
2331
2379
  private static createAssetCache;
2332
2380
  /** Every cache above, so clear()/end() can never fall out of sync with the field list again. */
2333
2381
  private static get all();
@@ -3250,4 +3298,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
3250
3298
  forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
3251
3299
  }
3252
3300
 
3253
- export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, type LoadedSceneDocument, type LoadedSceneObject, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas };
3301
+ export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, type LoadedSceneDocument, type LoadedSceneObject, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas };
@@ -269,7 +269,7 @@ interface EntityModelFile extends MinecraftAsset {
269
269
  passes?: EntityModelPass[];
270
270
  }
271
271
  /** Vanilla render type of a draw; see the dataset README for the mode table. */
272
- type EntityRenderMode = "cutout" | "cutout_cull" | "cutout_z_offset" | "solid" | "translucent" | "translucent_emissive" | "eyes" | "energy_swirl" | "breeze_wind" | "water_mask";
272
+ type EntityRenderMode = "cutout" | "cutout_cull" | "cutout_z_offset" | "solid" | "translucent" | "translucent_emissive" | "eyes" | "energy_swirl" | "breeze_wind" | "water_mask" | "no_outline";
273
273
  /** An extra draw of a geometry layer, optionally enabled by an entity-state label. */
274
274
  interface EntityModelPass {
275
275
  /** Geometry layer of the same file; a pass on `main` draws that geometry again. */
@@ -501,6 +501,46 @@ declare class ImageLoader {
501
501
  static getWrapped(src: string): Promise<WrappedImage>;
502
502
  }
503
503
 
504
+ /** Vanilla dye colors used by banner and shield textures, as sRGB packed values. */
505
+ declare const DYE_COLORS: Readonly<{
506
+ readonly white: 16383998;
507
+ readonly orange: 16351261;
508
+ readonly magenta: 13061821;
509
+ readonly light_blue: 3847130;
510
+ readonly yellow: 16701501;
511
+ readonly lime: 8439583;
512
+ readonly pink: 15961002;
513
+ readonly gray: 4673362;
514
+ readonly light_gray: 10329495;
515
+ readonly cyan: 1481884;
516
+ readonly purple: 8991416;
517
+ readonly blue: 3949738;
518
+ readonly brown: 8606770;
519
+ readonly green: 6192150;
520
+ readonly red: 11546150;
521
+ readonly black: 1908001;
522
+ }>;
523
+ type DyeColor = keyof typeof DYE_COLORS;
524
+ /** A registry banner pattern or an inline value in a `banner_patterns` component. */
525
+ interface BannerPattern extends MinecraftAsset {
526
+ asset_id: string;
527
+ translation_key: string;
528
+ }
529
+ interface BannerPatternDraw {
530
+ texture: AssetKey;
531
+ color: number;
532
+ }
533
+ /** Loads banner-pattern registry entries and resolves their banner or shield textures. */
534
+ declare class BannerPatterns {
535
+ /** Lists namespaced pattern IDs from the selected namespace's data directory. */
536
+ static getList(namespace?: string, root?: string): Promise<string[]>;
537
+ /** Returns the named dye's sRGB value, rejecting unknown colors. */
538
+ static getColor(color: unknown): number;
539
+ /** Resolves the first 16 layers of a `banner_patterns` component, preserving their order. */
540
+ static getLayers(value: unknown, target: "banner" | "shield", root?: string): Promise<BannerPatternDraw[]>;
541
+ private static identifier;
542
+ }
543
+
504
544
  declare const ITEM_GENERATED = "item/generated";
505
545
  declare const BUILTIN_GENERATED = "builtin/generated";
506
546
  declare const BUILTIN_ENTITY = "builtin/entity";
@@ -524,7 +564,7 @@ interface ItemModel extends Model {
524
564
  gui_light?: GuiLight;
525
565
  special?: SpecialItemRenderer;
526
566
  tints?: ItemTintSource[];
527
- /** Stack-component snapshot with namespaced IDs, used to resolve this item's tint sources. */
567
+ /** Stack-component snapshot with namespaced IDs, used by tint sources and special renderers. */
528
568
  components?: Record<string, unknown>;
529
569
  /** Ordered composite children, each with its own textures, display pose, and tint sources. */
530
570
  parts?: ItemModel[];
@@ -549,6 +589,11 @@ type ItemTintSource = {
549
589
  };
550
590
  /** Supported item definitions that draw entity geometry instead of ordinary model elements. */
551
591
  type SpecialItemRenderer = {
592
+ type: "banner" | "minecraft:banner";
593
+ color: DyeColor;
594
+ } | {
595
+ type: "shield" | "minecraft:shield";
596
+ } | {
552
597
  type: "chest" | "minecraft:chest";
553
598
  texture: string;
554
599
  openness?: number;
@@ -1292,11 +1337,13 @@ interface SpecialItemPart {
1292
1337
  rotations: Record<string, TripleArray>;
1293
1338
  /** Absolute named-part positions in the entity model's coordinate system. */
1294
1339
  positions?: Record<string, TripleArray>;
1340
+ /** Colors for the entity model's named texture passes. */
1341
+ tints?: Record<string, number>;
1295
1342
  }
1296
- /** Loads the entity geometry used by chest, shulker-box, bed, and supported mob-head item previews. */
1343
+ /** Loads entity geometry and texture passes for supported special item previews. */
1297
1344
  declare class SpecialItems {
1298
1345
  /** Resolves the static entity parts drawn by a special item renderer, in model units. */
1299
- static getParts(special: SpecialItemRenderer, root?: string): Promise<SpecialItemPart[]>;
1346
+ static getParts(special: SpecialItemRenderer, root?: string, components?: Record<string, unknown>): Promise<SpecialItemPart[]>;
1300
1347
  /** An owned material with model-preview shading; its entity texture remains shared. */
1301
1348
  static createMaterial(source: MeshBasicMaterial, shade: boolean): MeshBasicMaterial;
1302
1349
  }
@@ -2328,6 +2375,7 @@ declare class Caching {
2328
2375
  static readonly entityAnimationCache: AsyncLoadingCache<CacheKey, EntityAnimationFile>;
2329
2376
  static readonly blockEntityIndexCache: AsyncLoadingCache<CacheKey, BlockEntityIndex>;
2330
2377
  static readonly fontCache: AsyncLoadingCache<CacheKey, BitmapFont>;
2378
+ static readonly bannerPatternCache: AsyncLoadingCache<CacheKey, BannerPattern>;
2331
2379
  private static createAssetCache;
2332
2380
  /** Every cache above, so clear()/end() can never fall out of sync with the field list again. */
2333
2381
  private static get all();
@@ -3250,4 +3298,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
3250
3298
  forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
3251
3299
  }
3252
3300
 
3253
- export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, type LoadedSceneDocument, type LoadedSceneObject, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas };
3301
+ export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, type LoadedSceneDocument, type LoadedSceneObject, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas };
@@ -301,6 +301,9 @@ var init_Caching = __esm({
301
301
  static {
302
302
  this.fontCache = _Caching.createAssetCache();
303
303
  }
304
+ static {
305
+ this.bannerPatternCache = _Caching.createAssetCache();
306
+ }
304
307
  static createAssetCache() {
305
308
  return import_loading_cache.Caches.builder().expireAfterWrite(import_time.Time.minutes(10)).expireAfterAccess(import_time.Time.minutes(5)).expirationInterval(import_time.Time.seconds(30)).buildAsync();
306
309
  }
@@ -328,7 +331,8 @@ var init_Caching = __esm({
328
331
  this.entityTextureCache,
329
332
  this.entityAnimationCache,
330
333
  this.blockEntityIndexCache,
331
- this.fontCache
334
+ this.fontCache,
335
+ this.bannerPatternCache
332
336
  ];
333
337
  }
334
338
  /** Invalidates in-memory entries so later lookups reload them. Persisted entries are retained. */
@@ -992,6 +996,7 @@ var init_Materials = __esm({
992
996
  material.depthWrite = false;
993
997
  break;
994
998
  case "eyes":
999
+ case "no_outline":
995
1000
  material.transparent = true;
996
1001
  material.alphaTest = 0;
997
1002
  material.depthWrite = false;
@@ -1580,6 +1585,79 @@ var init_AssetParsers = __esm({
1580
1585
  }
1581
1586
  });
1582
1587
 
1588
+ // src/assets/BannerPatterns.ts
1589
+ var DYE_COLORS, BannerPatterns;
1590
+ var init_BannerPatterns = __esm({
1591
+ "src/assets/BannerPatterns.ts"() {
1592
+ init_AssetKey();
1593
+ init_AssetLoader();
1594
+ init_AssetParsers();
1595
+ init_Caching();
1596
+ DYE_COLORS = Object.freeze({
1597
+ white: 16383998,
1598
+ orange: 16351261,
1599
+ magenta: 13061821,
1600
+ light_blue: 3847130,
1601
+ yellow: 16701501,
1602
+ lime: 8439583,
1603
+ pink: 15961002,
1604
+ gray: 4673362,
1605
+ light_gray: 10329495,
1606
+ cyan: 1481884,
1607
+ purple: 8991416,
1608
+ blue: 3949738,
1609
+ brown: 8606770,
1610
+ green: 6192150,
1611
+ red: 11546150,
1612
+ black: 1908001
1613
+ });
1614
+ BannerPatterns = class {
1615
+ /** Lists namespaced pattern IDs from the selected namespace's data directory. */
1616
+ static async getList(namespace = "minecraft", root) {
1617
+ const collect = async (path) => {
1618
+ const prefix2 = path ? `${path}/` : "";
1619
+ const key = new AssetKey(namespace, `${prefix2}_list`, "banner_pattern", void 0, "data", ".json", root);
1620
+ const list2 = await Caching.listAssetCache.get(key.serialize(), () => AssetLoader.get(key, "list" /* LIST */));
1621
+ if (!list2) return [];
1622
+ const files = list2.files.filter((file) => file.endsWith(".json") && file !== "_list.json").map((file) => `${namespace}:${prefix2}${file.slice(0, -5)}`);
1623
+ const children = await Promise.all(list2.directories.map((directory) => collect(`${prefix2}${directory}`)));
1624
+ return [...files, ...children.flat()];
1625
+ };
1626
+ return collect("");
1627
+ }
1628
+ /** Returns the named dye's sRGB value, rejecting unknown colors. */
1629
+ static getColor(color2) {
1630
+ if (typeof color2 !== "string" || !Object.prototype.hasOwnProperty.call(DYE_COLORS, color2)) throw new Error(`Unsupported dye color ${color2}`);
1631
+ return DYE_COLORS[color2];
1632
+ }
1633
+ /** Resolves the first 16 layers of a `banner_patterns` component, preserving their order. */
1634
+ static async getLayers(value, target, root) {
1635
+ if (value === void 0) return [];
1636
+ if (!Array.isArray(value)) throw new Error("banner_patterns must be an array");
1637
+ return Promise.all(value.slice(0, 16).map(async (layer) => {
1638
+ if (!layer || typeof layer !== "object" || Array.isArray(layer)) throw new Error("Each banner pattern requires a pattern and dye color");
1639
+ const color2 = this.getColor(layer.color);
1640
+ let pattern2 = layer.pattern;
1641
+ if (typeof pattern2 === "string") {
1642
+ const id = this.identifier(pattern2);
1643
+ const key = new AssetKey(id.namespace, id.getFullPath(), "banner_pattern", void 0, "data", ".json", root);
1644
+ pattern2 = await Caching.bannerPatternCache.get(key.serialize(), () => AssetLoader.get(key, "json" /* JSON */));
1645
+ if (!pattern2) throw new Error(`Missing banner pattern ${layer.pattern}`);
1646
+ }
1647
+ if (!pattern2 || typeof pattern2 !== "object" || Array.isArray(pattern2) || typeof pattern2.translation_key !== "string") throw new Error("Banner patterns require asset_id and translation_key");
1648
+ const asset2 = this.identifier(pattern2.asset_id);
1649
+ return { color: color2, texture: new AssetKey(asset2.namespace, `${target}/${asset2.getFullPath()}`, "textures", "entity", "assets", ".png", root) };
1650
+ }));
1651
+ }
1652
+ static identifier(value) {
1653
+ if (typeof value !== "string" || !/^(?:[a-z0-9_.-]+:)?[a-z0-9_./-]+$/.test(value)) throw new Error(`Invalid banner-pattern identifier ${value}`);
1654
+ const [namespace, path] = value.includes(":") ? value.split(":") : ["minecraft", value];
1655
+ return new AssetKey(namespace, path);
1656
+ }
1657
+ };
1658
+ }
1659
+ });
1660
+
1583
1661
  // src/assets/Models.ts
1584
1662
  var Models;
1585
1663
  var init_Models = __esm({
@@ -1592,6 +1670,7 @@ var init_Models = __esm({
1592
1670
  init_AssetKey();
1593
1671
  init_AssetParsers();
1594
1672
  init_DisplayPosition();
1673
+ init_BannerPatterns();
1595
1674
  Models = class _Models {
1596
1675
  // opened lazily: touching the store at import time would hit IndexedDB/disk just for loading
1597
1676
  // the library, and would require an EnvProvider before any entry has had a chance to register
@@ -1781,6 +1860,13 @@ var init_Models = __esm({
1781
1860
  if (!node.base || !node.model || typeof node.model !== "object") break;
1782
1861
  const special = node.model;
1783
1862
  switch (special.type) {
1863
+ case "banner":
1864
+ case "minecraft:banner":
1865
+ if (typeof special.color === "string" && Object.prototype.hasOwnProperty.call(DYE_COLORS, special.color)) return { model: node.base, special };
1866
+ break;
1867
+ case "shield":
1868
+ case "minecraft:shield":
1869
+ return { model: node.base, special };
1784
1870
  case "shulker_box":
1785
1871
  case "minecraft:shulker_box":
1786
1872
  if (typeof special.texture === "string" && special.texture && (special.openness === void 0 || typeof special.openness === "number" && Number.isFinite(special.openness)) && (special.orientation === void 0 || ["down", "up", "north", "south", "west", "east"].includes(special.orientation))) {
@@ -5524,9 +5610,11 @@ var init_SpecialItems = __esm({
5524
5610
  import_three24 = require("three");
5525
5611
  init_AssetKey();
5526
5612
  init_Entities();
5613
+ init_BannerPatterns();
5614
+ init_ModelTextures();
5527
5615
  SpecialItems = class {
5528
5616
  /** Resolves the static entity parts drawn by a special item renderer, in model units. */
5529
- static async getParts(special, root) {
5617
+ static async getParts(special, root, components = {}) {
5530
5618
  const texture = (id, directory) => {
5531
5619
  const key = AssetKey.parse("textures", id);
5532
5620
  return new AssetKey(
@@ -5539,13 +5627,60 @@ var init_SpecialItems = __esm({
5539
5627
  root
5540
5628
  );
5541
5629
  };
5542
- const load = async (id, textureKey, transform, rotations = {}) => {
5630
+ const load = async (id, textureKey, transform, rotations = {}, layers = ["main"]) => {
5543
5631
  const key = new AssetKey("minecraft", id, void 0, void 0, "entity-models", ".json", root);
5544
- const model = await Entities.getEntity(key, textureKey, { layer: "main" });
5632
+ const model = await Entities.getEntity(key, textureKey, layers.length === 1 ? { layer: layers[0] } : {
5633
+ layers,
5634
+ textures: textureKey ? Object.fromEntries(layers.map((name) => [name, textureKey])) : void 0
5635
+ });
5545
5636
  if (!model) throw new Error(`Missing entity model minecraft:${id} for special item ${special.type}`);
5546
5637
  return { model, transform, rotations };
5547
5638
  };
5548
5639
  switch (special.type) {
5640
+ case "minecraft:banner":
5641
+ case "banner":
5642
+ case "minecraft:shield":
5643
+ case "shield": {
5644
+ const banner = special.type === "banner" || special.type === "minecraft:banner";
5645
+ const color2 = banner ? BannerPatterns.getColor(special.color) : components["minecraft:base_color"] === void 0 ? void 0 : BannerPatterns.getColor(components["minecraft:base_color"]);
5646
+ const patterns = await BannerPatterns.getLayers(components["minecraft:banner_patterns"], banner ? "banner" : "shield", root);
5647
+ const patterned = banner || color2 !== void 0 || patterns.length > 0;
5648
+ const baseTexture = texture(banner ? "banner_base" : patterned ? "shield_base" : "shield_base_nopattern", "");
5649
+ const transform = banner ? new import_three24.Matrix4().makeTranslation(8, 0, 8).multiply(new import_three24.Matrix4().makeScale(2 / 3, -2 / 3, -2 / 3)) : new import_three24.Matrix4().makeScale(1, -1, -1);
5650
+ const part = await load(banner ? "standing_banner" : "shield", baseTexture, transform, {}, banner ? ["main", "flag"] : ["main"]);
5651
+ const layers = Object.fromEntries(Object.entries(part.model.layers ?? { main: part.model }).map(([name, layer]) => [name, { ...layer, render: "solid" }]));
5652
+ let overlay2;
5653
+ if (banner) {
5654
+ const flagLayer = layers.flag;
5655
+ const flag = flagLayer?.layer.root.children.flag;
5656
+ if (!flag) throw new Error("Banner entity model is missing its flag layer");
5657
+ overlay2 = { ...flagLayer.layer, root: { ...flagLayer.layer.root, children: {
5658
+ ...flagLayer.layer.root.children,
5659
+ flag: { ...flag, pose: { ...flag.pose, rotation: [-25e-4 * Math.PI, flag.pose.rotation[1], flag.pose.rotation[2]] } }
5660
+ } } };
5661
+ layers.flag = { ...flagLayer, layer: overlay2 };
5662
+ } else {
5663
+ const main = layers.main.layer;
5664
+ const plate = main.root.children.plate;
5665
+ if (!plate) throw new Error("Shield entity model is missing its plate");
5666
+ overlay2 = { ...main, root: { ...main.root, cubes: [], children: { plate } } };
5667
+ }
5668
+ const tints = {};
5669
+ if (patterned) {
5670
+ const draws = [{ texture: texture(`${banner ? "banner" : "shield"}/base`, ""), color: color2 ?? DYE_COLORS.white }, ...patterns];
5671
+ draws.forEach((draw, index) => {
5672
+ const name = index === 0 ? "pattern_base" : `pattern_${index - 1}`;
5673
+ layers[name] = { key: draw.texture, texture: draw.texture, layer: overlay2, render: "no_outline", tint: name };
5674
+ tints[name] = draw.color;
5675
+ });
5676
+ }
5677
+ await Promise.all([...new Map(Object.values(layers).map((layer) => [layer.texture.serialize(), layer.texture])).values()].map(async (key) => {
5678
+ if (!await ModelTextures.preload(key)) throw new Error(`Missing special item texture ${key.toNamespacedString()}`);
5679
+ }));
5680
+ part.model = { ...part.model, ...layers.main, layers };
5681
+ part.tints = tints;
5682
+ return [part];
5683
+ }
5549
5684
  case "minecraft:chest":
5550
5685
  case "chest": {
5551
5686
  const angle = -(special.openness ?? 0) * Math.PI / 2;
@@ -5843,12 +5978,12 @@ var init_ModelObject = __esm({
5843
5978
  this.options.tints = await ItemTints.get(this.originalModel, this.options.tints);
5844
5979
  const special = this.originalModel.special;
5845
5980
  if (special) {
5846
- const parts2 = await SpecialItems.getParts(special, this.originalModel.key?.root);
5981
+ const parts2 = await SpecialItems.getParts(special, this.originalModel.key?.root, this.originalModel.components);
5847
5982
  const transform = this.options.displayPosition ? DisplayTransforms.getMatrix(this.originalModel.display, this.options.displayPosition) : new import_three25.Matrix4();
5848
5983
  transform.multiply(new import_three25.Matrix4().makeTranslation(-8, -8, -8));
5849
5984
  try {
5850
5985
  for (const part of parts2) {
5851
- const object3 = new EntityObject(part.model, { flip: false, wireframe: this.options.wireframe });
5986
+ const object3 = new EntityObject(part.model, { flip: false, wireframe: this.options.wireframe, tints: part.tints });
5852
5987
  object3.matrix.copy(transform).multiply(part.transform);
5853
5988
  object3.matrixWorldNeedsUpdate = true;
5854
5989
  object3.matrixAutoUpdate = false;
@@ -6299,6 +6434,7 @@ __export(index_node_exports, {
6299
6434
  Axis: () => Axis,
6300
6435
  BUILTIN_ENTITY: () => BUILTIN_ENTITY,
6301
6436
  BUILTIN_GENERATED: () => BUILTIN_GENERATED,
6437
+ BannerPatterns: () => BannerPatterns,
6302
6438
  BasicAssetKey: () => BasicAssetKey,
6303
6439
  BatchedExecutor: () => BatchedExecutor,
6304
6440
  BlockEntities: () => BlockEntities,
@@ -6321,6 +6457,7 @@ __export(index_node_exports, {
6321
6457
  DEFAULT_ROOT: () => DEFAULT_ROOT,
6322
6458
  DEFAULT_UV: () => DEFAULT_UV,
6323
6459
  DISPLAY_POSITIONS: () => DISPLAY_POSITIONS,
6460
+ DYE_COLORS: () => DYE_COLORS,
6324
6461
  DefaultBlockStates: () => DefaultBlockStates,
6325
6462
  DisplayPosition: () => DisplayPosition,
6326
6463
  DisplayTransforms: () => DisplayTransforms,
@@ -6618,6 +6755,7 @@ function shutdown() {
6618
6755
  init_AssetKey();
6619
6756
  init_AssetLoader();
6620
6757
  init_Assets();
6758
+ init_BannerPatterns();
6621
6759
 
6622
6760
  // src/assets/BlockEntities.ts
6623
6761
  var import_three10 = require("three");
@@ -16985,6 +17123,7 @@ var Chunk = class _Chunk {
16985
17123
  Axis,
16986
17124
  BUILTIN_ENTITY,
16987
17125
  BUILTIN_GENERATED,
17126
+ BannerPatterns,
16988
17127
  BasicAssetKey,
16989
17128
  BatchedExecutor,
16990
17129
  BlockEntities,
@@ -17007,6 +17146,7 @@ var Chunk = class _Chunk {
17007
17146
  DEFAULT_ROOT,
17008
17147
  DEFAULT_UV,
17009
17148
  DISPLAY_POSITIONS,
17149
+ DYE_COLORS,
17010
17150
  DefaultBlockStates,
17011
17151
  DisplayPosition,
17012
17152
  DisplayTransforms,