介绍
CC: Jukebox lets ComputerCraft computers broadcast music from a playing jukebox to remote CC speakers.
Listeners join at the current point in the song. Removing the disc stops playback.
- Includes a ready-to-use
jukebox_radioprogram - Broadcast to multiple receiving computers
- Designed for server-side installation or singleplayer
Run jukebox_radio broadcast on a computer beside the jukebox, then jukebox_radio receive <sender-ID> on a computer with a speaker. Both computers need modems.
Lua API
Find a connected jukebox with peripheral.find("jukebox"). Direct connections and wired modem networks are supported.
hasRecord()– checks whether a disc is inserted.isPlaying()– checks whether the jukebox is playinggetRecord()– returns the disc’s item ID, sound ID, title, duration, playback state, and elapsed timereadAudio(cursor?, token?)– reads audio chunks from the current playback position
readAudio() returns a table with a status: loading, audio, waiting, stopped, ended, or error. Audio results include audio, token, cursor, and next. Pass next and token into the following call to continue smoothly.
Audio is a binary string of 48 kHz mono PCM bytes. Convert each byte with audio:byte(i) - 128 before passing the sample table to speaker.playAudio(). Custom programs can relay these chunks over Rednet.
Ready-made radio commands
jukebox_radio broadcast
jukebox_radio receive <senderComputerID> [volume]
jukebox_radio local
Receivers join the current part of the song. The jukebox and participating computers must remain loaded.
常见问题
CC: Jukebox 支持哪些 Minecraft 版本?
CC: Jukebox 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
CC: Jukebox 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
diggydwarff 的其他作品
查看全部 →
Tobacconist
为 Minecraft 加入真实的烟草种植、烘烤、加工、调配和吸食系统。
Herbalist
在游戏中加入火焰芽等新的药用植物和菌类!
Create: Radar Waterline
Submerged antennas stop scanning and normal radar no longer detects fully submerged targets
Autumn Foliage
A mod that applies autumn/fall colors to vegetation across both vanilla Minecraft and modded content
评论
登录后评论和评分