Skip to content

Commit ba6db2b

Browse files
committed
Configurable armor sounds
1 parent 4b01b1d commit ba6db2b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/main/java/mod/acgaming/extrasounds/config/ESConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ public static class SoundVolume
106106
@Config.Comment("Volume of the sound when picking and placing snow items in GUIs")
107107
public double esPickPlaceSnowSound = 0.6;
108108

109+
@Config.Name("Armor Item Pick/Place Sound Volume")
110+
@Config.Comment("Volume of the sound when picking and placing armor items in GUIs")
111+
public double esPickPlaceArmorSound = 0.8;
112+
109113
@Config.Name("Food Item Pick/Place Sound Volume")
110114
@Config.Comment("Volume of the sound when picking and placing food items in GUIs")
111115
public double esPickPlaceFoodSound = 0.2;

src/main/java/mod/acgaming/extrasounds/sound/ESSoundManager.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,27 @@ else if (stackIn.getItem() instanceof ItemArmor)
108108
{
109109
if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.LEATHER))
110110
{
111-
playSound(SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 1.0F, 0.8F);
111+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 1.0F, (float) ESConfig.soundVolume.esPickPlaceArmorSound);
112112
}
113113
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.CHAIN))
114114
{
115-
playSound(SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 1.0F, 0.8F);
115+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 1.0F, (float) ESConfig.soundVolume.esPickPlaceArmorSound);
116116
}
117117
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.GOLD))
118118
{
119-
playSound(SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 1.0F, 0.8F);
119+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 1.0F, (float) ESConfig.soundVolume.esPickPlaceArmorSound);
120120
}
121121
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.IRON))
122122
{
123-
playSound(SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.0F, 0.8F);
123+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.0F, (float) ESConfig.soundVolume.esPickPlaceArmorSound);
124124
}
125125
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.DIAMOND))
126126
{
127-
playSound(SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.8F);
127+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, (float) ESConfig.soundVolume.esPickPlaceArmorSound);
128128
}
129129
else
130130
{
131-
playSound(SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 1.0F, 0.8F);
131+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 1.0F, (float) ESConfig.soundVolume.esPickPlaceArmorSound);
132132
}
133133
}
134134
else

0 commit comments

Comments
 (0)