@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
41 lines (40 loc) • 1.95 kB
TypeScript
import ProjectInfoItem from "./ProjectInfoItem";
import ProjectItem from "../app/ProjectItem";
import IProjectInfoItemGenerator from "./IProjectItemInfoGenerator";
import ProjectInfoSet from "./ProjectInfoSet";
import ContentIndex from "../core/ContentIndex";
import { IGeneratorOptions } from "./ProjectInfoSet";
export declare enum CustomDimensionWorldDataTest {
nameIdMappingTableMissing = 101,
vanillaDimensionChunkData = 102,
unclaimedDimensionMappings = 103
}
export default class CustomDimensionWorldDataInfoGenerator implements IProjectInfoItemGenerator {
#private;
id: string;
title: string;
/**
* Rule 102 ("Vanilla Dimension Chunk Data") is meaningful only when the
* surrounding project is shaped like an add-on. For a standalone world
* template — or any "general world data" project — Overworld/Nether/End
* chunk data is normal and expected, not a defect.
*
* Delegates to the canonical {@link ProjectUtilities.getMetaCategory}, the
* shared classifier used elsewhere (e.g. {@link TextureImageInfoGenerator})
* to gate add-on-only validations. We use `getMetaCategory` rather than
* `getIsAddon` because the latter excludes any project containing world
* items — but this generator only ever runs on world items, so that check
* would always fail. `getMetaCategory` evaluates pack shape independently
* and returns `worldTemplate` (not `addOn`) when a template manifest is
* present, which gives us the correct gating for free.
*
* Result is cached per Project for the lifetime of the generator instance.
*/
private isAddOnContextForWorld;
getTopicData(topicId: number): {
title: string;
description: string;
};
summarize(info: any, infoSet: ProjectInfoSet): void;
generate(projectItem: ProjectItem, contentIndex: ContentIndex, options?: IGeneratorOptions): Promise<ProjectInfoItem[]>;
}