Exemplo n.º 1
0
  public void attacks(
      ItemStack itemstack,
      World world,
      EntityLiving entityliving,
      EntityLiving entityliving1,
      int i) {
    switch (i) {
      case 1:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.woodSplinters, world);
        break;
      case 2:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.stoneShard, world);
        break;
      case 7:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.obsidianShard, world);
        break;
      case 8:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.sandstoneShard, world);
        break;
      case 12:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.netherrackShard, world);
        break;

      case 13:
        InfiToolPowers.splinterAttack(entityliving, Item.lightStoneDust, world);
        break;

      case 14:
        entityliving1.freeze();
        break;

      case 15:
        entityliving1.setFire(100);
        break;

      case 20:
        entityliving1.setFire(100);
        break;
    }
  }
Exemplo n.º 2
0
 public void attacks(
     ItemStack itemstack, World world, EntityLiving player, EntityLiving mob, int materialType) {
   switch (materialType) {
     case 1:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.woodSplinters, world);
       break;
     case 2:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.stoneShard, world);
       break;
     case 6:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.obsidianShard, world);
       break;
     case 7:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.sandstoneShard, world);
       break;
     case 11:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.netherrackShard, world);
       break;
     case 12:
       InfiToolPowers.splinterAttack(player, Item.lightStoneDust, world);
       break;
     case 13:
       mob.freeze(35);
       break;
     case 14:
       mob.setFire(40);
       break;
     case 15:
       InfiToolPowers.splinterAttack(player, Item.slimeBall, world);
       break;
     case 18:
       mob.setFire(100);
       break;
     case 26:
       mob.addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 20, 0));
   }
 }
Exemplo n.º 3
0
  public boolean onHitTarget(Entity entity) {
    worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (rand.nextFloat() * 0.2F + 0.7F));

    if (!(entity instanceof EntityLiving)) {
      return true;
    }

    EntityLiving entityliving = (EntityLiving) entity;

    if (hasFireAttachment || hasLavaAttachment) {
      entityliving.setFire(100);
    }

    return true;
  }