class BlockDestructionHandler { constructor(player, block, dimension) { this.player = player; this.block = block; this.dimension = dimension; } handleDestruction() { const gameMode = this.player.getGameMode(); if (gameMode === "survival") { this.playSound(); this.spawnLuckParticle(); this.spawnLuckEntity(); } } playSound() { this.dimension.playSound("random.orb", this.block, { pitch: 1.3, volume: 1.0, }); } spawnLuckParticle() { const { x, y, z } = this.block; this.dimension.spawnParticle("custom:luck", { x: x + 0.5, y: y, z: z + 0.5, }); } spawnLuckEntity() { const location = this.block; this.dimension.spawnEntity("add:luck", location); } } export default BlockDestructionHandler; // \u0062\u0079 \u0041\u006e\u0064\u0069\u0075\u0062\u0065\u0072 \u00a9\u0054\u0045\u0041\u004d \u0043\u0055\u0042\u0049\u0054\u004f\u0053 \u004d\u0043 //