Skip to content

Commit dec570c

Browse files
committed
Add armor sounds, closes #3
1 parent 8a4c179 commit dec570c

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
apply plugin: 'net.minecraftforge.gradle.forge'
1919
apply plugin: 'org.spongepowered.mixin'
2020

21-
version = "1.12.2-1.1.0"
21+
version = "1.12.2-1.1.1"
2222
group = "mod.acgaming.extrasounds"
2323
archivesBaseName = "ExtraSounds"
2424

src/main/java/mod/acgaming/extrasounds/ExtraSounds.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class ExtraSounds
1313
{
1414
public static final String MODID = "extrasounds";
1515
public static final String NAME = "Extra Sounds";
16-
public static final String VERSION = "1.12.2-1.1.0";
16+
public static final String VERSION = "1.12.2-1.1.1";
1717
public static final String DEPENDENCIES = "required-after:mixinbooter;after:jei";
1818
public static final Logger LOGGER = LogManager.getLogger("ES");
1919

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import net.minecraft.client.Minecraft;
66
import net.minecraft.client.audio.PositionedSoundRecord;
77
import net.minecraft.init.SoundEvents;
8+
import net.minecraft.item.ItemArmor;
89
import net.minecraft.item.ItemFood;
910
import net.minecraft.item.ItemStack;
1011
import net.minecraft.util.SoundEvent;
@@ -93,6 +94,33 @@ else if (stackIn.getItem() instanceof ItemFood)
9394
{
9495
playSound(SoundEvents.BLOCK_SLIME_STEP, 2.0F, (float) ESConfig.soundVolume.esPickPlaceFoodSound);
9596
}
97+
else if (stackIn.getItem() instanceof ItemArmor)
98+
{
99+
if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.LEATHER))
100+
{
101+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 1.0F, 0.8F);
102+
}
103+
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.CHAIN))
104+
{
105+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 1.0F, 0.8F);
106+
}
107+
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.GOLD))
108+
{
109+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 1.0F, 0.8F);
110+
}
111+
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.IRON))
112+
{
113+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.0F, 0.8F);
114+
}
115+
else if (((ItemArmor) stackIn.getItem()).getArmorMaterial().equals(ItemArmor.ArmorMaterial.DIAMOND))
116+
{
117+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.8F);
118+
}
119+
else
120+
{
121+
playSound(SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 1.0F, 0.8F);
122+
}
123+
}
96124
else
97125
{
98126
playSound(SoundEvents.BLOCK_STONE_HIT, 2.0F, (float) ESConfig.soundVolume.esPickPlaceDefaultSound);

0 commit comments

Comments
 (0)