diff --git a/src/main/java/org/cyclops/integrateddynamics/Configs.java b/src/main/java/org/cyclops/integrateddynamics/Configs.java index bf00b9e8853..91d505d10d9 100644 --- a/src/main/java/org/cyclops/integrateddynamics/Configs.java +++ b/src/main/java/org/cyclops/integrateddynamics/Configs.java @@ -29,6 +29,8 @@ import org.cyclops.integrateddynamics.recipe.RecipeSerializerCraftingSpecialShapedOmniDirectional3Config; import org.cyclops.integrateddynamics.recipe.RecipeSerializerCraftingSpecialShapedOmniDirectionalConfig; import org.cyclops.integrateddynamics.recipe.RecipeSerializerCraftingSpecialShapelessOmniDirectionalConfig; +import org.cyclops.integrateddynamics.sound.SoundEventEffectPageFlipMultipleConfig; +import org.cyclops.integrateddynamics.sound.SoundEventEffectPageFlipSingleConfig; import org.cyclops.integrateddynamics.world.gen.foliageplacer.FoliagePlacerMenrilConfig; import org.cyclops.integrateddynamics.world.gen.trunkplacer.TrunkPlacerMenrilConfig; @@ -183,6 +185,10 @@ public static void registerBlocks(ConfigHandler configHandler) { configHandler.addConfigurable(new LootFunctionCopyMechanicalMachineEnergyConfig()); configHandler.addConfigurable(new LootFunctionCopyMechanicalSqueezerTankConfig()); configHandler.addConfigurable(new LootFunctionCopyProxyIdConfig()); + + // Sounds + configHandler.addConfigurable(new SoundEventEffectPageFlipMultipleConfig()); + configHandler.addConfigurable(new SoundEventEffectPageFlipSingleConfig()); } } diff --git a/src/main/java/org/cyclops/integrateddynamics/RegistryEntries.java b/src/main/java/org/cyclops/integrateddynamics/RegistryEntries.java index 44196698a4e..977c2844909 100644 --- a/src/main/java/org/cyclops/integrateddynamics/RegistryEntries.java +++ b/src/main/java/org/cyclops/integrateddynamics/RegistryEntries.java @@ -152,8 +152,8 @@ public class RegistryEntries { public static final DeferredHolder, SimpleCraftingRecipeSerializer> RECIPESERIALIZER_FACADE = DeferredHolder.create(Registries.RECIPE_SERIALIZER, new ResourceLocation("integrateddynamics:crafting_special_facade")); public static final DeferredHolder, SimpleCraftingRecipeSerializer> RECIPESERIALIZER_VARIABLE_COPY = DeferredHolder.create(Registries.RECIPE_SERIALIZER, new ResourceLocation("integrateddynamics:crafting_special_variable_copy")); - public static final DeferredHolder SOUNDEVENT_EFFECT_PAGE_FLIPSINGLE = DeferredHolder.create(Registries.SOUND_EVENT, new ResourceLocation("item.book.page_turn")); - public static final DeferredHolder SOUNDEVENT_EFFECT_PAGE_FLIPMULTIPLE = DeferredHolder.create(Registries.SOUND_EVENT, new ResourceLocation("item.book.put")); + public static final DeferredHolder SOUNDEVENT_EFFECT_PAGE_FLIPSINGLE = DeferredHolder.create(Registries.SOUND_EVENT, new ResourceLocation("integrateddynamics:effect_page_flipsingle")); + public static final DeferredHolder SOUNDEVENT_EFFECT_PAGE_FLIPMULTIPLE = DeferredHolder.create(Registries.SOUND_EVENT, new ResourceLocation("integrateddynamics:effect_page_flipmultiple")); } diff --git a/src/main/java/org/cyclops/integrateddynamics/sound/SoundEventEffectPageFlipMultipleConfig.java b/src/main/java/org/cyclops/integrateddynamics/sound/SoundEventEffectPageFlipMultipleConfig.java new file mode 100644 index 00000000000..9e6193c8884 --- /dev/null +++ b/src/main/java/org/cyclops/integrateddynamics/sound/SoundEventEffectPageFlipMultipleConfig.java @@ -0,0 +1,18 @@ +package org.cyclops.integrateddynamics.sound; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvent; +import org.cyclops.integrateddynamics.IntegratedDynamics; + +/** + * @author rubensworks + */ +public class SoundEventEffectPageFlipMultipleConfig extends org.cyclops.cyclopscore.config.extendedconfig.SoundEventConfig { + public SoundEventEffectPageFlipMultipleConfig() { + super( + IntegratedDynamics._instance, + "effect_page_flipmultiple", + (eConfig) -> SoundEvent.createVariableRangeEvent(new ResourceLocation(eConfig.getMod().getModId(), eConfig.getNamedId())) + ); + } +} diff --git a/src/main/java/org/cyclops/integrateddynamics/sound/SoundEventEffectPageFlipSingleConfig.java b/src/main/java/org/cyclops/integrateddynamics/sound/SoundEventEffectPageFlipSingleConfig.java new file mode 100644 index 00000000000..842f37f1d5a --- /dev/null +++ b/src/main/java/org/cyclops/integrateddynamics/sound/SoundEventEffectPageFlipSingleConfig.java @@ -0,0 +1,18 @@ +package org.cyclops.integrateddynamics.sound; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvent; +import org.cyclops.integrateddynamics.IntegratedDynamics; + +/** + * @author rubensworks + */ +public class SoundEventEffectPageFlipSingleConfig extends org.cyclops.cyclopscore.config.extendedconfig.SoundEventConfig { + public SoundEventEffectPageFlipSingleConfig() { + super( + IntegratedDynamics._instance, + "effect_page_flipsingle", + (eConfig) -> SoundEvent.createVariableRangeEvent(new ResourceLocation(eConfig.getMod().getModId(), eConfig.getNamedId())) + ); + } +} diff --git a/src/main/resources/assets/integrateddynamics/sounds.json b/src/main/resources/assets/integrateddynamics/sounds.json index 92a76431301..e3df76afac8 100644 --- a/src/main/resources/assets/integrateddynamics/sounds.json +++ b/src/main/resources/assets/integrateddynamics/sounds.json @@ -1,5 +1,5 @@ { - "effect.page.flipsingle": { + "effect_page_flipsingle": { "sounds": [ "integrateddynamics:page_flip1", "integrateddynamics:page_flip2", @@ -7,7 +7,7 @@ ], "subtitle": "subtitles.integrateddynamics.effect.page.flipsingle" }, - "effect.page.flipmultiple": { + "effect_page_flipmultiple": { "sounds": [ "integrateddynamics:pages_flip" ],