@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
106 lines (105 loc) • 4.03 kB
TypeScript
/**
* ContentWizardTemplates - Template Library for Content Wizard
*
* This module provides pre-built templates for common Minecraft content types.
* Templates are complete, valid definitions that can be:
* 1. Used directly as-is
* 2. Customized by changing names, colors, and properties
* 3. Combined with traits to add behavior
*
* TEMPLATE CATEGORIES:
* - Entity Templates: Complete entity definitions with geometry, textures, and basic behavior
* - Block Templates: Complete block definitions with geometry and textures
* - Item Templates: Complete item definitions with textures and basic properties
* - Texture Patterns: Reusable texture specifications for common materials
*
* USAGE:
* ```typescript
* import { EntityTemplates, BlockTemplates, TexturePatterns } from "./ContentWizardTemplates";
*
* // Get a template
* const pigTemplate = EntityTemplates.quadruped_passive;
*
* // Customize it
* const myPig = {
* ...pigTemplate,
* id: "my_custom_pig",
* displayName: "Custom Pig",
* };
* ```
*/
import { IEntityTypeDefinition, IBlockTypeDefinition, IItemTypeDefinition, ITextureSpec } from "./IContentMetaSchema";
/**
* Pre-built texture patterns for common Minecraft materials.
* Each pattern is an ITextureSpec that can be used in entity, block, or item definitions.
* Uses the 'generate' property for procedural textures per ITextureSpec interface.
*/
export declare const TexturePatterns: Record<string, ITextureSpec>;
/**
* Pre-built entity templates for common mob types.
* Each template is a complete IEntityTypeDefinition ready to use.
* Uses correct property names per IEntityTypeDefinition interface:
* - attackDamage (not attack)
* - movementSpeed (not speed)
* - bodyType values from GeometryTemplateType
*/
export declare const EntityTemplates: Record<string, IEntityTypeDefinition>;
/**
* Pre-built block templates for common block types.
* Each template is a complete IBlockTypeDefinition ready to use.
*/
export declare const BlockTemplates: Record<string, IBlockTypeDefinition>;
/**
* Pre-built item templates for common item types.
* Each template is a complete IItemTypeDefinition ready to use.
* Uses correct property names per IItemTypeDefinition:
* - maxStackSize (not stackSize)
* - icon (not texture) for inventory icon
* - fuel is a number (burn duration in ticks)
* - armor.slot is required
*/
export declare const ItemTemplates: Record<string, IItemTypeDefinition>;
/**
* Get all available texture pattern names.
*/
export declare function getTexturePatternNames(): string[];
/**
* Get a texture pattern by name.
*/
export declare function getTexturePattern(name: string): ITextureSpec | undefined;
/**
* Get all available entity template names.
*/
export declare function getEntityTemplateNames(): string[];
/**
* Get an entity template by name.
*/
export declare function getEntityTemplate(name: string): IEntityTypeDefinition | undefined;
/**
* Get all available block template names.
*/
export declare function getBlockTemplateNames(): string[];
/**
* Get a block template by name.
*/
export declare function getBlockTemplate(name: string): IBlockTypeDefinition | undefined;
/**
* Get all available item template names.
*/
export declare function getItemTemplateNames(): string[];
/**
* Get an item template by name.
*/
export declare function getItemTemplate(name: string): IItemTypeDefinition | undefined;
/**
* Create a customized copy of an entity template.
*/
export declare function customizeEntityTemplate(templateName: string, overrides: Partial<IEntityTypeDefinition>): IEntityTypeDefinition | undefined;
/**
* Create a customized copy of a block template.
*/
export declare function customizeBlockTemplate(templateName: string, overrides: Partial<IBlockTypeDefinition>): IBlockTypeDefinition | undefined;
/**
* Create a customized copy of an item template.
*/
export declare function customizeItemTemplate(templateName: string, overrides: Partial<IItemTypeDefinition>): IItemTypeDefinition | undefined;