diff --git a/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemCreatorThread.java b/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemCreatorThread.java index 233ae45..d084db0 100644 --- a/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemCreatorThread.java +++ b/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemCreatorThread.java @@ -39,6 +39,7 @@ public class SongItemCreatorThread extends SongLoaderThread { ItemStack newStack; if (stack.isEmpty()) { newStack = Items.PAPER.getDefaultStack(); + newStack.getOrCreateNbt().putInt("CustomModelData", 751642938); } else { newStack = stack.copy(); diff --git a/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemUtils.java b/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemUtils.java index 3916706..6e2510f 100644 --- a/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemUtils.java +++ b/src/main/java/com/github/hhhzzzsss/songplayer/item/SongItemUtils.java @@ -15,12 +15,8 @@ public class SongItemUtils { public static final String SONG_DATA_KEY = "SongData"; public static final String FILE_NAME_KEY = "FileName"; public static final String DISPLAY_NAME_KEY = "DisplayName"; - public static final String MODEL_KEY = "CustomModelData"; public static ItemStack createSongItem(ItemStack stack, byte[] songData, String filename, String displayName) { - NbtCompound songPlayerInitNbt = new NbtCompound(); - songPlayerInitNbt.putInt(MODEL_KEY, new Integer("751642938")); - stack.setNbt(songPlayerInitNbt); NbtCompound songPlayerNbt = new NbtCompound(); stack.setSubNbt(SONG_ITEM_KEY, songPlayerNbt); songPlayerNbt.putString(SONG_DATA_KEY, Base64.getEncoder().encodeToString(songData));