コード例 #1
0
  public void dropBlockAsItemWithChance(
      World world, int i, int j, int k, int met, float par6, int par7) {
    super.dropBlockAsItemWithChance(world, i, j, k, met, par6, par7);
    met &= 15;
    if (met == 3) {
      this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.foodID], 1, 3));
    } else if (met == 7) {
      this.dropBlockAsItem_do(
          world, i, j, k, new ItemStack(Item.itemsList[forgottennature.newCropGoodsID], 1, 0));
    } else if (met == 11) {
      this.dropBlockAsItem_do(
          world,
          i,
          j,
          k,
          new ItemStack(Item.itemsList[forgottennature.hempCottonBambooCornID], 1, 11));
    } else if (met == 15) {
      this.dropBlockAsItem_do(
          world, i, j, k, new ItemStack(Item.itemsList[forgottennature.newCropGoodsID], 1, 1));
    }

    for (int n = 0; n < 5; ++n) {
      if (met == 3 && world.rand.nextInt(3) == 0) {
        this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.seedID], 1, 1));
      } else if (met == 7 && world.rand.nextInt(3) == 0) {
        this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.seedID], 1, 2));
      } else if (met == 15 && world.rand.nextInt(3) == 0) {
        this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.seedID], 1, 8));
      }
    }
  }
コード例 #2
0
  public void dropBlockAsItemWithChance(
      World world, int i, int j, int k, int met, float par6, int par7) {
    super.dropBlockAsItemWithChance(world, i, j, k, met, par6, par7);
    met &= 15;
    if (met == 3) {
      this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.foodID], 1, 7));
    } else if (met == 7) {
      this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.foodID], 1, 15));
    } else if (met == 11) {
      this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.foodID], 1, 9));
    } else if (met == 15) {
      this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.foodID], 1, 10));
    }

    for (int n = 0; n < 5; ++n) {
      if (met == 3 && world.rand.nextInt(3) == 0) {
        this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.seedID], 1, 10));
      } else if (met == 7 && world.rand.nextInt(3) == 0) {
        this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.seedID], 1, 9));
      } else if (met == 11 && world.rand.nextInt(3) == 0) {
        this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.foodID], 1, 9));
      } else if (met == 15 && world.rand.nextInt(3) == 0) {
        this.dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.itemsList[this.seedID], 1, 3));
      }
    }
  }
コード例 #3
0
 public void dropBlockAsItemWithChance(
     World par1World, int par2, int par3, int par4, int par5, float par6, int par7) {
   super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0);
 }