Thanks, that seemed to fix the registration issue.
Now a more obscure problem that I also ran into in 1.7 is that my sound event won't play. For context, I'm making a music disc. I don't see anything obviously wrong with my sounds.json or other music disc code, but I'm gonna post it here regardless.
sounds.json
{
"music_sandstorm": {
"category": "record",
"sounds": [
{
"name": "sandstorm:music/music_sandstorm",
"stream": true
}
]
}
}
RegistryHandler.java
@EventBusSubscriber
public class RegistryHandler {
//blocks
@SubscribeEvent
public static void registerSounds(RegistryEvent.Register<SoundEvent> event){
final SoundEvent[] soundEvents = {
new SoundEvent(new ResourceLocation(Sandstorm.MODID, "music_sandstorm")).setRegistryName("music_sandstorm")
};
event.getRegistry().registerAll(soundEvents);
}
@SubscribeEvent
public static void registerItems(Register<Item> event){
final Item[] items = {
new ItemSandstormRecord("recordSandstorm", SandstormSounds.music_sandstorm, "recordsandstorm")
};
event.getRegistry().registerAll(items);
}
}
ItemSandstormRecord.java
public class ItemSandstormRecord extends ItemRecord{
public ItemSandstormRecord(String unlocalizedName, SoundEvent soundIn, String registryName) {
super(unlocalizedName, soundIn);
setUnlocalizedName(Sandstorm.MODID + "." + unlocalizedName);
setRegistryName(registryName);
setCreativeTab(CreativeTabs.MISC);
}
}
Much appreciate any help