Cyp86
Members-
Posts
2 -
Joined
-
Last visited
Converted
-
Gender
Male
Cyp86's Achievements
Tree Puncher (2/8)
0
Reputation
-
Thank's that did work, I didn't understood that it was required in the json too.
-
I'm trying to create a custom disk for minecraft. Here is what i did: This is my new item (MyItemDisk) : public static final Item DISK_1 = new MyItemDisk("disk_1", Disks.DISK_1); This is my class MyItemDisk : public class MyItemDisk extends ItemRecord implements IHasModel { //IHasModel is for rendering public MyItemDisk(String name,SoundEvent sound) { super(name,sound); setRegistryName(name); setUnlocalizedName(name+".ctm"); setCreativeTab(CreativeTabs.SEARCH); //Because I have a custom creative tab with all the items that have ".ctm" in their unlocalized names ModItems.ITEMS.add(this); //to register the item } @Override //IHasModel public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } } Here is Disks.DISK_1 (the SoundEvent) : public class Disks { public static final SoundEvent DISK_1 = new SoundEvent(new ResourceLocation("ctm:records.disk_1")).setRegistryName("disk_1"); } And finally I register the SoundEvent : @SubscribeEvent public static void registerSoundEvents(RegistryEvent.Register<SoundEvent> event) { event.getRegistry().register(Disks.DISK_1); } And here is my sounds.json : { "records.disk_1": { "category": "record", "sounds": [ { "name": "records/disk_1", "stream": true } ] } } I checked the other thread that I could found and most of the time, the problem was with a wrong folder name but I don't think that it's my issue, is it ? (ps:the sound is in ogg format in "\src\main\resources\assets\ctm\sounds\records") Here is what my folder looks like : And the error :