|
5 | 5 | import net.minecraft.client.Minecraft; |
6 | 6 | import net.minecraft.client.audio.PositionedSoundRecord; |
7 | 7 | import net.minecraft.init.SoundEvents; |
| 8 | +import net.minecraft.item.ItemArmor; |
8 | 9 | import net.minecraft.item.ItemFood; |
9 | 10 | import net.minecraft.item.ItemStack; |
10 | 11 | import net.minecraft.util.SoundEvent; |
@@ -93,6 +94,33 @@ else if (stackIn.getItem() instanceof ItemFood) |
93 | 94 | { |
94 | 95 | playSound(SoundEvents.BLOCK_SLIME_STEP, 2.0F, (float) ESConfig.soundVolume.esPickPlaceFoodSound); |
95 | 96 | } |
| 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 | + } |
96 | 124 | else |
97 | 125 | { |
98 | 126 | playSound(SoundEvents.BLOCK_STONE_HIT, 2.0F, (float) ESConfig.soundVolume.esPickPlaceDefaultSound); |
|
0 commit comments