Java 类net.minecraft.entity.ai.attributes.AbstractAttributeMap 实例源码

项目:Backmemed    文件:SharedMonsterAttributes.java   
public static void setAttributeModifiers(AbstractAttributeMap map, NBTTagList list)
{
    for (int i = 0; i < list.tagCount(); ++i)
    {
        NBTTagCompound nbttagcompound = list.getCompoundTagAt(i);
        IAttributeInstance iattributeinstance = map.getAttributeInstanceByName(nbttagcompound.getString("Name"));

        if (iattributeinstance == null)
        {
            LOGGER.warn("Ignoring unknown attribute \'{}\'", new Object[] {nbttagcompound.getString("Name")});
        }
        else
        {
            applyModifiersToAttributeInstance(iattributeinstance, nbttagcompound);
        }
    }
}
项目:CustomWorldGen    文件:SharedMonsterAttributes.java   
public static void setAttributeModifiers(AbstractAttributeMap map, NBTTagList list)
{
    for (int i = 0; i < list.tagCount(); ++i)
    {
        NBTTagCompound nbttagcompound = list.getCompoundTagAt(i);
        IAttributeInstance iattributeinstance = map.getAttributeInstanceByName(nbttagcompound.getString("Name"));

        if (iattributeinstance != null)
        {
            applyModifiersToAttributeInstance(iattributeinstance, nbttagcompound);
        }
        else
        {
            LOGGER.warn("Ignoring unknown attribute \'{}\'", new Object[] {nbttagcompound.getString("Name")});
        }
    }
}
项目:Gravestone-mod-Extended    文件:HorseCorpseHelper.java   
public static void setNbt(AbstractHorse horse, NBTTagCompound nbt) {
    setName(horse, nbt);

    EnumHorseType horseType = getHorseType(horse);
    nbt.setInteger("HorseType", horseType.ordinal());

    int variant = 0;
    if (horseType == EnumHorseType.HORSE) {
        variant = ((EntityHorse) horse).getHorseVariant();
    }
    nbt.setInteger("Variant", variant);

    AbstractAttributeMap attrMap = horse.getAttributeMap();
    nbt.setDouble("Max Health", attrMap.getAttributeInstanceByName("Max Health").getAttributeValue());
    nbt.setDouble("Movement Speed", attrMap.getAttributeInstanceByName("Movement Speed").getAttributeValue());
    nbt.setDouble("Jump Strength", attrMap.getAttributeInstanceByName("Jump Strength").getAttributeValue());
}
项目:Nuclear-Foundation    文件:CustomPotion.java   
@Override
public void applyAttributesModifiersToEntity(EntityLivingBase entity,
        AbstractAttributeMap attributeMapIn, int amplifier) {
    if(this==PotionRegistry.Radiation){
        entity.getActivePotionEffect(PotionRegistry.Radiation).getCurativeItems().clear();
    }
    if(this==PotionRegistry.Arsenic){
        entity.getActivePotionEffect(PotionRegistry.Arsenic).getCurativeItems().clear();
    }
    if(this==PotionRegistry.Hydrargyrum){
        entity.getActivePotionEffect(PotionRegistry.Hydrargyrum).getCurativeItems().clear();
    }
    if(this==PotionRegistry.CarbonMonoxyde){
        entity.getActivePotionEffect(PotionRegistry.CarbonMonoxyde).getCurativeItems().clear();
    }
}
项目:ExpandedRailsMod    文件:SharedMonsterAttributes.java   
public static void setAttributeModifiers(AbstractAttributeMap map, NBTTagList list)
{
    for (int i = 0; i < list.tagCount(); ++i)
    {
        NBTTagCompound nbttagcompound = list.getCompoundTagAt(i);
        IAttributeInstance iattributeinstance = map.getAttributeInstanceByName(nbttagcompound.getString("Name"));

        if (iattributeinstance != null)
        {
            applyModifiersToAttributeInstance(iattributeinstance, nbttagcompound);
        }
        else
        {
            LOGGER.warn("Ignoring unknown attribute \'{}\'", new Object[] {nbttagcompound.getString("Name")});
        }
    }
}
项目:Bewitchment    文件:BrewAtributeModifier.java   
public void applyAttributeModifiers(AbstractAttributeMap attributeMap, int amplifier) {
    for (Map.Entry<IAttribute, AttributeModifier> entry : modifierMap.entrySet()) {
        IAttributeInstance attribute = attributeMap.getAttributeInstance(entry.getKey());
        if (attribute == null) continue;

        AttributeModifier modifier = entry.getValue();
        attribute.removeModifier(modifier);
        attribute.applyModifier(new AttributeModifier(modifier.getID(), this.getName() + " " + amplifier, modifier.getAmount() * (double) (amplifier + 1), modifier.getOperation()));
    }
}
项目:Bewitchment    文件:BrewAtributeModifier.java   
public void removeAttributeModifiers(AbstractAttributeMap attributeMapIn, int amplifier) {
    for (Map.Entry<IAttribute, AttributeModifier> entry : modifierMap.entrySet()) {
        IAttributeInstance attribute = attributeMapIn.getAttributeInstance(entry.getKey());
        if (attribute == null) continue;

        attribute.removeModifier(entry.getValue());
    }
}
项目:UniversalRemote    文件:EntityPlayerMPProxy.java   
@Override
public AbstractAttributeMap getAttributeMap() {
    if (m_realPlayer == null) {
        return super.getAttributeMap();
    } else {
        syncToRealPlayer();
        return syncPublicFieldsFromRealAndReturn(m_realPlayer.getAttributeMap());
    }
}
项目:UniversalRemote    文件:EntityPlayerProxy.java   
@Override
public AbstractAttributeMap getAttributeMap() {
    if (m_realPlayer == null) {
        return super.getAttributeMap();
    } else {
        return m_realPlayer.getAttributeMap();
    }
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
/**
 * Updates en entity's attributes and their respective modifiers, which are used for speed bonusses (player
 * sprinting, animals fleeing, baby speed), weapon/tool attackDamage, hostiles followRange randomization, zombie
 * maxHealth and knockback resistance as well as reinforcement spawning chance.
 */
public void handleEntityProperties(SPacketEntityProperties packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId());

    if (entity != null)
    {
        if (!(entity instanceof EntityLivingBase))
        {
            throw new IllegalStateException("Server tried to update attributes of a non-living entity (actually: " + entity + ")");
        }
        else
        {
            AbstractAttributeMap abstractattributemap = ((EntityLivingBase)entity).getAttributeMap();

            for (SPacketEntityProperties.Snapshot spacketentityproperties$snapshot : packetIn.getSnapshots())
            {
                IAttributeInstance iattributeinstance = abstractattributemap.getAttributeInstanceByName(spacketentityproperties$snapshot.getName());

                if (iattributeinstance == null)
                {
                    iattributeinstance = abstractattributemap.registerAttribute(new RangedAttribute((IAttribute)null, spacketentityproperties$snapshot.getName(), 0.0D, 2.2250738585072014E-308D, Double.MAX_VALUE));
                }

                iattributeinstance.setBaseValue(spacketentityproperties$snapshot.getBaseValue());
                iattributeinstance.removeAllModifiers();

                for (AttributeModifier attributemodifier : spacketentityproperties$snapshot.getModifiers())
                {
                    iattributeinstance.applyModifier(attributemodifier);
                }
            }
        }
    }
}
项目:Backmemed    文件:EntityLivingBase.java   
/**
 * Returns this entity's attribute map (where all its attributes are stored)
 */
