@occultus/music-api 0.22.0-beta.1 → 0.22.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occultus/music-api",
3
- "version": "0.22.0-beta.1",
3
+ "version": "0.22.0-beta.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://codeberg.org/TeamOccultus/StarTenonAPI"
@@ -2,7 +2,7 @@ export type MusicDiscComponentParams = {
2
2
  /**
3
3
  * 音轨名称
4
4
  */
5
- trackName: string;
5
+ track_name: string;
6
6
  /**
7
7
  * 音乐唱片名称
8
8
  */
@@ -10,7 +10,7 @@ export class MusicDiscServerBindings {
10
10
  const config = MusicDiscServerBindings.getInstance().config;
11
11
  const params = itemStack.getComponent(config.componentName)
12
12
  ?.customComponentParameters.params as MusicDiscComponentParams;
13
- return params.trackName;
13
+ return params.track_name;
14
14
  }
15
15
  private registryComponent(config: MusicDiscBindingConfig) {
16
16
  system.beforeEvents.startup.subscribe((arg) => {
@@ -20,7 +20,7 @@ export class MusicDiscServerBindings {
20
20
  if (block?.typeId !== "minecraft:jukebox") return;
21
21
  if (source?.isSneaking) return;
22
22
  const params = arg1.params as MusicDiscComponentParams;
23
- block.dimension.playSound(params.trackName, block.location);
23
+ block.dimension.playSound(params.track_name, block.location);
24
24
  block.dimension
25
25
  .getPlayers({
26
26
  location: block.location,