QcContainerSounds Class
The open and close sounds of storage blocks (decision E-879): a chest, barrel or placed backpack sounds when its first viewer opens it and when its last one closes it, so that two players looking into one chest make one sound each way; a backpack opened from the hand sounds when its holder opens and closes it. More...
| Header: | #include <server/machines/QcContainerSounds.h> |
Public Functions
| void | update() |
Detailed Description
It compares who looks into what with the previous tick, so every way a screen closes (the player, the server, death, walking away) sounds alike. The sounds are the block's QcBlockDefinition::containerOpenSound and containerCloseSound. A container broken while open makes only its breaking sound; one pushed away by a piston while open closes silently, since its block is no longer at the position its viewers had open.
Member Function Documentation
void QcContainerSounds::update()
Once per tick, after the screens were updated.