public AbstractAttributeMap getAttributeMap()
{
    if (this.attributeMap == null)
    {
        this.attributeMap = new AttributeMap();
    }

    return this.attributeMap;
}
项目:Backmemed    文件:SharedMonsterAttributes.java   
/**
 * Creates an NBTTagList from a BaseAttributeMap, including all its AttributeInstances
 */
public static NBTTagList writeBaseAttributeMapToNBT(AbstractAttributeMap map)
{
    NBTTagList nbttaglist = new NBTTagList();

    for (IAttributeInstance iattributeinstance : map.getAllAttributes())
    {
        nbttaglist.appendTag(writeAttributeInstanceToNBT(iattributeinstance));
    }

    return nbttaglist;
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
/**
 * Updates en entity's attributes and their respective modifiers, which are used for speed bonusses (player
 * sprinting, animals fleeing, baby speed), weapon/tool attackDamage, hostiles followRange randomization, zombie
 * maxHealth and knockback resistance as well as reinforcement spawning chance.
 */
public void handleEntityProperties(SPacketEntityProperties packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId());

    if (entity != null)
    {
        if (!(entity instanceof EntityLivingBase))
        {
            throw new IllegalStateException("Server tried to update attributes of a non-living entity (actually: " + entity + ")");
        }
        else
        {
            AbstractAttributeMap abstractattributemap = ((EntityLivingBase)entity).getAttributeMap();

            for (SPacketEntityProperties.Snapshot spacketentityproperties$snapshot : packetIn.getSnapshots())
            {
                IAttributeInstance iattributeinstance = abstractattributemap.getAttributeInstanceByName(spacketentityproperties$snapshot.getName());

                if (iattributeinstance == null)
                {
                    iattributeinstance = abstractattributemap.registerAttribute(new RangedAttribute((IAttribute)null, spacketentityproperties$snapshot.getName(), 0.0D, 2.2250738585072014E-308D, Double.MAX_VALUE));
                }

                iattributeinstance.setBaseValue(spacketentityproperties$snapshot.getBaseValue());
                iattributeinstance.removeAllModifiers();

                for (AttributeModifier attributemodifier : spacketentityproperties$snapshot.getModifiers())
                {
                    iattributeinstance.applyModifier(attributemodifier);
                }
            }
        }
    }
}
项目:Backmemed    文件:Potion.java   
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    for (Entry<IAttribute, AttributeModifier> entry : this.attributeModifierMap.entrySet())
    {
        IAttributeInstance iattributeinstance = attributeMapIn.getAttributeInstance((IAttribute)entry.getKey());

        if (iattributeinstance != null)
        {
            iattributeinstance.removeModifier((AttributeModifier)entry.getValue());
        }
    }
}
项目:Backmemed    文件:Potion.java   
public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    for (Entry<IAttribute, AttributeModifier> entry : this.attributeModifierMap.entrySet())
    {
        IAttributeInstance iattributeinstance = attributeMapIn.getAttributeInstance((IAttribute)entry.getKey());

        if (iattributeinstance != null)
        {
            AttributeModifier attributemodifier = (AttributeModifier)entry.getValue();
            iattributeinstance.removeModifier(attributemodifier);
            iattributeinstance.applyModifier(new AttributeModifier(attributemodifier.getID(), this.getName() + " " + amplifier, this.getAttributeModifierAmount(amplifier, attributemodifier), attributemodifier.getOperation()));
        }
    }
}
项目:Backmemed    文件:PotionHealthBoost.java   
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    super.removeAttributesModifiersFromEntity(entityLivingBaseIn, attributeMapIn, amplifier);

    if (entityLivingBaseIn.getHealth() > entityLivingBaseIn.getMaxHealth())
    {
        entityLivingBaseIn.setHealth(entityLivingBaseIn.getMaxHealth());
    }
}
项目:CustomWorldGen    文件:EntityLivingBase.java   
/**
 * Returns this entity's attribute map (where all its attributes are stored)
 */
public AbstractAttributeMap getAttributeMap()
{
    if (this.attributeMap == null)
    {
        this.attributeMap = new AttributeMap();
    }

    return this.attributeMap;
}
项目:CustomWorldGen    文件:SharedMonsterAttributes.java   
/**
 * Creates an NBTTagList from a BaseAttributeMap, including all its AttributeInstances
 */
public static NBTTagList writeBaseAttributeMapToNBT(AbstractAttributeMap map)
{
    NBTTagList nbttaglist = new NBTTagList();

    for (IAttributeInstance iattributeinstance : map.getAllAttributes())
    {
        nbttaglist.appendTag(writeAttributeInstanceToNBT(iattributeinstance));
    }

    return nbttaglist;
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
/**
 * Updates en entity's attributes and their respective modifiers, which are used for speed bonusses (player
 * sprinting, animals fleeing, baby speed), weapon/tool attackDamage, hostiles followRange randomization, zombie
 * maxHealth and knockback resistance as well as reinforcement spawning chance.
 */
public void handleEntityProperties(SPacketEntityProperties packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId());

    if (entity != null)
    {
        if (!(entity instanceof EntityLivingBase))
        {
            throw new IllegalStateException("Server tried to update attributes of a non-living entity (actually: " + entity + ")");
        }
        else
        {
            AbstractAttributeMap abstractattributemap = ((EntityLivingBase)entity).getAttributeMap();

            for (SPacketEntityProperties.Snapshot spacketentityproperties$snapshot : packetIn.getSnapshots())
            {
                IAttributeInstance iattributeinstance = abstractattributemap.getAttributeInstanceByName(spacketentityproperties$snapshot.getName());

                if (iattributeinstance == null)
                {
                    iattributeinstance = abstractattributemap.registerAttribute(new RangedAttribute((IAttribute)null, spacketentityproperties$snapshot.getName(), 0.0D, 2.2250738585072014E-308D, Double.MAX_VALUE));
                }

                iattributeinstance.setBaseValue(spacketentityproperties$snapshot.getBaseValue());
                iattributeinstance.removeAllModifiers();

                for (AttributeModifier attributemodifier : spacketentityproperties$snapshot.getModifiers())
                {
                    iattributeinstance.applyModifier(attributemodifier);
                }
            }
        }
    }
}
项目:CustomWorldGen    文件:Potion.java   
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    for (Entry<IAttribute, AttributeModifier> entry : this.attributeModifierMap.entrySet())
    {
        IAttributeInstance iattributeinstance = attributeMapIn.getAttributeInstance((IAttribute)entry.getKey());

        if (iattributeinstance != null)
        {
            iattributeinstance.removeModifier((AttributeModifier)entry.getValue());
        }
    }
}
项目:CustomWorldGen    文件:Potion.java   
public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    for (Entry<IAttribute, AttributeModifier> entry : this.attributeModifierMap.entrySet())
    {
        IAttributeInstance iattributeinstance = attributeMapIn.getAttributeInstance((IAttribute)entry.getKey());

        if (iattributeinstance != null)
        {
            AttributeModifier attributemodifier = (AttributeModifier)entry.getValue();
            iattributeinstance.removeModifier(attributemodifier);
            iattributeinstance.applyModifier(new AttributeModifier(attributemodifier.getID(), this.getName() + " " + amplifier, this.getAttributeModifierAmount(amplifier, attributemodifier), attributemodifier.getOperation()));
        }
    }
}
项目:CustomWorldGen    文件:PotionHealthBoost.java   
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    super.removeAttributesModifiersFromEntity(entityLivingBaseIn, attributeMapIn, amplifier);

    if (entityLivingBaseIn.getHealth() > entityLivingBaseIn.getMaxHealth())
    {
        entityLivingBaseIn.setHealth(entityLivingBaseIn.getMaxHealth());
    }
}
项目:Wizardry    文件:PotionVanish.java   
@Override
public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, @Nonnull AbstractAttributeMap attributeMapIn, int amplifier) {
    super.applyAttributesModifiersToEntity(entityLivingBaseIn, attributeMapIn, amplifier);
    entityLivingBaseIn.world.playSound(null, entityLivingBaseIn.getPosition(), ModSounds.ETHEREAL_PASS_BY, SoundCategory.NEUTRAL, 1f, 1);

    if (!(entityLivingBaseIn instanceof EntityPlayer))
        PacketHandler.NETWORK.sendToAll(new PacketVanishPotion(entityLivingBaseIn.getEntityId(), 0, 100));
}
项目:Wizardry    文件:PotionVanish.java   
@Override
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, @Nonnull AbstractAttributeMap attributeMapIn, int amplifier) {
    super.removeAttributesModifiersFromEntity(entityLivingBaseIn, attributeMapIn, amplifier);
    entityLivingBaseIn.world.playSound(null, entityLivingBaseIn.getPosition(), ModSounds.ETHEREAL_PASS_BY, SoundCategory.NEUTRAL, 1f, 1);

    if (!(entityLivingBaseIn instanceof EntityPlayer))
        PacketHandler.NETWORK.sendToAll(new PacketVanishPotion(entityLivingBaseIn.getEntityId()));
}
项目:Wizardry    文件:PotionSteroid.java   
@Override
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, @Nonnull AbstractAttributeMap attributeMapIn, int amplifier) {
    CapManager manager = new CapManager(entityLivingBaseIn);
    manager.setMana(0);
    manager.setBurnout(manager.getMaxBurnout());
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, 200, 3, true, true));
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 200, 3, true, true));
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.HUNGER, 200, 3, true, true));
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 200, 3, true, true));
    if (!(entityLivingBaseIn instanceof EntityPlayer) || !((EntityPlayer) entityLivingBaseIn).capabilities.isCreativeMode)
        entityLivingBaseIn.setHealth(0.5f);

    super.removeAttributesModifiersFromEntity(entityLivingBaseIn, attributeMapIn, amplifier);
}
项目:Gravestone-mod-Extended    文件:PotionChoke.java   
@Override
public void removeAttributesModifiersFromEntity(EntityLivingBase entity, AbstractAttributeMap attributeMap, int amplifier) {
    IChoke choke = entity.getCapability(ChokeProvider.AIR_CAP, null);
    choke.setActive(false);
    updateChoke(entity, choke);
    super.removeAttributesModifiersFromEntity(entity, attributeMap, amplifier);
}
项目:Gravestone-mod-Extended    文件:PotionChoke.java   
@Override
public void applyAttributesModifiersToEntity(EntityLivingBase entity, AbstractAttributeMap attributeMap, int amplifier) {
    IChoke choke = entity.getCapability(ChokeProvider.AIR_CAP, null);
    choke.setAir(entity.getAir());
    choke.setActive(true);
    updateChoke(entity, choke);

    super.applyAttributesModifiersToEntity(entity, attributeMap, amplifier);
}
项目:Inhuman-Resources    文件:PotionRedstoneNeedle.java   
@Override
public void removeAttributesModifiersFromEntity(EntityLivingBase entity, AbstractAttributeMap attributeMap, int amplifier)
{
    super.removeAttributesModifiersFromEntity(entity, attributeMap, amplifier);
    if (amplifier >= 4 && entity instanceof EntityCreature)
        ((EntityLiving) entity).setNoAI(false);
}
项目:SettlerCraft    文件:EntityPlayerWrappedSettler.java   
@Override
public AbstractAttributeMap getAttributeMap() {
    //null check because super constructor calls this method
    if(getSettler() == null) {
        AbstractAttributeMap map = new AttributeMap();
        map.registerAttribute(SharedMonsterAttributes.MAX_HEALTH);
        return map;
    } else {
        return getSettler().getAttributeMap();
    }
}
项目:ExpandedRailsMod    文件:EntityLivingBase.java   
public AbstractAttributeMap getAttributeMap()
{
    if (this.attributeMap == null)
    {
        this.attributeMap = new AttributeMap();
    }

    return this.attributeMap;
}
项目:ExpandedRailsMod    文件:SharedMonsterAttributes.java   
/**
 * Creates an NBTTagList from a BaseAttributeMap, including all its AttributeInstances
 */
public static NBTTagList writeBaseAttributeMapToNBT(AbstractAttributeMap map)
{
    NBTTagList nbttaglist = new NBTTagList();

    for (IAttributeInstance iattributeinstance : map.getAllAttributes())
    {
        nbttaglist.appendTag(writeAttributeInstanceToNBT(iattributeinstance));
    }

    return nbttaglist;
}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
/**
 * Updates en entity's attributes and their respective modifiers, which are used for speed bonusses (player
 * sprinting, animals fleeing, baby speed), weapon/tool attackDamage, hostiles followRange randomization, zombie
 * maxHealth and knockback resistance as well as reinforcement spawning chance.
 */
public void handleEntityProperties(SPacketEntityProperties packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId());

    if (entity != null)
    {
        if (!(entity instanceof EntityLivingBase))
        {
            throw new IllegalStateException("Server tried to update attributes of a non-living entity (actually: " + entity + ")");
        }
        else
        {
            AbstractAttributeMap abstractattributemap = ((EntityLivingBase)entity).getAttributeMap();

            for (SPacketEntityProperties.Snapshot spacketentityproperties$snapshot : packetIn.getSnapshots())
            {
                IAttributeInstance iattributeinstance = abstractattributemap.getAttributeInstanceByName(spacketentityproperties$snapshot.getName());

                if (iattributeinstance == null)
                {
                    iattributeinstance = abstractattributemap.registerAttribute(new RangedAttribute((IAttribute)null, spacketentityproperties$snapshot.getName(), 0.0D, 2.2250738585072014E-308D, Double.MAX_VALUE));
                }

                iattributeinstance.setBaseValue(spacketentityproperties$snapshot.getBaseValue());
                iattributeinstance.removeAllModifiers();

                for (AttributeModifier attributemodifier : spacketentityproperties$snapshot.getModifiers())
                {
                    iattributeinstance.applyModifier(attributemodifier);
                }
            }
        }
    }
}
项目:Battlegear2    文件:BattlegearUtils.java   
/**
 * Refresh the attribute map by removing from the old item and applying the current item
 * @param attributeMap the map to refresh
 * @param oldItem the old item whose attributes will be removed
 * @param currentItem the current item whose attributes will be applied
 */
