コード例 #1
0
 public boolean powers(
     ItemStack itemstack,
     int blockID,
     int x,
     int y,
     int z,
     World world,
     EntityLiving entityliving,
     int metadata,
     int materialType) {
   switch (materialType) {
     case 1:
       InfiToolPowers.splintering(x, y, z, mod_InfiBase.woodSplinters, world);
       break;
     case 2:
       InfiToolPowers.splintering(x, y, z, mod_InfiBase.stoneShard, world);
       break;
     case 6:
       InfiToolPowers.splintering(x, y, z, mod_InfiBase.obsidianShard, world);
       break;
     case 7:
       InfiToolPowers.splintering(x, y, z, mod_InfiBase.sandstoneShard, world);
       break;
     case 11:
       InfiToolPowers.splintering(x, y, z, mod_InfiBase.netherrackShard, world);
       break;
     case 12:
       InfiToolPowers.splintering(x, y, z, Item.lightStoneDust, world);
       break;
     case 13:
       InfiToolPowers.freezing(x, y, z, blockID, metadata, world, entityliving);
       break;
     case 14:
       InfiToolPowers.burning(x, y, z, blockID, metadata, world, entityliving);
       break;
     case 15:
       InfiToolPowers.slimePower(x, y, z, world);
       break;
   }
   return materialType != 13 && materialType != 14;
 }
コード例 #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));
   }
 }
コード例 #3
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;
    }
  }