UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

30 lines (29 loc) 1.01 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.ExplosionResistantBlockTrait = void 0; const ContentTraits_1 = require("./ContentTraits"); /** * Explosion resistant - block is highly resistant or immune to explosions. */ class ExplosionResistantBlockTrait extends ContentTraits_1.BlockContentTrait { get id() { return "explosion_resistant"; } getData(config) { const resistance = config?.explosionResistance ?? 1200; return { id: "explosion_resistant", displayName: "Explosion Resistant", description: "Highly resistant to explosions", category: "special", components: { "minecraft:destructible_by_explosion": { explosion_resistance: resistance, }, }, }; } } exports.ExplosionResistantBlockTrait = ExplosionResistantBlockTrait;