Change default behaviour of Spell#createSoundWithSuffix to point to assets/modid/sounds.json rather than assets/ebwizardry/sounds.json, so addons don't have to override it
This commit is contained in:
@@ -133,10 +133,17 @@ public final class WizardrySounds {
|
||||
public static final SoundEvent MISC_PAGE_TURN = createSound("misc.page_turn");
|
||||
public static final SoundEvent MISC_FREEZE = createSound("misc.freeze");
|
||||
|
||||
/** Trick borrowed from the Twilight Forest, makes things neater. */
|
||||
// Trick borrowed from the Twilight Forest, makes things neater.
|
||||
|
||||
/** Overload for {@link WizardrySounds#createSound(String, String)} which assigns wizardry's mod ID automatically. */
|
||||
public static SoundEvent createSound(String name){
|
||||
return createSound(Wizardry.MODID, name);
|
||||
}
|
||||
|
||||
/** Creates a sound with the given name, to be read from {@code assets/[modID]/sounds.json}. */
|
||||
public static SoundEvent createSound(String modID, String name){
|
||||
// All the setRegistryName methods delegate to this one, it doesn't matter which you use.
|
||||
return new SoundEvent(new ResourceLocation(Wizardry.MODID, name)).setRegistryName(name);
|
||||
return new SoundEvent(new ResourceLocation(modID, name)).setRegistryName(name);
|
||||
}
|
||||
|
||||
// For some reason, sound events seem to work even when they aren't registered, without even so much as a warning.
|
||||
|
||||
Reference in New Issue
Block a user