UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

30 lines (29 loc) 955 B
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.SlipperyBlockTrait = void 0; const ContentTraits_1 = require("./ContentTraits"); /** * Slippery - low-friction surface like ice. * Friction range is 0.0-0.9 where lower = more slippery. * Default block friction is 0.4; this uses 0.1 for a very slippery surface. */ class SlipperyBlockTrait extends ContentTraits_1.BlockContentTrait { get id() { return "slippery"; } getData(config) { const friction = config?.friction ?? 0.1; return { id: "slippery", displayName: "Slippery", description: "Low-friction surface, entities slide", category: "special", components: { "minecraft:friction": friction, }, }; } } exports.SlipperyBlockTrait = SlipperyBlockTrait;