diff --git a/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java b/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java index 178ebc3..07c960c 100644 --- a/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java +++ b/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java @@ -5,6 +5,7 @@ import baubles.api.BaublesApi; import mod.icarus.crimsonrevelations.NewCrimsonRevelations; import mod.icarus.crimsonrevelations.init.CRItems; +import mod.icarus.crimsonrevelations.init.CRSoundEvents; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -17,12 +18,10 @@ import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.registry.GameRegistry; -import thaumcraft.common.lib.SoundsTC; @EventBusSubscriber(modid = NewCrimsonRevelations.MODID) @GameRegistry.ObjectHolder(NewCrimsonRevelations.MODID) public class CREvents { - // TODO: Custom sounds @SubscribeEvent public static void onHurtEvent(LivingHurtEvent event) { World world = event.getEntity().world; @@ -35,7 +34,7 @@ public static void onHurtEvent(LivingHurtEvent event) { // Kinetic Girdle of Shielding - Explodes when the Runic Shielding is pierced (20 second cooldown). if (charge > 0) { if (charge <= event.getAmount() && BaublesApi.isBaubleEquipped(player, CRItems.runicGirdleKinetic) > 2 && !(player.getCooldownTracker().hasCooldown(CRItems.runicGirdleKinetic))) { - player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); + player.world.playSound(null, player.posX, player.posY, player.posZ, CRSoundEvents.RUNIC_BAUBLE_KINETIC, SoundCategory.PLAYERS, 0.8F, 1.0F); player.world.createExplosion(player, player.posX, player.posY + player.height / 2.0F, player.posZ, 2.0F, false); List entities = player.world.getEntitiesWithinAABBExcludingEntity(player, player.getEntityBoundingBox().grow(3.0D, 3.0D, 3.0D)); @@ -53,25 +52,25 @@ public static void onHurtEvent(LivingHurtEvent event) { // Revitalizing Ring of Shielding - Gives 6 seconds of Regeneration II when the Runic Shielding is pierced (20 second cooldown). if (charge <= event.getAmount() && BaublesApi.isBaubleEquipped(player, CRItems.runicRingRegen) > 0 && !(player.getCooldownTracker().hasCooldown(CRItems.runicRingRegen))) { - player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); + player.world.playSound(null, player.posX, player.posY, player.posZ, CRSoundEvents.RUNIC_BAUBLE_REGEN, SoundCategory.PLAYERS, 1.5F, 1.0F); player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 6 * 20, 1, true, true)); ((EntityPlayer) player).addStat(StatList.getObjectUseStats(CRItems.runicRingRegen)); ((EntityPlayer) player).getCooldownTracker().setCooldown(CRItems.runicRingRegen, 20 * 20); } - // Amulet of Emergency Shielding - Gives 8 points of Runic Shielding when the Runic Shielding is pierced (1 minute cooldown). + // Amulet of Emergency Shielding - Gives 8 points of Runic Shielding when the Runic Shielding is pierced (40 second cooldown). if (charge <= event.getAmount() && BaublesApi.isBaubleEquipped(player, CRItems.runicAmuletEmergency) > -1 && !(player.getCooldownTracker().hasCooldown(CRItems.runicAmuletEmergency))) { - player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); + player.world.playSound(null, player.posX, player.posY, player.posZ, CRSoundEvents.RUNIC_BAUBLE_EMERGENCY, SoundCategory.PLAYERS, 1.0F, 1.0F); player.setAbsorptionAmount(charge + 8); ((EntityPlayer) player).addStat(StatList.getObjectUseStats(CRItems.runicAmuletEmergency)); - ((EntityPlayer) player).getCooldownTracker().setCooldown(CRItems.runicAmuletEmergency, 60 * 20); + ((EntityPlayer) player).getCooldownTracker().setCooldown(CRItems.runicAmuletEmergency, 40 * 20); } // Charged Ring of Shielding - 25% chance to give 1 point of Runic Shielding, often restoring the Runic Shielding lost from damage. if (BaublesApi.isBaubleEquipped(player, CRItems.runicRingCharged) > 0 && !(player.getCooldownTracker().hasCooldown(CRItems.runicRingCharged)) && player.world.rand.nextDouble() <= 0.25D) { - player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); + player.world.playSound(null, player.posX, player.posY, player.posZ, CRSoundEvents.RUNIC_BAUBLE_CHARGE, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); player.setAbsorptionAmount(charge + 1); ((EntityPlayer) player).addStat(StatList.getObjectUseStats(CRItems.runicRingCharged)); diff --git a/src/main/java/mod/icarus/crimsonrevelations/init/CRSoundEvents.java b/src/main/java/mod/icarus/crimsonrevelations/init/CRSoundEvents.java index e1cd7a6..3535628 100644 --- a/src/main/java/mod/icarus/crimsonrevelations/init/CRSoundEvents.java +++ b/src/main/java/mod/icarus/crimsonrevelations/init/CRSoundEvents.java @@ -9,4 +9,8 @@ public class CRSoundEvents { public static final SoundEvent FOCUS_BLINDING_LIGHT_HIT = new SoundEvent(new ResourceLocation(NewCrimsonRevelations.MODID, "focus.blinding_light.hit")); public static final SoundEvent FOCUS_BLINDING_LIGHT_SHOOT = new SoundEvent(new ResourceLocation(NewCrimsonRevelations.MODID, "focus.blinding_light.shoot")); + public static final SoundEvent RUNIC_BAUBLE_CHARGE = new SoundEvent(new ResourceLocation(NewCrimsonRevelations.MODID, "bauble.runic.charge")); + public static final SoundEvent RUNIC_BAUBLE_EMERGENCY = new SoundEvent(new ResourceLocation(NewCrimsonRevelations.MODID, "bauble.runic.emergency")); + public static final SoundEvent RUNIC_BAUBLE_KINETIC = new SoundEvent(new ResourceLocation(NewCrimsonRevelations.MODID, "bauble.runic.kinetic")); + public static final SoundEvent RUNIC_BAUBLE_REGEN = new SoundEvent(new ResourceLocation(NewCrimsonRevelations.MODID, "bauble.runic.regen")); } diff --git a/src/main/resources/assets/crimsonrevelations/sounds.json b/src/main/resources/assets/crimsonrevelations/sounds.json index 2247a15..263011e 100644 --- a/src/main/resources/assets/crimsonrevelations/sounds.json +++ b/src/main/resources/assets/crimsonrevelations/sounds.json @@ -8,5 +8,25 @@ "sounds": [ "crimsonrevelations:foci/blinding_light/shoot" ] + }, + "bauble.runic.charge": { + "sounds": [ + "crimsonrevelations:bauble/runic/charge" + ] + }, + "bauble.runic.emergency": { + "sounds": [ + "crimsonrevelations:bauble/runic/emergency" + ] + }, + "bauble.runic.kinetic": { + "sounds": [ + "crimsonrevelations:bauble/runic/kinetic" + ] + }, + "bauble.runic.regen": { + "sounds": [ + "crimsonrevelations:bauble/runic/regen" + ] } } diff --git a/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/charge.ogg b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/charge.ogg new file mode 100644 index 0000000..62ad295 Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/charge.ogg differ diff --git a/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/emergency.ogg b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/emergency.ogg new file mode 100644 index 0000000..4b0c6f1 Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/emergency.ogg differ diff --git a/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/kinetic.ogg b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/kinetic.ogg new file mode 100644 index 0000000..0ed48ba Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/kinetic.ogg differ diff --git a/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/regen.ogg b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/regen.ogg new file mode 100644 index 0000000..fa8fa6c Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/sounds/bauble/runic/regen.ogg differ