package com.minelittlepony.unicopia.item; import java.util.UUID; import com.google.common.collect.Multimap; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.attribute.EntityAttribute; import net.minecraft.entity.attribute.EntityAttributeModifier; import net.minecraft.item.Item; public class BluntWeaponItem extends Item { private final Multimap modifiers; public static final UUID KNOCKBACK_MODIFIER_ID = UUID.fromString("7b16994b-1edb-4381-be62-94317f39ec8f"); public static final UUID LUCK_MODIFIER_ID = UUID.fromString("7b16994b-1edb-8431-be62-7f39ec94318f"); public BluntWeaponItem(Settings settings, Multimap modifiers) { super(settings); this.modifiers = modifiers; } @Override public Multimap getAttributeModifiers(EquipmentSlot slot) { if (slot == EquipmentSlot.OFFHAND) { return modifiers; } return super.getAttributeModifiers(slot); } }