@@ -61,7 +61,7 @@ function handleWaterlogging(block, structureBlock) {
|
||||
function playBlockPlacementSound(player, block, structureBlock) {
|
||||
const blockId = structureBlock.type.id.replace('minecraft:', '');
|
||||
const blockData = blocks[blockId];
|
||||
let blockSound = blockData['sound'] || 'stone';
|
||||
let blockSound = blockData?.sound || 'stone';//fix error with missing sound
|
||||
let blockSoundId = block_sounds[blockSound].events.place?.sound
|
||||
|| block_sounds[block_sounds[blockSound].base].events.place?.sound;
|
||||
player.dimension.playSound(blockSoundId, block.location);
|
||||
|
||||
Reference in New Issue
Block a user