mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Fixed missing sound when equiping the bangle and amulets
This commit is contained in:
parent
fe831f3099
commit
c3af3f9631
2 changed files with 14 additions and 0 deletions
|
@ -18,8 +18,10 @@ import net.minecraft.entity.EquipmentSlot;
|
|||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.attribute.EntityAttribute;
|
||||
import net.minecraft.entity.attribute.EntityAttributeModifier;
|
||||
import net.minecraft.item.ArmorMaterials;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.minecraft.text.StringVisitable;
|
||||
|
@ -74,6 +76,11 @@ public class AmuletItem extends WearableItem {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEvent getEquipSound() {
|
||||
return ArmorMaterials.IRON.getEquipSound();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EquipmentSlot getPreferredSlot(ItemStack stack) {
|
||||
return EquipmentSlot.CHEST;
|
||||
|
|
|
@ -6,9 +6,11 @@ import net.minecraft.entity.EquipmentSlot;
|
|||
import net.minecraft.entity.mob.MobEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ArmorItem;
|
||||
import net.minecraft.item.ArmorMaterials;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Wearable;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -38,6 +40,11 @@ public abstract class WearableItem extends Item implements Wearable {
|
|||
return TypedActionResult.fail(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEvent getEquipSound() {
|
||||
return ArmorMaterials.LEATHER.getEquipSound();
|
||||
}
|
||||
|
||||
public EquipmentSlot getPreferredSlot(ItemStack stack) {
|
||||
return EquipmentSlot.OFFHAND;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue