Package org.spout.vanilla.component.entity.misc

Examples of org.spout.vanilla.component.entity.misc.Effects


    if (getLevels() < 1 || primary == null || primary == EntityEffectType.NONE) {
      return;
    }

    for (Player player : pos.getWorld().getNearbyPlayers(pos, (int) getEffectRange())) {
      Effects effects = player.add(Effects.class);
      effects.add(new EntityEffect(primary, getPrimaryAmplifier(), getEffectDuration()));
      if (secondary != null && secondary != EntityEffectType.NONE && getLevels() == 4 && primary != secondary) {
        effects.add(new EntityEffect(secondary, getEffectDuration()));
      }
    }
  }
View Full Code Here


          value = (byte) (value | ((human.isSprinting() ? 1 : 0) << 3));
        }

        value = (byte) (value | ((isEatingBlocking() ? 1 : 0) << 4));

        Effects effects = getOwner().get(Effects.class);
        if (effects != null) {
          value = (byte) (value | ((effects.contains(EntityEffectType.INVISIBILITY) ? 1 : 0) << 5));
        }

        return value;
      }
View Full Code Here

          }
        }

        //Potion modification
        if (holdingMat.equals(VanillaMaterials.AIR)) {
          Effects effect = playerEnt.add(Effects.class);
          if (effect.contains(EntityEffectType.STRENGTH)) {
            damage += 3;
          }
          if (effect.contains(EntityEffectType.WEAKNESS)) {
            damage -= 2;
          }
        }
        //END Potion modification
View Full Code Here

TOP

Related Classes of org.spout.vanilla.component.entity.misc.Effects

Copyright © 2018 www.massapicom. 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.