@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
139 lines (137 loc) • 6.66 kB
JavaScript
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
const ScriptModuleManager_1 = require("../manager/ScriptModuleManager");
const VsCodeFileManager_1 = require("../manager/VsCodeFileManager");
const MinEngineVersionManager_1 = require("../manager/MinEngineVersionManager");
const BaseGameVersionManager_1 = require("../manager/BaseGameVersionManager");
const PackMetaDataInfoGenerator_1 = require("./PackMetaDataInfoGenerator");
const CooperativeAddOnRequirementsGenerator_1 = require("./CooperativeAddOnRequirementsGenerator");
const StrictPlatformInfoGenerator_1 = require("./StrictPlatformInfoGenerator");
const CooperativeAddOnItemRequirementsGenerator_1 = require("./CooperativeAddOnItemRequirementsGenerator");
const PathLengthFileGenerator_1 = require("./PathLengthFileGenerator");
const ItemCountsInfoGenerator_1 = require("./ItemCountsInfoGenerator");
const PackInfoGenerator_1 = require("./PackInfoGenerator");
const LineSizeInfoGenerator_1 = require("./LineSizeInfoGenerator");
const SchemaItemInfoGenerator_1 = require("./SchemaItemInfoGenerator");
const UnknownItemGenerator_1 = require("./UnknownItemGenerator");
const UnknownFileGenerator_1 = require("./UnknownFileGenerator");
const WorldItemInfoGenerator_1 = require("./WorldItemInfoGenerator");
const JsonFileTagsInfoGenerator_1 = require("./JsonFileTagsInfoGenerator");
const WorldDataInfoGenerator_1 = require("./WorldDataInfoGenerator");
const IProjectInfoData_1 = require("./IProjectInfoData");
const TextureInfoGenerator_1 = require("./TextureInfoGenerator");
const PackSizeInfoGenerator_1 = require("./PackSizeInfoGenerator");
const TextureImageInfoGenerator_1 = require("./TextureImageInfoGenerator");
const FormatVersionManager_1 = require("../manager/FormatVersionManager");
const AnimationResourceInfoGenerator_1 = require("./AnimationResourceInfoGenerator");
const UnlinkedItemInfoGenerator_1 = require("./UnlinkedItemInfoGenerator");
const GeometryInfoGenerator_1 = require("./GeometryInfoGenerator");
const TextureReferenceInfoGenerator_1 = require("./TextureReferenceInfoGenerator");
const TypesInfoGenerator_1 = require("./TypesInfoGenerator");
const ValidFileGenerator_1 = require("./ValidFileGenerator");
const BlocksCatalogManager_1 = require("../manager/BlocksCatalogManager");
const EntityTypeManager_1 = require("../manager/EntityTypeManager");
const ItemTypeManager_1 = require("../manager/ItemTypeManager");
class GeneratorRegistrations {
static configureForSuite(generator, suite) {
if (suite === IProjectInfoData_1.ProjectInfoSuite.cooperativeAddOn) {
if (generator.id === "WORLDDATA") {
generator.performAddOnValidations = true;
}
else if (generator.id === "TEXTURE") {
generator.performAddOnValidations = true;
}
else if (generator.id === "PACKSIZE") {
generator.performAddOnValidations = true;
}
else if (generator.id === "STRICT") {
generator.identifierOverridesAreErrors = true;
}
}
else {
if (generator.id === "WORLDDATA") {
generator.performAddOnValidations = false;
}
else if (generator.id === "TEXTURE") {
generator.performAddOnValidations = false;
}
else if (generator.id === "PACKSIZE") {
generator.performAddOnValidations = false;
}
else if (generator.id === "STRICT") {
generator.identifierOverridesAreErrors = false;
}
}
if (suite === IProjectInfoData_1.ProjectInfoSuite.currentPlatformVersions) {
if (generator.id === "FORMATVER") {
generator.performPlatformVersionValidations = true;
}
else if (generator.id === "BASEGAMEVER") {
generator.performPlatformVersionValidations = true;
}
else if (generator.id === "MINENGINEVER") {
generator.performPlatformVersionValidations = true;
}
else if (generator.id === "WORLDDATA") {
generator.performPlatformVersionValidations = true;
}
}
else {
if (generator.id === "FORMATVER") {
generator.performPlatformVersionValidations = false;
}
else if (generator.id === "BASEGAMEVER") {
generator.performPlatformVersionValidations = false;
}
else if (generator.id === "MINENGINEVER") {
generator.performPlatformVersionValidations = false;
}
else if (generator.id === "WORLDDATA") {
generator.performPlatformVersionValidations = false;
}
}
}
}
exports.default = GeneratorRegistrations;
_a = GeneratorRegistrations;
GeneratorRegistrations.managers = [
new ScriptModuleManager_1.default(),
new VsCodeFileManager_1.default(),
new MinEngineVersionManager_1.default(),
new BaseGameVersionManager_1.default(),
new BlocksCatalogManager_1.default(),
new EntityTypeManager_1.default(),
new ItemTypeManager_1.default(),
];
GeneratorRegistrations.projectGenerators = [
new ItemCountsInfoGenerator_1.default(),
new LineSizeInfoGenerator_1.default(),
new PackSizeInfoGenerator_1.default(),
new PackInfoGenerator_1.default(),
new JsonFileTagsInfoGenerator_1.default(),
new FormatVersionManager_1.default(),
new PackMetaDataInfoGenerator_1.default(),
new AnimationResourceInfoGenerator_1.default(),
new CooperativeAddOnRequirementsGenerator_1.default(),
new StrictPlatformInfoGenerator_1.default(),
new TextureInfoGenerator_1.default(),
new TextureReferenceInfoGenerator_1.default(),
new TypesInfoGenerator_1.default(),
new TextureImageInfoGenerator_1.default(),
new GeometryInfoGenerator_1.default(),
..._a.managers,
];
GeneratorRegistrations.updaters = _a.managers;
GeneratorRegistrations.itemGenerators = [
new UnknownItemGenerator_1.default(),
new SchemaItemInfoGenerator_1.default(),
new WorldItemInfoGenerator_1.default(),
new WorldDataInfoGenerator_1.default(),
new CooperativeAddOnItemRequirementsGenerator_1.default(),
new UnlinkedItemInfoGenerator_1.default(),
];
GeneratorRegistrations.fileGenerators = [new UnknownFileGenerator_1.default(), new ValidFileGenerator_1.default(), new PathLengthFileGenerator_1.default()];
//# sourceMappingURL=../maps/info/GeneratorRegistrations.js.map