Examples of applyModifier()


Examples of net.minecraft.entity.ai.attributes.IAttributeInstance.applyModifier()

      IAttributeInstance attackInst = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.attackDamage);
      attackInst.removeModifier(swordDamageModifierPowered);

      ItemStack sword = player.getCurrentEquippedItem();
      if(Config.darkSteelSwordPowerUsePerHit <= 0 || EnderIO.itemDarkSteelSword.getEnergyStored(sword) >= Config.darkSteelSwordPowerUsePerHit) {
        attackInst.applyModifier(swordDamageModifierPowered);
      }
    }
  }

  private void updateSpeed(EntityPlayer player) {
View Full Code Here

Examples of net.minecraft.entity.ai.attributes.IAttributeInstance.applyModifier()

      int totalEnergy = getPlayerEnergy(player, EnderIO.itemDarkSteelLeggings);

      if(totalEnergy > 0) {
        usePlayerEnergy(player, EnderIO.itemDarkSteelLeggings, cost);
        if(player.isSprinting()) {
          moveInst.applyModifier(sprintModifiers[speedUpgrade.level - 1]);
        } else {
          moveInst.applyModifier(walkModifiers[speedUpgrade.level - 1]);
        }
      }
    }
View Full Code Here

Examples of net.minecraft.entity.ai.attributes.IAttributeInstance.applyModifier()

      if(totalEnergy > 0) {
        usePlayerEnergy(player, EnderIO.itemDarkSteelLeggings, cost);
        if(player.isSprinting()) {
          moveInst.applyModifier(sprintModifiers[speedUpgrade.level - 1]);
        } else {
          moveInst.applyModifier(walkModifiers[speedUpgrade.level - 1]);
        }
      }
    }
  }
View Full Code Here

Examples of net.minecraft.entity.ai.attributes.IAttributeInstance.applyModifier()

      if(horse.getHorseType() != 3 && horse.getHorseType() != 4 && horse.isTame()) {
        horse.setHorseType(3 + par1ItemStack.getItemDamage());
        BaseAttributeMap attributes = horse.getAttributeMap();
        IAttributeInstance movementSpeed = attributes.getAttributeInstance(SharedMonsterAttributes.movementSpeed);
        IAttributeInstance health = attributes.getAttributeInstance(SharedMonsterAttributes.maxHealth);
        health.applyModifier(new AttributeModifier("Ermergerd Virus D:", health.getBaseValue(), 0));
        movementSpeed.applyModifier(new AttributeModifier("Ermergerd Virus D:", movementSpeed.getBaseValue(), 0));
        IAttributeInstance jumpHeight = attributes.getAttributeInstance(ReflectionHelper.<IAttribute, EntityHorse>getPrivateValue(EntityHorse.class, null, LibObfuscation.HORSE_JUMP_STRENGTH));
        jumpHeight.applyModifier(new AttributeModifier("Ermergerd Virus D:", jumpHeight.getBaseValue() * 0.5, 0));
        par2EntityPlayer.worldObj.playSound(par3EntityLivingBase.posX + 0.5D, par3EntityLivingBase.posY + 0.5D, par3EntityLivingBase.posZ + 0.5D, "mob.zombie.remedy", 1.0F + par3EntityLivingBase.worldObj.rand.nextFloat(), par3EntityLivingBase.worldObj.rand.nextFloat() * 0.7F + 1.3F, false);

View Full Code Here

Examples of net.minecraft.entity.ai.attributes.IAttributeInstance.applyModifier()

        IAttributeInstance movementSpeed = attributes.getAttributeInstance(SharedMonsterAttributes.movementSpeed);
        IAttributeInstance health = attributes.getAttributeInstance(SharedMonsterAttributes.maxHealth);
        health.applyModifier(new AttributeModifier("Ermergerd Virus D:", health.getBaseValue(), 0));
        movementSpeed.applyModifier(new AttributeModifier("Ermergerd Virus D:", movementSpeed.getBaseValue(), 0));
        IAttributeInstance jumpHeight = attributes.getAttributeInstance(ReflectionHelper.<IAttribute, EntityHorse>getPrivateValue(EntityHorse.class, null, LibObfuscation.HORSE_JUMP_STRENGTH));
        jumpHeight.applyModifier(new AttributeModifier("Ermergerd Virus D:", jumpHeight.getBaseValue() * 0.5, 0));
        par2EntityPlayer.worldObj.playSound(par3EntityLivingBase.posX + 0.5D, par3EntityLivingBase.posY + 0.5D, par3EntityLivingBase.posZ + 0.5D, "mob.zombie.remedy", 1.0F + par3EntityLivingBase.worldObj.rand.nextFloat(), par3EntityLivingBase.worldObj.rand.nextFloat() * 0.7F + 1.3F, false);

        par1ItemStack.stackSize--;
        return true;
      }
View Full Code Here

Examples of net.minecraft.entity.ai.attributes.IAttributeInstance.applyModifier()

            IAttributeInstance iattributeinstance = this.getEntityAttribute(SharedMonsterAttributes.movementSpeed);
            iattributeinstance.removeModifier(babySpeedBoostModifier);

            if (isChild)
            {
                iattributeinstance.applyModifier(babySpeedBoostModifier);
            }
        }

        this.setChildSize(isChild);
    }
View Full Code Here

Examples of org.dmd.dmc.DmcObject.applyModifier()

   
    System.out.println(request.toOIF());
   
    System.out.println("Before:\n" + target.toOIF(15) + "\n");
   
    target.applyModifier(mods);
   
    System.out.println("After:\n" + target.toOIF(15) + "\n");
   
  }
View Full Code Here

Examples of org.dmd.dmt.shared.generated.dmo.TestBasicNamedObjectFixedDMO.applyModifier()

            mvIdxUnnamedObjAdapter9.addMods(modrec.getModifier());

        TestBasicNamedObjectFixedDMO rc = (TestBasicNamedObjectFixedDMO) dmo.cloneIt();

        try {
            rc.applyModifier(modrec.getModifier());
        } catch(DmcValueExceptionSet ex){
            throw(new IllegalStateException("Your form should not permit invalid data", ex));
        } catch(DmcValueException ex){
            throw(new IllegalStateException("Your form should not permit invalid data", ex));
        }
View Full Code Here

Examples of org.dmd.dmw.DmwNamedObjectWrapper.applyModifier()

      // TODO: validation
     
      try {
        // If anything changed in the object, applyModifier() returns true
        // and we create an event to report the changes
        if (wrapper.applyModifier(request.getModifyAttribute()))
          event = createModifyEvent(request,wrapper);
         
        response = request.getResponse();
        response.setLastResponse(true);
      } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.