use of net.minecraft.entity.ai.attributes.AttributeModifier in project BloodMagic by WayofTime.
the class LivingArmourUpgradeKnockbackResist method getAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers() {
Multimap<String, AttributeModifier> modifierMap = HashMultimap.create();
String name = getUniqueIdentifier() + "-KnockbackModifier1";
modifierMap.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getName(), new AttributeModifier(UUID.nameUUIDFromBytes(StringUtils.getBytesUtf8(name)), "KnockbackModifier1", kbModifier[this.level], 0));
if (healthModifier[this.level] > 0) {
name = getUniqueIdentifier() + "-HealthModifier1";
modifierMap.put(SharedMonsterAttributes.MAX_HEALTH.getName(), new AttributeModifier(UUID.nameUUIDFromBytes(StringUtils.getBytesUtf8(name)), "HealthModifier1", healthModifier[this.level], 0));
}
return modifierMap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project BloodMagic by WayofTime.
the class LivingArmourUpgradeMeleeDamage method getAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers() {
Multimap<String, AttributeModifier> modifierMap = HashMultimap.create();
String name = getUniqueIdentifier() + "-DamageModifier1";
modifierMap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(UUID.nameUUIDFromBytes(StringUtils.getBytesUtf8(name)), "DamageModifier1", meleeDamage[this.level], 0));
return modifierMap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project BloodMagic by WayofTime.
the class LivingArmourUpgradeSlowness method getAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers() {
Multimap<String, AttributeModifier> modifierMap = HashMultimap.create();
String name = getUniqueIdentifier() + "-SpeedModifier1";
modifierMap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getName(), new AttributeModifier(UUID.nameUUIDFromBytes(StringUtils.getBytesUtf8(name)), "SpeedModifier1", speedModifier[this.level], 1));
return modifierMap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project BloodMagic by WayofTime.
the class ItemBoundPickaxe method getAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot equipmentSlot, ItemStack stack) {
Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getActivated(stack) ? 5 : 2, 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool modifier", -2.5, 0));
}
return multimap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project BloodMagic by WayofTime.
the class ItemBoundShovel method getItemAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", 5, 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool modifier", -2.5, 0));
}
return multimap;
}
Aggregations