예제 #1
0
  /** Drops the block items with a specified chance of dropping the specified items */
  @SuppressWarnings("unused")
  public void dropBlockAsItemWithChance(
      World world, int x, int y, int z, int par_1, float par_2, int par_3) {
    super.dropBlockAsItemWithChance(world, x, y, z, par_1, par_2, par_3);

    if (false && !world.isRemote) {
      Item item = null;

      if (this.block == PineappleBlocks.pineapple_block) {
        item = PineappleItems.pineapple;
      }

      for (int j1 = 0; j1 < 3; ++j1) {
        if (world.rand.nextInt(15) <= par_1) {
          this.dropBlockAsItem(world, x, y, z, new ItemStack(item));
        }
      }
    }
  }
예제 #2
0
 @Override
 public void dropBlockAsItemWithChance(
     World worldIn, BlockPos pos, IBlockState state, float chance, int fortune) {
   super.dropBlockAsItemWithChance(worldIn, pos, state, chance, 0);
 }