JYT-copy/dsh-minecraft-ui ↗★ 1

dsh-minecraft-ui

为网页端提供我的世界风格主题、音效及壁纸播放列表。 适合喜欢像素风格、想要为对话界面增添游戏音效与动态壁纸的用户。

套件
dsh-minecraft-ui
相容性
待驗證
版本
1.0.1
授權
MIT
最近更新
2026年10月21日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JYT-copy/dsh-minecraft-ui

4. 配置默认值

{
  enabled: true,
  wallpaper: { auto: true, intervalSec: 300, sceneId: 'photo-cozy-cabin', dim: 0, gain: 1.18, blur: 0 },
  sfx:       { enabled: true, volume: 0.55 },
  bgm:       { enabled: false, volume: 0.22, trackId: '' },
  ui:        { glass: 0.5, achievements: true, hudHidden: false, hudDrop: 28 }
}

存在 localStorage(键 dsh-minecraft-ui:options,带 __v 版本号);数值在读取与写入时都会被夹到合法区间, 手改 localStorage 也不会把界面弄坏。

控制台 API

页面里始终挂着 window.MinecraftUI(主题关闭时也在,便于排查):

MinecraftUI.options()                      // 当前全部配置
MinecraftUI.set({ wallpaper: { gain: 1.3, dim: 0 } })
MinecraftUI.reset()
MinecraftUI.listWallpapers()               // [{ id, name, kind }](我的 + 目录)
MinecraftUI.listUserWallpapers()           // 只有上传的
MinecraftUI.setWallpaper('photo-cozy-cabin')
MinecraftUI.nextWallpaper()
MinecraftUI.deleteWallpaper('user-xxxx')
MinecraftUI.refreshUserWallpapers()
MinecraftUI.listBgmTracks()                // [{ id, name, source: 'file' | 'user' }]
MinecraftUI.listUserMusic()                // 只有上传的音乐
MinecraftUI.setBgmTrack('')
MinecraftUI.nextBgmTrack()
MinecraftUI.refreshUserMusic()
MinecraftUI.deleteUserMusic('user-music-xxxx')
MinecraftUI.toggleTheme()
MinecraftUI.showHud(false)                 // 隐藏控制台;true 恢复
MinecraftUI.setHudDrop(28)                 // 控制台底距(px)
MinecraftUI.audio                          // 直接拿音频引擎