public static void refreshAttributes(AbstractAttributeMap attributeMap, ItemStack oldItem, ItemStack currentItem) {
    if(!oldItem.isEmpty())
        attributeMap.removeAttributeModifiers(oldItem.getAttributeModifiers(EntityEquipmentSlot.MAINHAND));
    if(!currentItem.isEmpty())
        attributeMap.applyAttributeModifiers(currentItem.getAttributeModifiers(EntityEquipmentSlot.OFFHAND));
}
项目:Battlegear2    文件:WeaponHookContainerClass.java   
/**
 * Register the custom attributes
 */
@SubscribeEvent
public void onLivingConstructor(EntityEvent.EntityConstructing constructing){
    if(constructing.getEntity() instanceof EntityLivingBase){
        AbstractAttributeMap attributeMap = ((EntityLivingBase) constructing.getEntity()).getAttributeMap();
        attributeMap.registerAttribute(Attributes.armourPenetrate);
        attributeMap.registerAttribute(Attributes.daze);
        if(constructing.getEntity() instanceof EntityPlayer){
            attributeMap.registerAttribute(Attributes.extendedReach).setBaseValue(-2.2);//Reduce bare hands range
        }
        attributeMap.registerAttribute(Attributes.attackSpeed);
        attributeMap.registerAttribute(Attributes.mountedBonus);
    }
}
项目:Backmemed    文件:PotionAbsorption.java   
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    entityLivingBaseIn.setAbsorptionAmount(entityLivingBaseIn.getAbsorptionAmount() - (float)(4 * (amplifier + 1)));
    super.removeAttributesModifiersFromEntity(entityLivingBaseIn, attributeMapIn, amplifier);
}
项目:Backmemed    文件:PotionAbsorption.java   
public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    entityLivingBaseIn.setAbsorptionAmount(entityLivingBaseIn.getAbsorptionAmount() + (float)(4 * (amplifier + 1)));
    super.applyAttributesModifiersToEntity(entityLivingBaseIn, attributeMapIn, amplifier);
}
项目:CustomWorldGen    文件:PotionAbsorption.java   
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    entityLivingBaseIn.setAbsorptionAmount(entityLivingBaseIn.getAbsorptionAmount() - (float)(4 * (amplifier + 1)));
    super.removeAttributesModifiersFromEntity(entityLivingBaseIn, attributeMapIn, amplifier);
}
项目:CustomWorldGen    文件:PotionAbsorption.java   
public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
{
    entityLivingBaseIn.setAbsorptionAmount(entityLivingBaseIn.getAbsorptionAmount() + (float)(4 * (amplifier + 1)));
    super.applyAttributesModifiersToEntity(entityLivingBaseIn, attributeMapIn, amplifier);
}
项目:BetterWithAddons    文件:EffectTarred.java   
@Override
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier) {
    if(tarredBurningEntities.contains(entityLivingBaseIn))
        tarredBurningEntities.remove(entityLivingBaseIn);
}
项目:Wizardry    文件:PotionNullMovement.java   
@Override
public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, @Nonnull AbstractAttributeMap attributeMapIn, int amplifier) {
    entityLivingBaseIn.getEntityData().setFloat("rot_yaw", entityLivingBaseIn.rotationYaw);
    entityLivingBaseIn.getEntityData().setFloat("rot_pitch", entityLivingBaseIn.rotationPitch);
    super.applyAttributesModifiersToEntity(entityLivingBaseIn, attributeMapIn, amplifier);
}