Search in sources :

Example 56 with AttributeModifier

use of net.minecraft.entity.ai.attributes.AttributeModifier in project Gaia-Dimension by Andromander.

the class GDCorruptWarriorSword method getItemAttributeModifiers.

// TODO: Make this sword special with effects. Make sure the effects look corrupt
// TODO: [FUTURE] Can be used to unlock Predator Dungeons
// We will need this in order to make the weapon slow
@Override
@Nonnull
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
    Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
    if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
        // This is not our speed anymore
        multimap.removeAll(SharedMonsterAttributes.ATTACK_SPEED.getName());
        // Speed is set to 0.5; 1.1 less than normal
        multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -3.5, 0));
    }
    return multimap;
}
Also used : AttributeModifier(net.minecraft.entity.ai.attributes.AttributeModifier) Nonnull(javax.annotation.Nonnull)

Example 57 with AttributeModifier

use of net.minecraft.entity.ai.attributes.AttributeModifier in project Gaia-Dimension by Andromander.

the class GDGaiaBaronSword method getItemAttributeModifiers.

// TODO: Make this sword special with effects
// TODO: [FUTURE] Can be used to unlock Unknown Stage 3 Final Boss Structure
// We will need this in order to make the weapon speedy
@Override
@Nonnull
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
    Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
    if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
        // This is not our speed anymore
        multimap.removeAll(SharedMonsterAttributes.ATTACK_SPEED.getName());
        // Speed is set to 2.2; 0.6 more than normal
        multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -1.8, 0));
    }
    return multimap;
}
Also used : AttributeModifier(net.minecraft.entity.ai.attributes.AttributeModifier) Nonnull(javax.annotation.Nonnull)

Example 58 with AttributeModifier

use of net.minecraft.entity.ai.attributes.AttributeModifier in project Gaia-Dimension by Andromander.

the class GDGaiaDuchessSword method getItemAttributeModifiers.

// TODO: Make this sword have projectiles, but lowers durability by 2
// TODO: [FUTURE] Can be used to unlock Unknown Stage 4 Final Boss Structure
// We will need this in order to make the weapon slow
@Override
@Nonnull
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
    Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
    if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
        // This is not our speed anymore
        multimap.removeAll(SharedMonsterAttributes.ATTACK_SPEED.getName());
        // Speed is set to 1.8; 0.2 less than normal
        multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -2.2, 0));
    }
    return multimap;
}
Also used : AttributeModifier(net.minecraft.entity.ai.attributes.AttributeModifier) Nonnull(javax.annotation.Nonnull)

Example 59 with AttributeModifier

use of net.minecraft.entity.ai.attributes.AttributeModifier in project Gaia-Dimension by Andromander.

the class GDGaiaDukeSword method getItemAttributeModifiers.

// TODO: Make this sword special with effects
// TODO: [FUTURE] Can be used to unlock Unknown Stage 2 Final Boss Structure
// We will need this in order to make the weapon slow
@Override
@Nonnull
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
    Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
    if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
        // This is not our speed anymore
        multimap.removeAll(SharedMonsterAttributes.ATTACK_SPEED.getName());
        // Speed is set to 1; 0.6 less than normal
        multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -3, 0));
    }
    return multimap;
}
Also used : AttributeModifier(net.minecraft.entity.ai.attributes.AttributeModifier) Nonnull(javax.annotation.Nonnull)

Example 60 with AttributeModifier

use of net.minecraft.entity.ai.attributes.AttributeModifier in project Gaia-Dimension by Andromander.

the class GDMalachiteGuardSword method getItemAttributeModifiers.

// TODO: Make this sword special with effects
// TODO: [FUTURE] Can be used to unlock Predator Dungeons
// We will need this in order to make the weapon slow
@Override
@Nonnull
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
    Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
    if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
        // This is not our speed anymore
        multimap.removeAll(SharedMonsterAttributes.ATTACK_SPEED.getName());
        // Speed is set to 1; 0.6 less than normal
        multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -3, 0));
    }
    return multimap;
}
Also used : AttributeModifier(net.minecraft.entity.ai.attributes.AttributeModifier) Nonnull(javax.annotation.Nonnull)

Aggregations

AttributeModifier (net.minecraft.entity.ai.attributes.AttributeModifier)115 Nonnull (javax.annotation.Nonnull)19 Multimap (com.google.common.collect.Multimap)14 IAttributeInstance (net.minecraft.entity.ai.attributes.IAttributeInstance)11 UUID (java.util.UUID)9 ItemStack (net.minecraft.item.ItemStack)9 IAttribute (net.minecraft.entity.ai.attributes.IAttribute)8 HashMultimap (com.google.common.collect.HashMultimap)6 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)5 Map (java.util.Map)4 EntityPlayer (net.minecraft.entity.player.EntityPlayer)4 EntityEquipmentSlot (net.minecraft.inventory.EntityEquipmentSlot)4 Potion (net.minecraft.potion.Potion)4 PotionEffect (net.minecraft.potion.PotionEffect)4 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)4 Calendar (java.util.Calendar)3 EnergyUpgrade (crazypants.enderio.base.item.darksteel.upgrade.energy.EnergyUpgrade)2 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 Iterator (java.util.Iterator)2