Examples of attackEntityFrom()


Examples of net.minecraft.entity.EntityLivingBase.attackEntityFrom()

                    useMasterEnergy(SUCKING_POWER_COST, true);
                }

                EntityLivingBase entity = MiscTools.getEntityAt(worldObj, EntityLivingBase.class, xCoord, yCoord + 1, zCoord);
                if (entity != null && useMasterEnergy(KILLING_POWER_COST, false))
                    if (entity.attackEntityFrom(DamageSourceCrusher.INSTANCE, 10))
                        useMasterEnergy(SUCKING_POWER_COST, true);
            }

            if (isMaster()) {
                if (clock % 16 == 0)
View Full Code Here

Examples of net.minecraft.entity.EntityLivingBase.attackEntityFrom()

                double size = 0.8;
                List entities = worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getBoundingBox(i - size, posY, k - size, i + size, posY + 2, k + size));
                for (Object e : entities) {
                    if (e instanceof EntityLivingBase) {
                        EntityLivingBase ent = (EntityLivingBase) e;
                        ent.attackEntityFrom(DamageSourceBore.INSTANCE, 2);
                    }
                }
            }

            setMoving(hasFuel() && getDelay() == 0);
View Full Code Here

Examples of net.minecraft.entity.monster.EntityMob.attackEntityFrom()

    @SuppressWarnings("rawtypes")
    List list = housing.getWorld().getEntitiesWithinAABB(EntityMob.class, hurtBox);

    for (Object obj : list) {
      EntityMob mob = (EntityMob) obj;
      mob.attackEntityFrom(DamageSource.generic, 2);
    }

    return storedData;
  }
View Full Code Here

Examples of net.minecraft.entity.passive.EntityChicken.attackEntityFrom()

    List<ItemStack> drops = new LinkedList<ItemStack>();
    EntityChicken chicken = ((EntityChicken)entity);
    if (chicken.timeUntilNextEgg < 300)
    {
      chicken.playSound("mob.chicken.plop", 1.0F, (chicken.rand.nextFloat() - chicken.rand.nextFloat()) * 0.2F + 1.0F);
      chicken.attackEntityFrom(DamageSource.generic, 0);
      chicken.setRevengeTarget(chicken); // panic
      chicken.timeUntilNextEgg = chicken.rand.nextInt(6000) + 6200;
      if (rand.nextInt(4) != 0)
      {
        drops.add(new ItemStack(Item.egg));
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.attackEntityFrom()

            ItemStack itemInUse = player.itemInUse;
            if (itemInUse != null && itemInUse.getItem() == this) {

        event.setCanceled(true);
        handleNext = 3;
        player.attackEntityFrom(DamageSource.magic, 3);
      }
    }

    if (handle) {
      Entity source = event.source.getSourceOfDamage();
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.attackEntityFrom()

            interdictionMatrix.mergeIntoInventory(player.inventory.getStackInSlot(i));
            player.inventory.setInventorySlotContents(i, null);
          }
        }
        player.setHealth(1);
        player.attackEntityFrom(ModularForceFieldSystem.damagefieldShock, 100);
        interdictionMatrix.requestFortron(Settings.INTERDICTION_MURDER_ENERGY, false);

        player.addChatMessage("[" + interdictionMatrix.getInvName() + "] " + LanguageUtility.getLocal("message.moduleAntiPersonnel.death"));
      }
    }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.attackEntityFrom()

  {
    if(teamsManager.currentRound.teams[0].members.size() > 0)
    {
      EntityPlayer zombifiedPlayer = teamsManager.getPlayer(teamsManager.currentRound.teams[0].members.get(rand.nextInt(teamsManager.currentRound.teams[0].members.size())));
      teamsManager.messageAll("\u00a74" + zombifiedPlayer.getCommandSenderName() + "\u00a7c was infected with the \u00a74zombie plague\u00a7c!");
      zombifiedPlayer.attackEntityFrom(DamageSource.generic, 1000000000F);
    }
  }
 
  public Team[] getTeamsCanSpawnAs(TeamsRound currentRound, EntityPlayer player)
  {
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.attackEntityFrom()

      else if (count > 1)
        damage = 2;
      else if (count > 0)
        damage = 3;

      player.attackEntityFrom(damageSourceBeeEnd, damage);
    }

    return storedData;
  }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP.attackEntityFrom()

        if (args.length >= 1 && PermissionsManager.checkPermission(sender, getPermissionNode() + ".others"))
        {
            EntityPlayerMP player = UserIdent.getPlayerByMatchOrUsername(sender, args[0]);
            if (player != null)
            {
                player.attackEntityFrom(DamageSource.outOfWorld, 1000);
                OutputHandler.chatError(player, "You were killed. You probably deserved it.");
            }
            else
            {
                OutputHandler.chatError(sender, String.format("Player %s does not exist, or is not online.", args[0]));
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP.attackEntityFrom()

        if (args.length >= 1)
        {
            EntityPlayerMP player = UserIdent.getPlayerByMatchOrUsername(sender, args[0]);
            if (player != null)
            {
                player.attackEntityFrom(DamageSource.outOfWorld, 1000);
                OutputHandler.chatError(player, "You were killed. You probably deserved it.");
            }
            else
            {
                OutputHandler.chatError(sender, String.format("Player %s does not exist, or is not online.", args[0]));
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.