Beispiel #1
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));
   }
 }
  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;
    }
  }