Package net.minecraft.command

Examples of net.minecraft.command.IEntitySelector


      }
    }
  }

  IEntitySelector getEntitySelector() {
    return new IEntitySelector() {

      @Override
      public boolean isEntityApplicable(Entity entity) {
        return entity instanceof EntityItem;
      }
View Full Code Here


  public boolean adult = true;

  @Override
  IEntitySelector getEntitySelector() {
    return new IEntitySelector() {

      @Override
      public boolean isEntityApplicable(Entity entity) {
        if (!(entity instanceof EntityLivingBase) || entity instanceof EntityPlayer)
          return false;
View Full Code Here

    return 0x260B45;
  }

  @Override
  public IEntitySelector getSelector() {
    return new IEntitySelector() {

      @Override
      public boolean isEntityApplicable(Entity var1) {
        return var1 instanceof EntityAnimal && ((EntityAnimal) var1).getGrowingAge() == 0;
      }
View Full Code Here

    final int range = 6;
    final int manaToUse = getManaCost();

    if(supertile.getWorldObj().getTotalWorldTime() % 5 == 0) {
      List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + 1, supertile.zCoord + range));
      IEntitySelector selector = getSelector();

      for(EntityLivingBase entity : entities) {
        if(!selector.isEntityApplicable(entity))
          continue;

        if(entity.hurtTime == 0 && mana >= manaToUse) {
          entity.attackEntityFrom(DamageSource.magic, 4);
          mana -= manaToUse;
View Full Code Here

  public int getManaCost() {
    return 24;
  }

  public IEntitySelector getSelector() {
    return new IEntitySelector() {

      @Override
      public boolean isEntityApplicable(Entity entity) {
        return !(entity instanceof EntityPlayer);
      }
View Full Code Here

    /**
     * Returns whether the EntityAIBase should begin execution.
     */
    @Override
    public boolean shouldExecute(){
        List<Entity> pickableItems = itemPickupWidget.getEntitiesInArea(drone.worldObj, new IEntitySelector(){
            @Override
            public boolean isEntityApplicable(Entity entity){
                return entity instanceof EntityItem && entity.isEntityAlive();
            }
        });
View Full Code Here

TOP

Related Classes of net.minecraft.command.IEntitySelector

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.