This commit is contained in:
kepler155c@gmail.com
2018-11-26 20:53:28 -05:00
parent a0d47a5f1a
commit eb799004f8
3 changed files with 16 additions and 1 deletions

12
sys/apis/sound.lua Normal file
View File

@@ -0,0 +1,12 @@
local peripheral = _G.peripheral
local speaker = peripheral.find('speaker')
local Sound = { }
function Sound.play(sound, vol)
if speaker then
speaker.playSound('minecraft:' .. sound, vol or 1)
end
end
return Sound