package net.glowstone.block.entity;

import net.glowstone.block.GlowBlock;
import net.glowstone.block.GlowBlockState;
import net.glowstone.block.state.GlowChest;
import net.glowstone.entity.GlowPlayer;
import net.glowstone.inventory.GlowChestInventory;
import net.glowstone.net.message.play.game.BlockActionMessage;
import org.bukkit.Sound;

/**
 * Tile entity for Chests.
 */
public class TEChest extends TEContainer {

    private int viewers;

    public TEChest(GlowBlock block) {
        super(block, new GlowChestInventory(new GlowChest(block)));
        setSaveId("Chest");
    }

    @Override
    public GlowBlockState getState() {
        return new GlowChest(block);
    }

    public void addViewer() {
        viewers++;
        if (viewers == 1) {
            updateInRange();
            block.getWorld().playSound(block.getLocation(), Sound.BLOCK_CHEST_OPEN, 5f, 1f);
        }
    }

    public void removeViewer() {
        viewers--;
        if (viewers == 0) {
            updateInRange();
            block.getWorld().playSound(block.getLocation(), Sound.BLOCK_CHEST_CLOSE, 5f, 1f);
        }
    }

    @Override
    public void update(GlowPlayer player) {
        super.update(player);

        player.getSession().send(new BlockActionMessage(block.getX(), block.getY(), block.getZ(), 1, viewers == 0 ? 0 : 1, block.getTypeId()));
    }
}

@@ -335,16 +335,42 @@
 Sound;%0A%0A
+import java.util.Random;%0A%0A
 /**%0A * T
@@ -894,22 +894,60 @@
 T_OPEN, 
+0.
 5f, 
-1f
+new Random().nextFloat() * 0.1F + 0.9F
 );%0A     
@@ -1156,14 +1156,52 @@
 SE, 
+0.
 5f, 
-1f
+new Random().nextFloat() * 0.1F + 0.9F
 );%0A 

Use vanilla pitch/volume for chest sounds