diff --git a/src/main/java/com/github/hhhzzzsss/songplayer/SongPlayer.java b/src/main/java/com/github/hhhzzzsss/songplayer/SongPlayer.java index 675c5f1..da6c24c 100644 --- a/src/main/java/com/github/hhhzzzsss/songplayer/SongPlayer.java +++ b/src/main/java/com/github/hhhzzzsss/songplayer/SongPlayer.java @@ -2,7 +2,9 @@ package com.github.hhhzzzsss.songplayer; import net.fabricmc.api.ModInitializer; import net.minecraft.block.Block; +import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.block.enums.Instrument; import net.minecraft.client.MinecraftClient; import net.minecraft.entity.Entity; import net.minecraft.text.Text; @@ -10,10 +12,12 @@ import net.minecraft.text.Text; import java.nio.file.Files; import java.nio.file.Path; +import static net.minecraft.block.NoteBlock.*; + public class SongPlayer implements ModInitializer { public static final MinecraftClient MC = MinecraftClient.getInstance(); - public static final int NOTEBLOCK_BASE_ID = Block.getRawIdFromState(Blocks.NOTE_BLOCK.getDefaultState()); + public static final int NOTEBLOCK_BASE_ID = Block.getRawIdFromState(Blocks.NOTE_BLOCK.getDefaultState())-1; public static final Path SONG_DIR = Path.of("songs"); public static final Path SONGPLAYER_DIR = Path.of("SongPlayer");